/* ====== ПОЗОВ-форма ====== */
.pozov-wizard { max-width: 880px; margin: 0 auto; }

.pozov-wizard .w-step {
  display: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px 20px 16px;
  margin: 0 0 16px;
}
.pozov-wizard .w-step.is-active,
.pozov-wizard .w-step.is-done { display: block; }

.pozov-wizard .w-question { font-weight: 600; font-size: 16px; line-height: 1.35; margin: 0 0 10px; color: #0d518d; }
.pozov-wizard .w-hint { font-size: 14px; color: #4b5563; margin: 8px 0 12px; }
.pozov-wizard .w-muted { color: #6b7280; font-size: 14px; }
.pozov-wizard .w-divider { height: 1px; background: #e5e7eb; margin: 16px 0; }

.pozov-wizard .w-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) {
  .pozov-wizard .w-cols-2 { grid-template-columns: 1fr 1fr; }
  .pozov-wizard .w-cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}
.pozov-wizard .w-gap-lg { gap: 18px; }

.pozov-wizard .w-field { 
  display: block; 
  position: relative;    /* ЗАБОРОНИ */
}


.pozov-wizard .w-label { display: block; font-weight: 600; margin: 6px 0 6px; color: #111; }
.pozov-wizard .w-input, .pozov-wizard .w-select, .pozov-wizard .w-textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; background: #fff;
}
.pozov-wizard .w-textarea { min-height: 140px; resize: vertical; }
.pozov-wizard .w-input-inline { max-width: 220px; }
.pozov-wizard .w-align-end { align-self: end; }
.pozov-wizard .w-mt-6 { margin-top: 6px; }

.pozov-wizard .w-radios, .pozov-wizard .w-checks { display: grid; gap: 8px; }
.pozov-wizard .w-radio, .pozov-wizard .w-checkbox { display: inline-flex; gap: 10px; align-items: flex-start; line-height: 1.35; }

.pozov-wizard .w-confirm { display: inline-flex; gap: 8px; margin-top: 10px; }

/* Спеціально для кроку 4: чекбокс + текст один під одним */
#step4-confirm-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 10px;
}

#step4-confirm-block .w-confirm-hint {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}

#step4-confirm-block[aria-hidden="true"] {
  display: none;
}

#step4-confirm-block[aria-hidden="false"] {
  display: flex;
}

.pozov-wizard .w-controls { display: flex; gap: 12px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.pozov-wizard .w-btn {
  padding: 10px 16px; border: 2px solid #0d518d; border-radius: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  background: #0d518d; color: #ffd800; transition: .25s ease;
}
.pozov-wizard .w-btn:hover { background: #083f6d; border-color: #083f6d; color: #ffd800; transform: translateY(-1px); }
.pozov-wizard .w-btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* Кнопка "Зберегти зміни": спочатку прихована */
.pozov-wizard .save-changes {
  display: none; /* << прихована за замовчуванням */
  padding: 10px 16px;
  border: 2px dashed #0d518d;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: transparent;
  color: #0d518d;
  transition: .25s ease;
}
.pozov-wizard .save-changes.is-visible { display: inline-block; } /* << показати */
.pozov-wizard .save-changes:hover { background: #eef5fb; }
.pozov-wizard .save-changes[disabled] { opacity: .45; cursor: not-allowed; }

.pozov-wizard .w-conditional[aria-hidden="true"] { display: none; }
.pozov-wizard .w-child { border: 1px dashed #cbd5e1; border-radius: 8px; padding: 12px; margin-top: 12px; }
.pozov-wizard .w-fieldset { border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px; background: #fff; }
.pozov-wizard .w-legend { font-weight: 700; color: #0d518d; padding: 0 6px; }
.pozov-wizard [aria-live="polite"] { min-height: 1em; }
.pozov-page .pozov-title + .pozov-wizard { margin-top: 18px; }

/* повідомлення підтвердження */
.save-message {
  margin-top: 5px;
  font-size: 14px;
  color: #0d518d;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.save-message.visible { opacity: 1; }

@media (max-width: 500px) {
  .pozov-wizard .w-btn { width: 100%; text-align: center; }
  .pozov-wizard .save-changes.is-visible { width: 100%; }
}


/* ==========================  ADDON */


/* Базові поля */
.pozov-wizard .w-input,
.pozov-wizard .w-select,
.pozov-wizard .w-textarea {
  background-color: #fff;              /* було: background */
  color: #111;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  transition: background-color .25s ease, 
              color .25s ease, 
              border-color .25s ease;  /* плавність */
}

/* Disabled-стан: візуально сірий + курсор */
.pozov-wizard .w-input:disabled,
.pozov-wizard .w-select:disabled,
.pozov-wizard .w-textarea:disabled {
  background-color: #f3f4f6;  /* було: background */
  color: #9ca3af;
  border-color: #e5e7eb;
  cursor: not-allowed;
}

/* Плейсхолдер у disabled */
.pozov-wizard .w-input:disabled::placeholder,
.pozov-wizard .w-textarea:disabled::placeholder {
  color: #cbd5e1;
}


/* Плавна поява/зникнення блоків у паспортному підблоці */
.w-reveal {
  overflow: hidden; /* треба для анімації згортання */
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height .35s ease, opacity .25s ease, transform .25s ease;
}

.w-reveal.is-visible {
  max-height: 1000px;
  opacity: 1;
  transform: translateY(0);
  overflow: visible; /* ключове: дає попапу вилізти назовні */
}
  
  /* Вибір типу паспорта — вертикально */
  #passport-choice { display: grid; gap: 8px; }
  
  /* Плавність для увімкнення/вимкнення disabled */
  .pozov-wizard .w-input,
  .pozov-wizard .w-select,
  .pozov-wizard .w-textarea {
    background-color: #fff;
    transition: background-color .25s ease, color .25s ease, border-color .25s ease;
  }
  .pozov-wizard .w-input:disabled,
  .pozov-wizard .w-select:disabled,
  .pozov-wizard .w-textarea:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
  }
  .pozov-wizard .w-input:disabled::placeholder,
  .pozov-wizard .w-textarea:disabled::placeholder {
    color: #cbd5e1;
  }


  #df_addr_mode_block {
    margin-top: 25px;   /* або будь-яке інше значення */
}

.w-hint--alert {
  border-left: 4px solid #d4af37;        /* насичене золото */
  background-color: #fff8e5;             /* мʼякий теплий фон */
  color: #664200 !important;                        /* темно-коричневий текст */
  padding: 10px 14px;
  margin-top: 12px;
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1.5;
}

#step3 .w-checkbox {
  margin-top: 12px; /* можеш змінити на 8/16 за смаком */
}



/* ЗАБОРОНИ ПОЧАТОК */

.w-input-error {
  display: block !important;
  position: absolute;
  bottom: 100%;                 /* над інпутом */
  left: 0;
  transform: translateY(0);  /* трохи вище */
  max-width: 260px;

  font-size: 12px;
  line-height: 1.4;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 4px 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
  z-index: 20;

  /* замість display: none */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  /* анімація появи/зникнення */
  transition:
    opacity   0.25s ease,
    transform 0.25s ease,
    visibility 0.25s ease;
}

.w-input-error.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0); /* легенький рух вгору при появі */
}

.w-input-error::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 12px;
  border-width: 6px;
  border-style: solid;
  border-color: #fef2f2 transparent transparent transparent;
}

.w-input-error::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 12px;
  border-width: 6px;
  border-style: solid;
  border-color: #fef2f2 transparent transparent transparent;
}



/* ЗАБОРОНИ КІНЕЦЬ */



.w-child {
  position: relative;
}

/* Щоб "Дитина" не наїжджала на хрестик */
.w-child > .w-muted {
  padding-right: 3rem;
}

/* Хрестик рівно на лінії бордеру */
.w-child-remove {
  position: absolute;
  top: 0.5rem;                 /* прив'язка до верхнього бордера */
  right: 0.5rem;

  width: 25px;
  height: 25px;

  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;

  font-size: 0;

  /* Центр кнопки якраз на лінії бордеру */
  transform: translateY(-50%);
  transform-origin: center;

  transition: transform 0.18s ease;
  z-index: 10;
  pointer-events: auto;
}

.w-child-remove::before,
.w-child-remove::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 4px;
  border-radius: 999px;
  background-color: #9ca3af;          /* сірий */
  transform-origin: center;
  transition: background-color 0.30s ease;
}

.w-child-remove::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.w-child-remove::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Ховер: трохи більший і майже чорний */
.w-child-remove:hover {
  transform: translateY(-50%) scale(1.12);
}

.w-child-remove:hover::before,
.w-child-remove:hover::after {
  background-color: #111827;
}

.w-child-remove:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #9ca3af;
  border-radius: 999px;
}

/* =========================
   КРОК 12: нормальні відступи між рядками (Додатки)
   ========================= */

   #step12 #attachments-step12 {
    display: grid;
    gap: 14px;         /* відступ між рядками-додатками */
    margin-top: 12px;
  }
  
  #step12 #attachments-step12 .w-row {
    display: grid;
    gap: 8px;          /* відступ між заголовком і полем */
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
  }
  
  #step12 #attachments-step12 .w-row-title {
    margin: 0;
    line-height: 1.45; /* нормальна читабельність */
    font-weight: 600;
    color: #111;
  }
  
  #step12 #attachments-step12 .w-row-input {
    margin: 0;
  }
  
  #step12 #attachments-step12 .w-row-input .w-select {
    width: 100%;
  }
  
  /* На десктопі: заголовок зліва, поле справа */
  @media (min-width: 720px) {
    #step12 #attachments-step12 .w-row {
      grid-template-columns: 1fr 360px;
      align-items: center;
      gap: 12px;
    }
  }

  /* хінт за замовчуванням прихований */
.w-hint {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition: opacity .25s ease, transform .25s ease, max-height .25s ease;
}

/* показати хінт плавно */
.w-hint.is-visible {
  opacity: 1;
  transform: translateY(0);
  max-height: 200px; /* можна 120/300 — під довжину тексту */
}

/* ===== FINAL PLANS ===== */
.final-actions { margin-top: 10px; }
.final-title { margin: 0 0 12px; }

.final-plans{
  display: grid;
  gap: 16px;
}

@media (min-width: 900px){
  .final-plans{ grid-template-columns: 1fr 1fr; }
}

.final-plan{
  background: #eaf5ff;            /* світло-голубий фон */
  color: #0b2d6b;                  /* темно-синій текст */
  border-radius: 16px;
  padding: 18px;
  border: 1px solid rgba(11,45,107,.12);
}

.final-plan__heading{
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .3px;
  color: #0b2d6b;
}

.final-plan__lead{
  margin: 0 0 10px;
  font-weight: 600;
  color: #0b2d6b;
}

.final-plan__list{
  margin: 0 0 12px;
  padding-left: 0;
  list-style: none;
  counter-reset: step;
}

.final-plan__list > li{
  margin: 6px 0;
  position: relative;
  padding-left: 44px;
}

.final-plan__list > li::before{
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05em;

  width: 28px;
  height: 28px;
  border-radius: 50%;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 2px solid currentColor;
  font-weight: 700;
  line-height: 1;
}

.final-plan__note{
  margin: 8px 0 0;
  color: #0b2d6b;
}

.final-plan__actions{ margin-top: 14px; }

.final-tools{ margin-top: 14px; }

/* ===== MODAL (sendbox) ===== */
.w-modal{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,.35);
  z-index: 9999;
}

.w-modal__panel{
  width: 100%;
  max-width: 520px;
  background: #eaf5ff;
  color: #0b2d6b;
  border-radius: 16px;
  border: 1px solid rgba(11,45,107,.12);
  padding: 16px;
}

.w-modal__title{
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 800;
}

body.w-modal-open{ overflow: hidden; }

.final-tools__hint{
  border-left: 4px solid #d4af37;        /* насичене золото */
  background-color: #fff8e5;             /* мʼякий теплий фон */
  color: #664200 !important;                        /* темно-коричневий текст */
  padding: 10px 14px;
  margin-top: 12px;
  margin-bottom: 12px;
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1.5;
}


input.is-disabled[readonly]{
  background:#f2f2f2;
  color:#555;
  opacity:1;
  cursor:not-allowed;
}

select.ui-locked {
  pointer-events: none;   /* не клікається */
  background: #f2f2f2;    /* сірий фон */
  color: #555;
  opacity: 1;             /* щоб не було “вицвіло як disabled” */
  cursor:not-allowed;
}





/* ===== Адреса: вулиця/будинок/квартира + приватний будинок ===== */
.w-addr-grid .w-field{
  margin: 0;
}


.w-addr-grid{
  display: grid;
  gap: 16px;
  align-items: start !important;
}

/* Десктоп: (тип)_____(будинок) / (назва)___(квартира) / чекбокс під квартирою */
@media (min-width: 641px){
  .w-addr-grid{
    grid-template-columns: 1fr 220px; /* ліва широка / права вузька */
    grid-template-areas:
      "stype house"
      "sname flat"
      ".     priv";
  }
}

/* Телефон: тип, назва, (будинок)(квартира), чекбокс під ними */
@media (max-width: 640px){
  .w-addr-grid{
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "stype stype"
      "sname sname"
      "house flat"
      "priv  priv";
  }
}

/* Розкладка по областях */
.w-addr-stype{ grid-area: stype; }
.w-addr-sname{ grid-area: sname; }
.w-addr-house{ grid-area: house; }
.w-addr-flat{  grid-area: flat; }
.w-addr-private{ grid-area: priv; align-self: start; }

/* щоб елементи розтягувались по комірці */
.w-addr-grid .w-input,
.w-addr-grid .w-select{
  width: 100%;
}





/* адресний чекбокс (df_private_house): центрування для 1–2 рядків */
.w-checkbox.w-addr-private{
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}

.w-checkbox.w-addr-private input[type="checkbox"]{
  margin: 0;
  flex: 0 0 auto;
}

.w-checkbox.w-addr-private span{
  line-height: 1.25;
}