/* PublicProc design: forms.
   Реєстрація (registration-form.html), сторінки входу й відновлення, статичні сторінки (контакти, новини, документи, тарифи).
   Блоки дослівно зі styles.css верстки (рядки в коментарях); свої — з префіксом pp-. */

/* Заголовок і підпис (101-121, 4395) */
.red-info-title {
  font-size: 16px;
  color: rgb(227, 6, 19);
}

.registration {
  margin-bottom: 3rem;
}

.pp-public .registration {
  margin-top: 20px;
}

/* Блоки форми (2792-2860) */
.registration__form-block {
  border-radius: 10px;
  background-color: rgb(255, 255, 255);
  box-shadow: 0px 2px 9px 0px rgba(0, 0, 0, 0.2);
}

.btn.registration__form-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 47px;
  margin: 8px 0 !important;
  font-size: 15px;
}

/* Поруч із полем ЄДРПОУ: на рівні поля, а не його мітки */
@media (min-width: 768px) {
  .btn.registration__form-btn {
    margin-top: 37px !important;
  }
}

.registration__form label:not(.btn),
.registration__form .tab-content label:not(.btn) {
  font-family: "e-UkraineLight", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgb(35, 19, 0);
}

.registration__form input[type=checkbox] {
  width: 24px;
  height: 24px;
  min-width: 24px;
}

/* ActiveField дає полям pr-2 і щільний mb-2: у верстці поля на всю колонку */
.registration__form .form-group,
.registration__form [class*="field-"] {
  padding-right: 0 !important;
}

.registration__form .card.card-body {
  border-radius: 0 0 10px 10px;
  box-shadow: 0px 1px 4.95px 0.05px rgba(0, 0, 0, 0.3);
}

.registration__form .help-block:empty,
.registration__form .hint-block:empty {
  display: none;
}

/* Чекбокс і радіо: квадрат зліва, текст із посиланнями — суцільним рядком, що переноситься під себе, а не під квадрат */
.registration__form label:has(> input[type=checkbox]),
.registration__form label:has(> input[type=radio]):not(.btn):not(.pp-reg-sending) {
  position: relative;
  display: block;
  min-height: 24px;
  margin-bottom: 8px;
  padding: 0 0 0 40px;
  line-height: 22px;
}

/* Підпис групи чекбоксів над першим рядком (ActiveField знімає відступ мітки) */
.registration__form .form-group > label:not(.btn):not(:has(> input)),
.registration__form [class*="field-"] > label:not(.btn):not(:has(> input)) {
  margin-bottom: 8px;
}

.registration__form label > input[type=checkbox],
.registration__form label > input[type=radio] {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0 !important;
}

/* Перемикач типів у два-три рядки міток: місце під помилку, щоб пігулки не злипались */
.registration__form .btn-group-toggle {
  margin-top: 8px;
}

/* Попередня пілюля поверх наступної, видно її правий заокруглений край (.organization-data__btn-first..fourth, 2906-2924); активна вище за всі (base.css) */
.registration__form .btn-group-toggle > label.btn:nth-child(1):not(.active):not(:has(input:checked)) { z-index: 4; }
.registration__form .btn-group-toggle > label.btn:nth-child(2):not(.active):not(:has(input:checked)) { z-index: 3; }
.registration__form .btn-group-toggle > label.btn:nth-child(3):not(.active):not(:has(input:checked)) { z-index: 2; }

/* Отримання документів (registration-form.html:1148-1160) */
.registration__form label.pp-reg-sending {
  align-items: center;
  margin-bottom: 8px;
}

.registration__form label.pp-reg-sending input[type=radio] {
  position: static;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin: 0 16px 0 0 !important;
}

.registration__form .file-div {
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.registration__form .file-div label {
  margin: 0 0 0 4px;
}

.registration__form .file-div .btn {
  flex: 0 0 auto;
}

.registration__form .required-documents-alert h3 {
  font-size: 16px;
  line-height: 1.3;
}

.registration__form .required-documents {
  margin: 8px 0 0;
  padding-left: 20px;
  background-color: transparent;
}

/* Колапс-блоки (2651-2661, 2841-2854, 3274): розмітка верстки, згортання — <details>, а не BS .collapse */
.collapse-block {
  border: 1px solid rgb(255, 255, 255);
  background-color: rgb(218, 218, 218);
  box-shadow: 0px 1px 4.95px 0.05px rgba(0, 0, 0, 0.3);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  font-size: 18px;
  color: rgb(141, 52, 136);
  padding-left: 16px;
  min-height: 38px;
}

.collapse-block__title {
  width: 92%;
  text-transform: uppercase;
  line-height: 1.2;
  padding: 4px 8px 4px 0;
}

.collapse-block__title a {
  color: rgb(141, 52, 136);
}

.collapse-block .collapse-btn {
  flex: 0 0 49px;
  width: 49px;
  border-top-right-radius: 20px;
  border: none;
  background-color: rgb(140, 51, 135);
}

.collapse-block .collapse-btn img {
  transition: transform 0.15s;
}

details.pp-collapse > summary {
  display: flex;
  cursor: pointer;
  list-style: none;
}

details.pp-collapse > summary::-webkit-details-marker {
  display: none;
}

details.pp-collapse > summary:focus-visible,
.collapse-block[data-toggle]:focus-visible {
  outline: 2px solid rgb(140, 51, 135);
  outline-offset: 1px;
}

/* Відкритий блок: стрілка вгору, як у верстки (.collapse-btn.active img) */
details.pp-collapse[open] > summary .collapse-btn img,
.collapse-block[aria-expanded="true"] .collapse-btn img {
  transform: rotate(180deg);
}

.collapse-block[data-toggle] {
  cursor: pointer;
}

/* Звичайні колапси застосунку (a.btn-collapse, base.css): та сама логіка стрілки */
a.btn-collapse::after {
  transform: rotate(180deg);
}

a.btn-collapse.collapsed::after {
  transform: none;
}

/* Сторінки входу: вигляд модалки входу (index.html:198-262) на сторінці */
.pp-auth-page {
  position: relative;
  padding: 20px 0 60px;
}

.pp-auth-page .modal-dialog {
  max-width: 500px;
  margin: 0 auto;
}

.pp-auth-page .modal-content {
  box-shadow: 0 2px 9px 0 rgba(0, 0, 0, 0.2);
}

.pp-auth-page .nav.modal__nav img {
  height: 30px;
}

.pp-auth-page .nav-link {
  opacity: 1;
}

.pp-auth-page [class*="field-"] {
  margin-bottom: 0 !important;
  padding-right: 0 !important;
}

.pp-auth-page .pp-auth-note {
  color: gray;
  font-family: "e-UkraineLight", sans-serif;
}

.pp-auth-page .alert {
  margin: 16px 0;
}

/* Модальні тексти: і в модалці, і на сторінці */
#loginModal label:not(.modal-grey-text),
.pp-auth-page label:not(.modal-grey-text) {
  font-size: 16px;
  font-weight: 500;
  color: rgb(29, 29, 27);
}

/* Статичні сторінки: білий блок верстки (.content-wrapper 2965) із заголовком .title-secondary */
.content-wrapper.pp-static {
  padding: 20px;
  border-radius: 10px;
  background-color: rgb(255, 255, 255);
  box-shadow: 0px 2px 4.95px 0.05px rgba(0, 0, 0, 0.3);
}

.pp-static {
  overflow-wrap: break-word;
}

.pp-public .pp-static {
  position: relative;
  margin-bottom: 60px;
}

.pp-static .title-secondary {
  margin-bottom: 40px;
}

.pp-static .title-secondary.pp-title-long {
  font-size: 40px;
  letter-spacing: 2px;
  padding-bottom: 20px;
}

.pp-static .title-secondary .btn {
  vertical-align: middle;
  letter-spacing: 0;
}

.pp-static hr {
  background-color: rgb(218, 218, 218);
}

.pp-static a:not(.btn):not(.news-banner-tag):not(.other-news-item):not(.other-news-link) {
  overflow-wrap: anywhere;
}

/* Контакти (3919-3958) */
/* 16.11: «непропорційно великий шрифт» — заголовки 18, номери 22/18, текст 16 */
.cabinet__contacts-title {
  font-size: 18px;
  color: #222221;
  text-transform: uppercase;
}

.cabinet__contacts-subtitle {
  font-size: 20px;
  font-weight: 500;
  color: #222221;
  text-transform: uppercase;
}

.cabinet__contacts-bigphone {
  font-size: 22px;
  color: #823983;
}

.cabinet__contacts-smalltext {
  font-size: 14px;
  font-weight: 400;
  color: #1d1d1b;
}

.cabinet__contacts-thintext {
  font-size: 16px;
  font-weight: 400;
  color: #1d1d1b;
}

.cabinet__contacts-phone {
  font-size: 18px;
  color: #823983;
}

.cabinet__contacts-link {
  font-size: 16px;
}

a.cabinet__contacts-bigphone,
a.cabinet__contacts-phone {
  display: block;
}

a.cabinet__contacts-bigphone:hover,
a.cabinet__contacts-phone:hover {
  color: #823983;
}

/* Блок контактів головної (1832-1890, 1975): реквізити поруч із номерами */
.contacts__nav-info {
  font-size: 13px;
  line-height: 1.2;
  color: rgb(130, 54, 140);
}

.contacts__info {
  font-family: "e-UkraineLight", sans-serif;
}

.contacts__info-title {
  font-size: 16px;
  font-weight: 500;
  color: rgb(29, 29, 27);
  line-height: 1.2;
}

.contacts__info-text {
  font-size: 15px;
  color: rgb(29, 29, 27);
  line-height: 1.2;
}

.contacts__info-phone {
  font-size: 15px;
  color: rgb(29, 29, 27);
  line-height: 1.2;
}

.contacts__info-phone:hover {
  color: rgb(130, 54, 140);
}

.contacts__info-email,
.contacts__info-email:hover {
  color: rgb(130, 54, 140);
  text-decoration: underline;
}

.contacts__info-social img {
  width: 40px;
  height: 40px;
  transition: all .3s;
}

.contacts__info-social img:hover {
  transform: scale(1.3);
  transition: all .3s;
}

/* Новини (4469-4512) */
.novyny-wrapper ul {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  background-color: transparent;
}

.novyny-wrapper li {
  display: flex;
  justify-content: center;
  margin: 0;
}

.novyny-wrapper a {
  display: block;
  max-width: 220px;
  width: 100%;
}

.novyny-wrapper a:hover {
  text-decoration: none;
}

.novyny-wrapper img {
  display: block;
  width: 100%;
  height: 165px;
  object-fit: cover;
}

.novyny-info {
  position: relative;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  color: rgb(255, 255, 255);
  background-image: linear-gradient(0deg, rgb(84, 38, 90) 0%, rgb(107, 46, 115) 45%, rgb(130, 54, 140) 100%);
  bottom: 10px;
}

.novyny-info::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 0px;
  height: 0px;
  border-style: solid;
  border-width: 0 10px 15px 10px;
  border-color: transparent transparent rgb(130, 54, 140) transparent;
  transform: rotate(0deg) translate(-50%);
}

.novyny-info__date {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.9;
}

/* Сторінка новини */
.pp-news-view .news-banner img {
  display: block;
  max-height: 420px;
  object-fit: cover;
  border-radius: 10px;
}

.pp-news-view .news-meta {
  margin-top: 12px;
  font-size: 13px;
  color: #706f6f;
}

.pp-news-view .news-meta a,
.pp-news-view .news-banner-tag {
  color: rgb(130, 54, 140);
}

.pp-news-view .news-body {
  margin-top: 24px;
  color: #1d1d1b;
  line-height: 1.5;
}

.pp-news-view .news-body p,
.pp-static-body p {
  margin-bottom: 1rem;
}

.pp-news-view .news-body img {
  max-width: 100%;
  height: auto;
}

.pp-news-view .news-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.pp-news-view .news-share p {
  margin: 0 8px 0 0;
}

.pp-news-view .news-share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 50%;
  background-image: linear-gradient(0deg, rgb(136, 67, 180) 0%, rgb(102, 51, 134) 100%);
}

.pp-news-view .other-news-header {
  margin: 0;
  color: rgb(130, 54, 140);
}

.pp-news-view .other-news-link {
  color: rgb(130, 54, 140);
  white-space: nowrap;
}

.pp-news-view .other-news-item {
  height: 100%;
  border-radius: 10px;
  background-color: #fff !important;
  box-shadow: 0px 2px 4.95px 0.05px rgba(0, 0, 0, 0.3);
  color: #1d1d1b;
}

.pp-news-view .other-news-item:hover {
  text-decoration: none;
  color: rgb(130, 54, 140);
}

.pp-news-view .other-news-item .news-title {
  margin: 0;
  color: inherit;
}

.pp-news-view .other-news-item .news-date {
  margin: 8px 0 0;
  font-size: 12px;
  color: #706f6f;
}

/* Документи: розділи — колапс-блоки (cabinet.html:17815-17900), всередині посилання-завантаження, без object/embed */
.pp-doc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  background-color: transparent;
}

.pp-doc-list > li {
  padding: 12px 16px;
  border-bottom: 1px solid rgb(218, 218, 218);
  color: #1d1d1b;
}

.pp-doc-list > li:last-child {
  border-bottom: 0;
}

.pp-doc-list > li > .fa {
  color: rgb(130, 54, 140);
}

.pp-doc-list > li > .btn {
  margin-right: 4px;
  vertical-align: middle;
}

.pp-doc-section {
  margin-top: 24px;
}

.pp-doc-section > .pp-doc-body {
  padding-bottom: 8px;
}

.pp-doc-empty {
  padding: 12px 16px;
  color: #706f6f;
}

.pp-doc-description {
  margin: 0 0 16px;
}

.pp-doc-back {
  margin-top: 24px;
}

/* Документи розділу з переглядом («Тарифи», «Регламент торгів»): смуга колапс-блока, під нею перегляд на всю ширину блока (cabinet.html:17747-17814) */
.pp-doc-previews {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pp-doc-preview > .pp-doc-body {
  padding: 0;
  background-color: #fff;
}

.pp-doc-preview__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 16px;
  font-size: 14px;
}

.pp-doc-preview__actions > a:not(.btn),
.pp-doc-preview__actions > .pp-doc-preview__reload {
  min-height: 0;
  color: rgb(130, 54, 140);
  font-size: 14px;
  text-decoration: none;
}

.pp-doc-preview__frame {
  display: block;
  width: 100%;
  height: 480px;
  border: 0;
  background-color: #525659;
}

/* Тарифи: заголовок кожного тарифу — смуга колапс-блока, таблиці не вилазять за блок */
.pp-taryfy .pp-collapse {
  margin-top: 24px;
}

.pp-taryfy .pp-doc-body {
  padding: 16px;
}

.pp-taryfy table {
  display: block;
  width: 100% !important;
  max-width: 100%;
  overflow-x: auto;
}

.pp-taryfy table tbody {
  display: table;
  width: 100%;
}

/* Сторінка помилки і підпис */
.pp-error-text {
  color: #1d1d1b;
}

.pp-sign-frame {
  display: block;
}

/* Адаптив (5676, 5718, 6058-6066) */
@media (max-width: 992px) {
  .novyny-wrapper ul {
    grid-template-columns: 1fr 1fr;
  }

  .pp-static .title-secondary.pp-title-long {
    font-size: 30px;
  }
}

@media (max-width: 768px) {
  .cabinet__contacts-title {
    font-size: 16px;
  }

  .cabinet__contacts-subtitle {
    font-size: 16px;
  }

  .cabinet__contacts-thintext,
  .cabinet__contacts-phone {
    font-size: 16px;
  }

  .cabinet__contacts-bigphone {
    font-size: 20px;
  }

}

@media (max-width: 576px) {
  .collapse-block {
    font-size: 13px;
  }

  /* Друга вкладка заходить під першу на 20 px (base.css): текст не повинен ховатись під нею */
  .registration__form .nav-tabs .nav-item + .nav-item .nav-link {
    padding-left: 28px;
  }

  .registration__form-block.p-3,
  .registration__form .card.card-body {
    padding: 12px !important;
  }

  .registration__form .mt-5,
  .registration__form.mt-5 {
    margin-top: 24px !important;
  }

  .novyny-wrapper ul {
    grid-template-columns: 1fr;
  }

  .novyny-wrapper a {
    max-width: 100%;
  }

  .novyny-wrapper img {
    height: 190px;
  }

  .pp-static .title-secondary {
    margin-bottom: 20px;
    padding-bottom: 15px;
    letter-spacing: 2px;
  }

  .pp-static .title-secondary.pp-title-long {
    font-size: 22px;
    letter-spacing: 1px;
  }

  .pp-taryfy .pp-doc-body {
    padding: 8px;
  }

  .pp-doc-preview__frame {
    height: 420px;
  }
}

/* Оптичне центрування тексту в однорядкових полях (зауваження 16.11).
   Montserrat у рядку центрує велику літеру, тож рядкові літери (більшість тексту) сидять
   нижче, і з великою першою літерою підказка чи значення здаються зсунутими вниз.
   Текст стоїть на 1 px вище геометричного центру: велика літера трохи вгорі, рядкові
   майже посередині. Поля фіксованої висоти, браузер сам центрує в них рядок, тож 2 px
   знизу піднімають текст на 1 px, а висота поля не змінюється */
input.form-control:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
select.form-control:not([multiple]):not([size]),
.filter__search input,
.pp-reg-page .filter__search input,
.filter__form .object__sidebar input[type="text"],
input.input-secondary {
  padding-top: 0;
  padding-bottom: 2px;
}

/* Крім полів у таблицях (фільтри й редагування в рядку): вони 24–32 px, текст і так на всю висоту */
.table input.form-control:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
.table select.form-control:not([multiple]):not([size]) {
  padding-bottom: 0;
}

/* Select2 з одним значенням: рядок на всю висоту поля (line-height), підіймаємо так само на 1 px */
.select2-container .select2-selection--single .select2-selection__rendered {
  position: relative;
  top: -1px;
}

/* Select2 з кількома значеннями у фільтрах: підказка в textarea стояла на ~2,5 px вище центру */
.filter-wrapper .filter__form .select2-selection--multiple .select2-search--inline .select2-search__field {
  padding-top: 4px;
}
