/* Local preview safeguards. The visual system is inherited from the public
   reference stylesheet; these rules only keep external embeds out of captures. */
iframe[src*="calltouch"],
iframe[src*="top-fwz"],
.grecaptcha-badge {
  display: none !important;
}

/* The floating lead chat is disabled on the user's request. */
.reference-floating-contact,
.widget-chat-modal {
  display: none !important;
}

html,
body {
  overflow-x: clip;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

/* The final quiz confirmation no longer contains a phone number. Keep that
   short confirmation compact instead of retaining the large question layout. */
#popup-calc.quiz-complete {
  width: min(100%, 640px);
  max-width: 640px;
}

#popup-calc.quiz-complete .popup__content {
  padding: 44px 56px;
}

#popup-calc.quiz-complete .popup__title {
  margin-bottom: 8px;
}

#popup-calc.quiz-complete .popup__text {
  margin-bottom: 0;
}

/* Show the selected answer in every quiz with the same green as the
   "Далее" button. The legacy stylesheet targets a non-existent sibling
   (.step), so its inner radio dot stays invisible after selection. */
.step input[type="radio"].ui-radio + label.radio-label::after,
.step input[type="radio"].popup__calc-inp + label.radio-label::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 28px;
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: #42ae45;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

.step input[type="radio"].ui-radio:checked + label.radio-label::after,
.step input[type="radio"].popup__calc-inp:checked + label.radio-label::after {
  opacity: 1;
}

/* Soft white square vignette around the new Svetlana photo. The caption stays
   above the fade so its text and messenger links remain crisp. */
.about-new__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .92) 0%, rgba(255, 255, 255, 0) 18%, rgba(255, 255, 255, 0) 82%, rgba(255, 255, 255, .92) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .92) 0%, rgba(255, 255, 255, 0) 18%, rgba(255, 255, 255, 0) 82%, rgba(255, 255, 255, .92) 100%);
}

.about-new__photo-caption {
  z-index: 2;
}

/* Интерактивный чат виджета по сценарию фцб.рф */
.reference-floating-contact {
  min-width: 210px;
  right: 20px;
  bottom: 20px;
  transition: opacity .28s ease, transform .28s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .28s;
}
.reference-floating-contact img { width: 48px; height: 48px; }
.reference-floating-contact small { margin-top: 2px; font-size: 13px; }
.reference-floating-contact.is-visible { transition-delay: 0s; }
.widget-chat-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 40px 20px 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility 0s linear .28s;
}
.widget-chat-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.widget-chat-modal__overlay { position: absolute; inset: 0; background: transparent; }
.widget-chat-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 360px;
  height: min(660px, calc(100vh - 60px));
  max-width: 100%;
  max-height: calc(100vh - 60px);
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid #43ae45;
  border-radius: 25px;
  background: #fff;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(.985);
  transform-origin: right bottom;
  transition: opacity .28s ease, transform .28s cubic-bezier(.22, 1, .36, 1);
  will-change: opacity, transform;
}
.widget-chat-modal[aria-hidden="false"] .widget-chat-modal__dialog { opacity: 1; transform: none; }
.widget-chat-modal__header { position: relative; display: flex; align-items: center; gap: 10px; flex: 0 0 70px; box-sizing: border-box; padding: 10px; background: #43ae45; color: #fff; }
.widget-chat-modal__header img { width: 50px; height: 50px; border: 0; border-radius: 50%; object-fit: cover; object-position: 50% 18%; }
.widget-chat-modal__status-dot { position: absolute; top: 45px; left: 45px; width: 16px; height: 16px; box-sizing: border-box; border: 2.5px solid #fff; border-radius: 50%; background: #00e676; }
.widget-chat-modal__header strong { display: block; font-size: 16px; line-height: 24px; font-weight: 600; }
.widget-chat-modal__header small { display: block; margin-top: 0; font-size: 13px; line-height: 19.5px; }
.widget-chat-modal__header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.widget-chat-modal__expand, .widget-chat-modal__close { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .2); color: #fff; cursor: pointer; }
.widget-chat-modal__expand { font-size: 18px; line-height: 1; }
.widget-chat-modal__close { position: static; padding: 0 0 3px; font-size: 24px; line-height: 24px; }
.widget-chat-modal__body { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; gap: 8px; overflow: hidden; padding: 12px; background: #f9f9f9; }
.widget-chat-modal__messages { min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 0; background: transparent; }
.widget-chat-modal__bubble { width: fit-content; max-width: 100%; margin: 0 0 15px; padding: 12px 16px; border: 0; border-radius: 18px; background: #f0f9f0; color: #333; font-size: 14px; line-height: 21px; }
.widget-chat-modal__bubble--user { position: relative; margin-left: auto; padding-right: 28px; border-radius: 18px; background: #43ae45; color: #fff; }
.widget-chat-modal__bubble--user::after { position: absolute; right: 8px; bottom: 4px; color: #fff; content: "✓✓"; font-size: 11px; letter-spacing: -3px; line-height: 14px; }
.widget-chat-modal__typing { width: fit-content; margin: 0 0 15px; padding: 12px 16px; border-radius: 18px; background: #f0f9f0; color: #777; font-size: 13px; font-style: italic; line-height: 21px; }
.widget-chat-modal__quick-actions { display: flex; flex-wrap: wrap; flex: 0 0 auto; gap: 8px; padding: 0; }
.widget-chat-modal__quick-actions button { border: 1px solid #d8ecd8; border-radius: 18px; padding: 9px 12px; background: #f5fbf5; color: #70aa72; font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; cursor: pointer; }
.widget-chat-modal__quick-actions button:hover, .widget-chat-modal__quick-actions button:focus-visible { background: #e4f4e5; }
.widget-chat-modal__form { position: static; display: flex; flex: 0 0 auto; min-height: 97px; flex-direction: column; justify-content: flex-end; box-sizing: border-box; padding: 10px 12px; background: #fff; }
.widget-chat-modal__composer { display: flex; align-items: flex-end; gap: 6px; min-height: 44px; border: 0; padding: 0; }
.widget-chat-modal__composer[hidden], .widget-chat-modal__quick-actions[hidden], .widget-chat-modal__consent[hidden] { display: none; }
.widget-chat-modal__attach, .widget-chat-modal__send { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; border: 0; background: transparent; color: #43ae45; cursor: pointer; }
.widget-chat-modal__attach svg, .widget-chat-modal__send svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.widget-chat-modal__attach:disabled { opacity: .65; cursor: default; }
.widget-chat-modal__input { min-height: 44px; max-height: 100px; flex: 1; box-sizing: border-box; resize: none; border: 1px solid #43ae45; border-radius: 18px; padding: 11px 18px 10px; outline: none; color: #333; font: 400 14px/19.6px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.widget-chat-modal__input:disabled { background: #f6f7f6; }
.widget-chat-modal__mic { display: block; }
.widget-chat-modal__arrow { display: none; }
.widget-chat-modal--has-text .widget-chat-modal__mic { display: none; }
.widget-chat-modal--has-text .widget-chat-modal__arrow { display: block; }
.widget-chat-modal__submit { width: 100%; border: 0; border-radius: 12px; padding: 12px 14px; background: #43ae45; color: #fff; font: 600 14px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; cursor: pointer; }
.widget-chat-modal__consent { padding-top: 10px; font-size: 12px; line-height: 1.35; }
.widget-chat-modal__consent label { display: flex; align-items: flex-start; gap: 7px; font-weight: 400; }
.widget-chat-modal__consent input { margin-top: 2px; accent-color: #42ae45; }
.widget-chat-modal__consent a { display: inline-block; margin: 5px 0 0 23px; color: #258b2b; }
.widget-chat-modal__form .lead-form-status { margin-top: 10px; font-size: 13px; }
.widget-chat-modal__branding { display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 4px 12px; color: #999; font-size: 10px; line-height: 16px; text-align: center; white-space: nowrap; }
.widget-chat-modal__branding a { color: #999; text-decoration: none; }
.widget-chat-modal--expanded .widget-chat-modal__dialog { width: min(640px, calc(100vw - 40px)); height: min(660px, calc(100vh - 60px)); }
body.widget-chat-open { overflow: hidden; }
@media (max-width: 600px) {
  .widget-chat-modal { align-items: flex-end; padding: 0; }
  .widget-chat-modal__dialog, .widget-chat-modal--expanded .widget-chat-modal__dialog { width: 100%; height: min(660px, calc(100vh - 18px)); max-height: calc(100vh - 18px); border-radius: 25px 25px 0 0; }
  .widget-chat-modal__dialog { transform: translate3d(0, 18px, 0) scale(.99); transform-origin: center bottom; }
}
@media (max-width: 768px) {
  .reference-floating-contact { right: 10px; bottom: 76px; min-width: auto; padding: 5px; }
  .reference-floating-contact img { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .reference-floating-contact, .widget-chat-modal, .widget-chat-modal__dialog { transition: none; }
}

/* Keep the compact mobile header from inheriting the legacy menu layout.
   The old stylesheet gives .header__logo a 100% flex-basis at tablet widths;
   combined with the new header this creates an oversized, mostly empty card
   and pushes the logo/menu button far below the contact row. */
@media (max-width: 768px) {
  #popup-calc.quiz-complete {
    width: 100%;
    max-width: none;
  }

  #popup-calc.quiz-complete .popup__content {
    padding: 32px 25px 24px;
  }

  .header__container {
    display: block;
  }

  .header__left {
    display: grid !important;
    grid-template-columns: 52px minmax(0, 1fr) 60px;
    grid-template-areas: "logo contacts burger";
    align-items: center;
    min-height: 0 !important;
    height: auto !important;
    gap: 8px;
  }

  .header__mobile-contacts {
    grid-area: contacts;
    align-items: center;
    justify-content: center;
    min-height: 0;
  }

  .header__mobile-contacts-top {
    justify-content: flex-start;
  }

  .header__logo {
    grid-area: logo;
    flex: 0 0 auto !important;
    flex-basis: auto !important;
    width: 52px !important;
    max-width: 52px !important;
    min-width: 0;
    height: auto !important;
  }

  .header__logo img {
    display: block;
    width: 100%;
    height: auto;
  }

  .header__burger {
    grid-area: burger;
    align-self: center;
    min-height: 0;
  }
}

/* Keep the "Начать списание" form balanced after removing the email field. */
#universal-popup form[data-lead-form-id="form-06"] .forms_column__popup {
  max-width: 455px;
}

#universal-popup form[data-lead-form-id="form-06"] .form-row {
  margin-bottom: 14px;
}

#universal-popup form[data-lead-form-id="form-06"] .consent-group {
  margin-top: 10px;
}

@media (max-width: 480px) {
  #universal-popup form[data-lead-form-id="form-06"] .form-row {
    margin-bottom: 10px;
  }
}
