/* Модальное окно «Связаться с нами» — стилистика сайта LMS Solution */

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.contact-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.contact-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 30, 70, 0.55);
  backdrop-filter: blur(6px);
}

.contact-modal__card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--bg, #ffffff);
  border-radius: var(--radius, 24px);
  padding: 32px 28px 28px;
  box-shadow: 0 24px 60px rgba(0, 30, 70, 0.25);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s ease;
  outline: none;
}

.contact-modal.is-open .contact-modal__card {
  transform: none;
}

.contact-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: var(--bg-soft, #f3f3f4);
  color: var(--brand-dark, #001e46);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.contact-modal__close:hover {
  background: var(--brand, #fa8c19);
  color: #ffffff;
}

.contact-modal__title {
  margin: 0 36px 6px 0;
  font-family: Oswald, Inter, Arial, sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--brand-dark, #001e46);
}

.contact-modal__subtitle {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text, #222e3d);
  opacity: 0.75;
}

.contact-modal__options {
  display: grid;
  gap: 10px;
}

.contact-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 18px 10px 10px;
  border: 1px solid rgba(0, 30, 70, 0.12);
  border-radius: 999px;
  background: transparent;
  font: inherit;
  text-align: left;
  text-decoration: none;
  color: var(--brand-dark, #001e46);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.contact-option:hover,
.contact-option:focus-visible,
.contact-option.is-expanded {
  border-color: var(--brand, #fa8c19);
  box-shadow: 0 6px 18px rgba(0, 30, 70, 0.1);
  transform: translateY(-1px);
}

.contact-option__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: #ffffff;
}

.contact-option__icon--tg { background: #229ed9; }
.contact-option__icon--wa { background: #25d366; }
.contact-option__icon--call { background: var(--brand, #fa8c19); }

/* MAX: официальный логотип с собственным градиентом, обрезаем в круг */
.contact-option__icon--max {
  background: #6862f0;
  overflow: hidden;
}

.contact-option__icon--max svg {
  display: block;
  width: 100%;
  height: 100%;
}

.contact-option__text {
  flex: 1;
  display: grid;
  gap: 1px;
  min-width: 0;
}

.contact-option__text strong {
  font-family: Oswald, Inter, Arial, sans-serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.contact-option__text small {
  font-size: 13px;
  color: var(--text, #222e3d);
  opacity: 0.65;
}

.contact-option__arrow {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--brand, #fa8c19);
  transition: transform 0.2s ease;
}

.contact-option:hover .contact-option__arrow {
  transform: translateX(3px);
}

/* ─── Панель «Позвонить» с QR-кодом (показывается на компьютерах) ─── */

.contact-modal__qr {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: var(--bg-band, #f7f8fb);
}

/* display: flex выше перебивает атрибут hidden — возвращаем ему силу,
   иначе панель видна до нажатия на «Позвонить» */
.contact-modal__qr[hidden] {
  display: none;
}

.contact-modal__qr-code {
  flex: 0 0 auto;
  width: 132px;
  height: 132px;
  padding: 8px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 30, 70, 0.08);
}

.contact-modal__qr-code svg {
  display: block;
  width: 100%;
  height: 100%;
}

.contact-modal__qr-info {
  display: grid;
  gap: 6px;
}

.contact-modal__qr-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand, #fa8c19);
}

.contact-modal__qr-info strong {
  font-size: 17px;
  color: var(--brand-dark, #001e46);
}

.contact-modal__qr-info small {
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(34, 46, 61, 0.7);
}

.contact-modal__copy {
  justify-self: start;
  padding: 8px 14px;
  border: 1px solid rgba(0, 30, 70, 0.18);
  border-radius: 999px;
  background: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-dark, #001e46);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.contact-modal__copy:hover {
  border-color: var(--brand, #fa8c19);
}

/* ─── Форма «Обратный звонок» ─────────────────────────────────
   Скрыта выключателем FEATURES.callbackForm в script.js;
   стили оставлены, чтобы форму можно было включить одной строкой */

.contact-modal__callback {
  margin-top: 16px;
}

.contact-modal__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-dark, #001e46);
}

.contact-modal__callback-row {
  display: flex;
  gap: 8px;
}

.contact-modal__input {
  flex: 1;
  min-width: 0;
  padding: 12px 18px;
  border: 1px solid rgba(0, 30, 70, 0.18);
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  color: var(--text, #222e3d);
  outline: none;
  transition: border-color 0.2s ease;
}

.contact-modal__input:focus {
  border-color: var(--brand, #fa8c19);
}

.contact-modal__send {
  flex: 0 0 auto;
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  background: var(--brand, #fa8c19);
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.contact-modal__send:hover {
  filter: brightness(1.07);
}

.contact-modal__send:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Согласие на обработку персональных данных */
.contact-modal__consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(34, 46, 61, 0.75);
  cursor: pointer;
}

.contact-modal__consent-box {
  flex: 0 0 auto;
  margin-top: 2px;
  width: 15px;
  height: 15px;
  accent-color: var(--brand, #fa8c19);
  cursor: pointer;
}

.contact-modal__consent a {
  color: var(--brand-dark, #001e46);
  text-decoration: underline;
}

.contact-modal__consent a:hover {
  color: var(--brand, #fa8c19);
}

/* Поле-ловушка для спам-ботов: визуально скрыто */
.contact-modal__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.contact-modal__done {
  margin: 16px 0 0;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--bg-band, #f7f8fb);
  font-size: 15px;
  color: var(--brand-dark, #001e46);
}

@media (max-width: 480px) {
  .contact-modal__card {
    padding: 26px 18px 20px;
  }

  .contact-modal__title {
    font-size: 23px;
  }

  .contact-modal__callback-row {
    flex-direction: column;
  }
}
