/* ============================================
   Модалка регистрации на вебинар
   Figma M0cL0pIzzKJIJZQKQrEitV, окно 7981:2519 (1063×549):
   тёмная панель, колонка контента 603 по центру, поле-подчёркивание
   из tv-register; «спасибо» — из набора 7853:4872
   ============================================ */

.webinar-modal {
  align-items: flex-start;
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 40px var(--pad);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 100;
}

/* Атрибут hidden сам по себе бессилен против display:flex выше. */
.webinar-modal[hidden] {
  display: none;
}

.webinar-modal__overlay {
  background: rgba(26, 12, 4, 0.6);
  bottom: 0;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
}

.webinar-modal__window {
  background: var(--c-dark-gray, #222222);
  margin: auto;
  max-width: 1063px;
  padding: 80px 40px;
  position: relative;
  width: 100%;
}

.webinar-modal__close {
  align-items: center;
  background: none;
  border: 0;
  cursor: pointer;
  display: flex;
  height: 24px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 16px;
  top: 16px;
  transition: opacity 0.2s ease;
  width: 24px;
}

.webinar-modal__close:hover {
  opacity: 0.6;
}

/* Крестик из промо-бара тёмный — на тёмном окне перекрашиваем в светлый. */
.webinar-modal__close img {
  filter: brightness(0) invert(1);
  height: 16px;
  width: 16px;
}

/* Колонка контента 603, по центру окна (макет: 190 + 603 + 190) */
.webinar-modal__body,
.webinar-modal__success {
  margin-inline: auto;
  max-width: 603px;
}

/* Заголовок: Noto Serif Display Italic ~56, как в макете */
.webinar-modal__title {
  color: var(--c-white);
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.9vw, 56px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

.webinar-modal__title em {
  font-style: italic;
}

.webinar-modal__text {
  color: var(--c-cream); /* макет: #efede8, не чисто-белый */
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  margin-top: 16px;
}

.webinar-modal__form {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 40px;
}

/* Поле-подчёркивание. Свой класс, а не tv-register__input: тот живёт
   в tv-feed.css, которого нет на главной — модалка самодостаточна. */
.webinar-modal__input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(239, 237, 232, 0.4);
  border-radius: 0;
  color: var(--c-cream);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 12px 0;
  text-transform: uppercase;
  width: 100%;
}

.webinar-modal__input::placeholder {
  color: #7c7c7c; /* макет: нейтральный серый */
}

.webinar-modal__input:focus {
  border-bottom-color: var(--c-terracotta-dark);
  outline: none;
}

/* Кнопка макета 390×53 с галочкой; сверх ширины не тянем */
.webinar-modal__btn {
  align-self: flex-start;
}

.webinar-modal__btn img {
  filter: brightness(0) invert(1);
  height: 15px;
  width: 15px;
}

.webinar-modal__note {
  color: #7c7c7c; /* макет: нейтральный серый, не тёплый серый темы */
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
}

.webinar-modal .form-message {
  color: var(--c-cream);
}

/* ---------- «Спасибо» (7853:4872, вариант Success) ---------- */

.webinar-modal__success {
  display: none;
  text-align: center;
}

.webinar-modal.is-success .webinar-modal__body {
  display: none;
}

.webinar-modal.is-success .webinar-modal__success {
  display: block;
}

/* Терракотовый круг с белой галочкой над заголовком */
.webinar-modal__success-mark {
  align-items: center;
  background: var(--c-terracotta-dark);
  border-radius: 50%;
  display: inline-flex;
  height: 50px;
  justify-content: center;
  margin-bottom: 32px;
  width: 50px;
}

.webinar-modal__success-mark img {
  filter: brightness(0) invert(1);
  height: 20px;
  width: 20px;
}

@media (max-width: 768px) {
  .webinar-modal {
    padding: 24px var(--pad);
  }

  .webinar-modal__window {
    padding: 56px 24px;
  }
}
