/* kc-forms-dark.css — тёмные формы заявок (04.11.2026, утверждённый макет «Формы КубаньСтрой»).
   Действует только на окна footer.php с классом .kc-dform (#popup_call, #popup_master, #popup_calc, #popup_thanks)
   и на отдельный звонок каталога #shellContactDialog. Общие form / input / button / dialog сайта не трогает.
   Отправку не меняет: поля, проверки и обработчики — прежние (assets/js/main.js, checkout.js). */

/* ----- окно fancybox ----- */
.fancybox-content.popup.kc-dform,
.popup.kc-dform {
  width: 680px !important;
  max-width: calc(100vw - 32px);
  min-height: 570px;
  padding: 50px 48px;
  overflow: visible;
  display: none;
  flex-direction: column;
  isolation: isolate;
  background: radial-gradient(ellipse at 95% 0, #38516160, transparent 65%), linear-gradient(135deg, #213441, #192b37);
  border: 1px solid #435766;
  border-radius: 14px;
  box-shadow: 0 30px 90px #0b1a2480;
  color: #edf3f7;
  font: 16px/1.6 "KC Roboto", Roboto, Arial, sans-serif;
  text-align: left;
}
.fancybox-content.popup.kc-dform { display: inline-flex !important; }   /* inline — fancybox центрирует окно как строчный блок; !important — fancybox ставит inline-block в style */
.fancybox-container:has(.kc-dform) .fancybox-bg { background: #0e202d; }
.fancybox-container.fancybox-is-open:has(.kc-dform) .fancybox-bg { opacity: .74; }
.fancybox-container:has(.kc-dform) .fancybox-slide { backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }

/* крестик fancybox */
.popup.kc-dform .fancybox-close-small {
  position: absolute; right: 18px; top: 18px; z-index: 2;
  display: grid; place-items: center;
  width: 36px; height: 36px; padding: 8px;
  background: transparent; border: 1px solid #65798780; border-radius: 6px;
  box-shadow: none; transform: none; opacity: 1;
  color: #b5c6d1; transition: background .15s, color .15s;
}
.popup.kc-dform .fancybox-close-small:hover { background: #ffffff0d; color: #fff; }
.popup.kc-dform .fancybox-close-small:focus-visible { outline: 2px solid #e3c28e; outline-offset: 2px; }
.popup.kc-dform .fancybox-close-small svg { width: 18px; height: 18px; }

/* ----- текст ----- */
.kc-dform .kcf-eyebrow {
  margin: 0 48px 24px 0;
  color: #e3c28e;
  font-size: 10px; line-height: 1.65; letter-spacing: .16em; text-transform: uppercase;
}
.kc-dform .kcf-title,
#shellContactDialog h2 {
  margin: 0 0 22px;
  font: 400 44px/1.22 "KC Manrope", Manrope, Arial, sans-serif;
  letter-spacing: -.035em;
  color: #edf3f7;
}
.kc-dform .kcf-title .title-lead,
#shellContactDialog h2 .title-lead { color: #edf3f7; }
.kc-dform .kcf-title .title-accent,
#shellContactDialog h2 .title-accent { color: #7db6ee; }
.kc-dform .kcf-intro {
  max-width: 510px; margin: 0 0 32px;
  color: #b5c6d1; font-size: 16px; line-height: 1.8;
}

/* ----- поля ----- */
.kc-dform .kcf-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; }
.kc-dform .form__field + .form__field { margin-top: 0; }
.kc-dform .kcf-field { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.kc-dform .kcf-field label { color: #c5d4de; font-size: 13px; line-height: 1.5; }
.kc-dform .form input[type="text"],
.kc-dform .form input[type="tel"] {
  display: block; width: 100%; height: auto; min-height: 60px;
  padding: 17px 18px;
  background: #172b3573; color: #f1f5f7;
  border: 1px solid #4b6170; border-radius: 6px;
  box-shadow: inset 0 1px 2px #0e1e2621;
  font: 16px/1.5 "KC Roboto", Roboto, Arial, sans-serif;
  transition: border-color .2s, background .2s;
}
.kc-dform .form input::placeholder { color: #94a9b6; opacity: 1; }
.kc-dform .form input[type="text"]:focus,
.kc-dform .form input[type="tel"]:focus {
  outline: 2px solid #e3c28e45; outline-offset: 2px;
  border-color: #e3c28e; background: #203742;
}
.kc-dform .form__field.error input[type="text"],
.kc-dform .form__field.error input[type="tel"] { border-color: #e0a29a; box-shadow: none; }
.kc-dform .form__field .notification { margin: 0; color: #f0b8ad; font-size: 12px; line-height: 1.5; }

/* ----- кнопка: золотой контур, стрелка; «Отправляем…» пока main.js держит класс .loading ----- */
.kc-dform .kcf-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  width: 100%; min-height: 65px; height: auto; margin-top: 28px; padding: 18px 22px;
  background: transparent; border: 1px solid #e3c28e; border-radius: 6px;
  color: #e3c28e; font: 16px/1.5 "KC Roboto", Roboto, Arial, sans-serif; text-align: left;
  cursor: pointer; transition: background .2s, border-color .2s;
}
.kc-dform .kcf-btn::before { content: none; }
.kc-dform .kcf-btn:hover { background: #e3c28e0d; border-color: #f0d5ac; }
.kc-dform .kcf-btn:focus-visible { outline: 2px solid #e3c28e; outline-offset: 4px; }
.kc-dform .kcf-btn:active { background: #e3c28e18; }
.kc-dform .kcf-arrow { width: 28px; height: 28px; flex-shrink: 0; }
.kc-dform .kcf-btn-wait { display: none; }
.kc-dform .form.loading .kcf-btn { opacity: .6; cursor: wait; }
.kc-dform .form.loading .kcf-btn-label { display: none; }
.kc-dform .form.loading .kcf-btn-wait { display: inline; }

/* ошибка отправки — main.js вставляет p.form__error-send со своим inline-стилем */
.kc-dform .form__error-send {
  margin: 20px 0 0 !important; padding: 12px 16px;
  border-left: 2px solid #e0a29a; background: #ffffff05;
  color: #f0c6bf !important; font-size: 14px !important; line-height: 1.6;
}
.kc-dform .kcf-fine { margin: 20px 0 0; color: #a4b9c6; font-size: 12px; line-height: 1.7; }

/* ----- «Спасибо» ----- */
.kc-dform .kcf-success-icon {
  display: grid; place-items: center;
  width: 64px; height: 64px; margin: 8px 0 32px;
  border: 1px solid #e3c28e85; border-radius: 50%; color: #e3c28e;
}
.kc-dform .kcf-bottom { margin-top: auto; }
.kc-dform .kcf-bottom .kcf-btn { margin-top: 30px; }

/* ----- отдельный звонок каталога (#shellContactDialog) ----- */
#shellContactDialog {
  width: 680px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px);
  padding: 50px 48px; overflow: auto;
  background: radial-gradient(ellipse at 95% 0, #38516160, transparent 65%), linear-gradient(135deg, #213441, #192b37);
  border: 1px solid #435766; border-radius: 14px;
  box-shadow: 0 30px 90px #0b1a2480;
  color: #edf3f7; font-family: "KC Roboto", Roboto, Arial, sans-serif;
}
#shellContactDialog::backdrop { background: #0e202dbd; backdrop-filter: blur(5px); }
#shellContactDialog .eyebrow {
  margin: 0 48px 24px 0; color: #e3c28e;
  font-size: 10px; line-height: 1.65; letter-spacing: .16em; text-transform: uppercase;
}
#shellContactDialog .eyebrow::after { content: none; }   /* черта после надзаголовка из общих стилей каталога — в макете её нет */
#shellContactDialog > p:not(.eyebrow) { max-width: 510px; margin: 0 0 32px; color: #b5c6d1; font-size: 16px; line-height: 1.8; }
#shellContactDialog .shell-dialog-close {
  position: absolute; right: 18px; top: 18px;
  display: grid; place-items: center; width: 36px; height: 36px;
  background: transparent; border: 1px solid #65798780; border-radius: 6px;
  color: #b5c6d1; font-size: 24px; line-height: 1; cursor: pointer; transition: background .15s, color .15s;
}
#shellContactDialog .shell-dialog-close:hover { background: #ffffff0d; color: #fff; }
#shellContactDialog .shell-dialog-close:focus-visible { outline: 2px solid #e3c28e; outline-offset: 2px; }
#shellContactDialog #shellContactForm { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; }
#shellContactDialog #shellContactForm > label:not(.shell-consent) {
  display: flex; flex-direction: column; gap: 9px; margin: 0; min-width: 0;
  color: #c5d4de; font-size: 13px; line-height: 1.5;
}
#shellContactDialog #shellContactForm input:not([type="checkbox"]):not([type="hidden"]) {
  display: block; width: 100%; height: auto; min-height: 60px; margin: 0;
  padding: 17px 18px;
  background: #172b3573; color: #f1f5f7;
  border: 1px solid #4b6170; border-radius: 6px; box-shadow: inset 0 1px 2px #0e1e2621;
  font: 16px/1.5 "KC Roboto", Roboto, Arial, sans-serif;
  transition: border-color .2s, background .2s;
}
#shellContactDialog #shellContactForm input::placeholder { color: #94a9b6; opacity: 1; }
#shellContactDialog #shellContactForm input:not([type="checkbox"]):focus {
  outline: 2px solid #e3c28e45; outline-offset: 2px; border-color: #e3c28e; background: #203742;
}
#shellContactDialog #shellContactForm .shell-consent {
  grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 10px; margin: 0;
  color: #b5c6d1; font-size: 12px; line-height: 1.6;
}
#shellContactDialog #shellContactForm .shell-consent input { width: 17px; height: 17px; margin-top: 2px; flex-shrink: 0; accent-color: #e3c28e; }
#shellContactDialog #shellContactForm .shell-consent a { color: #b5c6d1; text-underline-offset: 4px; }
#shellContactDialog #shellContactForm .shell-form-submit {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  width: 100%; min-height: 65px; margin-top: 6px; padding: 18px 22px;
  background: transparent; border: 1px solid #e3c28e; border-radius: 6px;
  color: #e3c28e; font-size: 16px; line-height: 1.5; text-align: left;
  cursor: pointer; transition: background .2s, border-color .2s;
}
#shellContactDialog #shellContactForm .shell-form-submit:hover { background: #e3c28e0d; border-color: #f0d5ac; }
#shellContactDialog #shellContactForm .shell-form-submit:focus-visible { outline: 2px solid #e3c28e; outline-offset: 4px; }
#shellContactDialog #shellContactForm .shell-form-submit:disabled { opacity: .6; cursor: wait; }
#shellContactDialog #shellContactForm .shell-form-submit::after { width: 28px; height: 28px; flex: 0 0 28px; }
#shellContactDialog #shellContactForm #shellFormStatus {
  grid-column: 1 / -1; margin: 0; padding: 12px 16px;
  border-left: 2px solid #e3c28e; border-radius: 0; background: #ffffff05;
  color: #d0dce3; font-size: 14px; line-height: 1.6;
}
#shellContactDialog #shellContactForm #shellFormStatus.is-error { border-color: #e0a29a; color: #f0c6bf; }
#shellContactDialog .shell-dialog-alternatives { gap: 4px 20px; margin-top: 20px; font-size: 12px; line-height: 1.7; }
#shellContactDialog .shell-dialog-alternatives span { color: #a4b9c6; font-size: 12px; }
#shellContactDialog .shell-dialog-alternatives a { color: #b5c6d1; text-decoration: underline; text-underline-offset: 4px; }

/* ----- телефон ----- */
@media (max-width: 540px) {
  .fancybox-content.popup.kc-dform,
  .popup.kc-dform,
  #shellContactDialog { min-height: 0; padding: 34px 23px; }
  .kc-dform .kcf-eyebrow,
  #shellContactDialog .eyebrow { margin-bottom: 26px; font-size: 9px; }
  .kc-dform .kcf-title,
  #shellContactDialog h2 { max-width: 250px; font-size: 31px; }
  .kc-dform .kcf-intro,
  #shellContactDialog > p:not(.eyebrow) { margin-bottom: 27px; font-size: 15px; line-height: 1.75; }
  .kc-dform .kcf-fields,
  #shellContactDialog #shellContactForm { grid-template-columns: 1fr; gap: 18px; }
  .kc-dform .form input[type="text"],
  .kc-dform .form input[type="tel"],
  #shellContactDialog #shellContactForm input:not([type="checkbox"]):not([type="hidden"]) { min-height: 56px; padding: 15px; }
  .kc-dform .kcf-btn,
  #shellContactDialog #shellContactForm .shell-form-submit { min-height: 62px; padding: 17px 18px; font-size: 15px; }
  .popup.kc-dform .fancybox-close-small,
  #shellContactDialog .shell-dialog-close { right: 13px; top: 13px; width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .kc-dform *, #shellContactDialog * { transition: none !important; }
}
