/* ============================================================
   Ловец лидов 20РЕФ — стили
   Все классы с префиксом .lc- , чтобы ничего не пересекалось
   с существующими стилями сайта.
   ============================================================ */

.lc-root {
  --lc-accent: var(--color-foreground-accent, #1762ba);
  --lc-accent-hover: var(--color-foreground-accent-hover, #164FB0);
  --lc-accent-soft: #F2F7FD;
  --lc-ink: #0F1419;
  --lc-ink-2: #3C4653;
  --lc-ink-3: #4A5563;
  --lc-muted: #8A95A2;
  --lc-line: #DDE1E6;

  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lc-root.is-open { display: flex; }

.lc-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 20, 0.72);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.lc-root.is-visible .lc-overlay { opacity: 1; }

/* ---------------- Окно ---------------- */

.lc-modal {
  position: relative;
  display: flex;
  width: 860px;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5);
  transform: translateY(18px) scale(0.985);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(.2, .8, .3, 1), opacity 0.3s ease;
}

.lc-root.is-visible .lc-modal {
  transform: none;
  opacity: 1;
}

.lc-photo {
  width: 310px;
  flex: none;
  background-size: cover;
  background-position: center;
  background-color: #E7EAEE;
}

.lc-content {
  flex: 1;
  min-width: 0;
  padding: 28px 34px 26px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.lc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.lc-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--lc-accent);
  padding-top: 6px;
}

.lc-close {
  width: 30px;
  height: 30px;
  flex: none;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--lc-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lc-close:hover { background: #F1F3F5; color: var(--lc-ink); }

/* ---------------- Текстовый блок ---------------- */

.lc-screen { display: flex; flex-direction: column; }

/* Экраны переключаются атрибутом hidden. Правило .lc-screen выше задаёт
   display:flex и перебило бы браузерное [hidden]{display:none} — поэтому
   скрытие нужно вернуть явно. Без этого оба экрана видны одновременно. */
.lc-root [hidden] { display: none !important; }

.lc-pitch {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.lc-title {
  margin: 0;
  font-size: 25px;
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--lc-ink);
}

.lc-sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--lc-ink-3);
}

.lc-list {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.lc-list li {
  display: flex;
  gap: 10px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--lc-ink-2);
}

.lc-dot { color: var(--lc-accent); }

/* ---------------- Форма ---------------- */

.lc-form { display: flex; flex-direction: column; }

.lc-honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lc-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lc-field { display: flex; flex-direction: column; }

.lc-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid var(--lc-line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--lc-ink);
  background: #fff;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.lc-input::placeholder { color: #9AA4AF; font-weight: 400; }

.lc-input:focus {
  border-color: var(--lc-accent);
  box-shadow: 0 0 0 3px rgba(23, 98, 186, 0.13);
}

.lc-input.lc-invalid { border-color: #D64545; }

.lc-err {
  display: none;
  padding: 6px 2px 0;
  font-size: 12.5px;
  line-height: 1.35;
  color: #D64545;
}

.lc-err.is-shown { display: block; }

.lc-ways-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 2px;
}

.lc-ways-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--lc-accent);
}

.lc-ways { display: flex; gap: 8px; }

.lc-way {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 12px 8px;
  border-radius: 10px;
  border: 1.5px solid var(--lc-line);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--lc-ink);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.lc-way:hover { border-color: #C3CBD4; }

.lc-way.is-active {
  border-color: var(--lc-accent);
  background: var(--lc-accent-soft);
}

.lc-phone {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--lc-line);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.lc-phone.is-focus {
  border-color: var(--lc-accent);
  box-shadow: 0 0 0 3px rgba(23, 98, 186, 0.13);
}

.lc-phone.lc-invalid { border-color: #D64545; }

.lc-phone-prefix {
  font-size: 15px;
  font-weight: 600;
  color: var(--lc-ink);
}

.lc-input--phone {
  flex: 1;
  min-width: 0;
  padding: 14px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.lc-input--phone:focus { box-shadow: none; }

.lc-submit {
  width: 100%;
  margin-top: 16px;
  padding: 17px;
  border: 0;
  border-radius: 10px;
  background: var(--lc-accent);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.lc-submit:hover { background: var(--lc-accent-hover); }

.lc-submit.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ---------------- Согласие ---------------- */

.lc-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  cursor: pointer;
  user-select: none;
}

.lc-consent input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.lc-checkmark {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 1px;
  border: 1px solid var(--lc-line);
  border-radius: 5px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.lc-checkmark svg { opacity: 0; transition: opacity 0.15s ease; }

.lc-consent input:checked + .lc-checkmark {
  background: var(--lc-accent);
  border-color: var(--lc-accent);
}

.lc-consent input:checked + .lc-checkmark svg { opacity: 1; }

.lc-consent.lc-invalid .lc-checkmark { border-color: #D64545; }

.lc-consent-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--lc-muted);
}

.lc-consent-text a { color: var(--lc-accent); text-decoration: underline !important; }

.lc-err--consent { padding-left: 26px; }

.lc-fallback {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #EDEFF2;
  font-size: 14px;
  font-weight: 500;
  color: var(--lc-ink-3);
}

.lc-tel { color: var(--lc-accent); font-weight: 700; }

/* ---------------- Экран «спасибо» ---------------- */

.lc-thanks {
  gap: 14px;
  padding: 26px 0 18px;
}

.lc-tick {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #E8F0FD;
  color: var(--lc-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   Мини-плашка снизу
   ============================================================ */

.lc-bar {
  --lc-accent: var(--color-foreground-accent, #1762ba);
  --lc-accent-hover: var(--color-foreground-accent-hover, #164FB0);

  position: fixed;
  z-index: 9500;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 720px;
  margin-inline: auto;
  display: none;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border-radius: 14px;
  background: #0F1419;
  box-shadow: 0 18px 40px rgba(15, 20, 25, 0.28);
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(.2, .8, .3, 1), opacity 0.3s ease;
}

.lc-bar.is-open { display: flex; }
.lc-bar.is-visible { transform: none; opacity: 1; }

@media (min-width: 1101px) {
  .lc-bar { right: 170px; }
}

.lc-bar-icon {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
}

.lc-bar-texts {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lc-bar-title { font-size: 15px; font-weight: 700; color: #fff; }
.lc-bar-sub { font-size: 13px; line-height: 1.4; color: #9AA6B4; }

.lc-bar-form { display: flex; align-items: center; gap: 10px; }

.lc-bar-input {
  width: 180px;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #2C3540;
  border-radius: 9px;
  background: #161D25;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  outline: none;
  transition: border-color 0.18s ease;
}

.lc-bar-input::placeholder { color: #6D7A88; }
.lc-bar-input:focus { border-color: var(--lc-accent); }
.lc-bar-input.lc-invalid { border-color: #D64545; }

.lc-bar-submit {
  padding: 13px 20px;
  border: 0;
  border-radius: 9px;
  background: var(--lc-accent);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.lc-bar-submit:hover { background: var(--lc-accent-hover); }
.lc-bar-submit.is-loading { opacity: 0.6; pointer-events: none; }

.lc-bar-open { display: none; }

.lc-bar-close {
  flex: none;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #6D7A88;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.lc-bar-close:hover { color: #fff; background: #1B232C; }

.lc-bar.is-done .lc-bar-form,
.lc-bar.is-done .lc-bar-open { display: none; }

.lc-bar-done {
  display: none;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.lc-bar.is-done .lc-bar-done { display: block; }

/* ============================================================
   Адаптив
   ============================================================ */

@media (max-width: 900px) {
  .lc-root { padding: 0; align-items: flex-end; }

  .lc-modal {
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    flex-direction: column;
    border-radius: 20px 20px 0 0;
    transform: translateY(40px) scale(1);
  }

  .lc-photo {
    width: 100%;
    height: 104px;
    flex: none;
  }

  .lc-content { padding: 16px 20px 22px; }

  /* крестик уводим поверх фотографии */
  .lc-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--lc-ink);
  }

  .lc-close:hover { background: #fff; }

  .lc-title { font-size: 21px; }
  .lc-sub { font-size: 14px; }
  .lc-list li { font-size: 14px; }
  .lc-list { gap: 6px; }
  .lc-pitch { gap: 8px; margin-bottom: 14px; }
  .lc-submit { padding: 16px; font-size: 15px; }
  .lc-fallback { font-size: 13px; }
}

@media (max-width: 760px) {
  .lc-bar {
    left: 12px;
    right: 92px;
    bottom: 16px;
    gap: 12px;
    padding: 12px 14px;
  }

  .lc-bar-sub { display: none; }
  .lc-bar-title { font-size: 14px; }
  .lc-bar-form { display: none; }
  .lc-bar-open {
    display: block;
    padding: 11px 14px;
    border: 0;
    border-radius: 9px;
    background: var(--lc-accent);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
  }
}

@media (max-width: 420px) {
  .lc-bar-icon { display: none; }
}

/* Блокировка прокрутки страницы, пока окно открыто */
body.lc-scroll-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .lc-overlay,
  .lc-modal,
  .lc-bar { transition: none; }
}
