/* ===================================================================
   Тёмный дизайн модалок (как fg-modal на главной) для старых модалок
   подстраниц (.modal / #cert-modal из styles.css + main.js).
   Подключать ПОСЛЕ styles.css — переопределяет светлую тему.
   =================================================================== */

.modal__scrim {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal__panel {
  background: #161616;
  border: 1px solid #262626;
  box-shadow: none;
}

@media (min-width: 720px) {
  .modal__panel { border-radius: 16px; }
}

.modal__head {
  background: #161616;
  border-bottom: 1px solid #262626;
  backdrop-filter: none;
}

.modal__head h3 {
  color: #f1f1ef;
}

.modal__head .card__tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(112, 59, 247, 0.18);
  color: #a594fd;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: none;
}

.modal__close {
  background: transparent;
  border: 1px solid #3a3a3a;
  color: #adadad;
}

.modal__close:hover {
  background: transparent;
  color: #ffffff;
  border-color: #666666;
}

.modal__body {
  background: #161616;
}

.modal__body h4 {
  color: #f1f1ef;
}

.modal__body p,
.modal__lead {
  color: #adadad;
}

.modal__foot {
  background: #161616;
  border-top: 1px solid #262626;
}

/* Кнопки в футере модалки — как на главной */
.modal__foot .btn--primary {
  background: #703bf7;
  color: #ffffff;
  border: none;
  border-radius: 8px;
}

.modal__foot .btn--primary:hover {
  background: #7d4cf8;
}

.modal__foot .btn--ghost {
  background: transparent;
  border: 1px solid #3a3a3a;
  color: #f1f1ef;
  border-radius: 8px;
}

.modal__foot .btn--ghost:hover {
  border-color: #703bf7;
  background: transparent;
}

/* Просмотр сертификата */
.cert-view {
  background: #0d0d0d;
  border-radius: 8px;
}

.cert-view--err::after {
  color: #999999;
}

.cert-doc {
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid #262626;
  border-radius: 8px;
}

.cert-doc:hover {
  transform: none;
  box-shadow: none;
  border-color: #703bf7;
}

.cert-doc__ic {
  background: rgba(112, 59, 247, 0.18);
  color: #a594fd;
}

.cert-doc__t b {
  color: #f1f1ef;
}

.cert-doc__t span {
  color: #999999;
}

.cert-doc__go {
  color: #a594fd;
}

/* Списки внутри модалок продуктов (если появятся на подстраницах) */
.modal ul.ticks li {
  color: #adadad;
}

.modal ul.ticks .ck {
  background: rgba(0, 173, 49, 0.18);
  color: #00ad31;
  border-radius: 50%;
}

/* Крестик закрытия — справа сверху во всех модалках */
.modal__head { position: relative; padding-right: 64px; }
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
}


/* ===== Стили fg-modal для подстраниц (копия из figma-home.css) ===== */
/* ===== Модальные окна (Figma node 85:21480) ===== */
.fg-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.fg-modal.is-open { display: flex; }
.fg-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.fg-modal__panel {
  position: relative;
  width: 560px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: #161616;
  border: 1px solid #262626;
  border-radius: 16px;
  padding: 32px;
}
.fg-modal__panel--center { text-align: center; width: 480px; }
.fg-modal__panel--wide { width: 720px; }
.fg-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 1px solid #3a3a3a;
  border-radius: 50%;
  background: transparent;
  color: #adadad;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fg-modal__close:hover { color: #fff; border-color: #666; }
.fg-modal__title {
  margin: 0 0 12px;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
  color: #f1f1ef;
}
.fg-modal__subtitle {
  margin: 0 0 24px;
  font-weight: 400;
  font-size: 14px;
  line-height: 21px;
  color: #adadad;
}
.fg-modal__form { display: flex; flex-direction: column; gap: 16px; }
.fg-modal__field { display: flex; flex-direction: column; gap: 8px; }
.fg-modal__label {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.4;
  color: #ffffff;
}
.fg-modal__input {
  height: 44px;
  padding: 0 14px;
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid #262626;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #f1f1ef;
  outline: none;
}
.fg-modal__input::placeholder { color: #666; }
.fg-modal__input:focus { border-color: #703bf7; }
.fg-modal__submit {
  margin-top: 8px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: #703bf7;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: #ffffff;
  cursor: pointer;
}
.fg-modal__submit:hover { background: #7d4cf8; }
.fg-modal__submit--sm {
  width: 220px;
  margin: 0 auto;
  display: block;
}
.fg-modal__note {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 18px;
  color: #999999;
}
.fg-modal__note a { color: #a594fd; text-decoration: underline; }
.fg-modal__check {
  width: 56px;
  height: 56px;
  margin: 8px auto 20px;
  display: block;
}
.fg-modal__doc { margin-bottom: 24px; }
.fg-modal__doc-img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 8px;
  background: #0d0d0d;
}
.fg-modal__pdf {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid #262626;
  border-radius: 8px;
  color: #f1f1ef;
  font-size: 14px;
  line-height: 20px;
}
.fg-modal__pdf:hover { border-color: #703bf7; }
.fg-modal__pdf img { width: 36px; height: 36px; }
.fg-modal__pdf b { font-size: 15px; }
.fg-modal__foot { display: flex; gap: 12px; justify-content: flex-end; }
.fg-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
}
.fg-modal__btn--primary { background: #703bf7; color: #fff; }
.fg-modal__btn--primary:hover { background: #7d4cf8; }
.fg-modal__btn--ghost {
  background: transparent;
  border: 1px solid #3a3a3a;
  color: #f1f1ef;
}
.fg-modal__btn--ghost:hover { border-color: #703bf7; }
