/* 2.css — стили только для 2.html (Тарифы) */

/* app-shell — единственный скролл-контейнер */
.app-shell{
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  min-height: 100%;
  padding-top: calc(var(--header-h) + env(safe-area-inset-top));
  padding-bottom: calc(var(--bottom-h) + var(--safe-bottom, 0px));
}

/* ─────────────────────────────
 * Header (фикс)
 * ───────────────────────────── */
.tariffs-header--fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding-top: env(safe-area-inset-top);
  z-index: 40;
}

.tariffs-header__pad {
  padding: 12px 16px 0 16px;
}

.tariffs-header__card {
  border-radius: 15px;
  padding: 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.tariffs-header__icon {
  font-size: 30px;
  color: #FF9F0A;
}

.tariffs-header__title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
}

.tariffs-header__subtitle {
  margin: 5px 0 0 0;
  font-size: 14px;
  line-height: 16px;
  color: #8e8e93;
  font-weight: 500;
}

/* Переходы для шапки тарифов */
#tariff-header > * {
  transition:
    opacity 0.5s ease,
    transform 0.5s ease,
    margin 0.5s ease,
    height 0.5s ease,
    padding 0.5s ease;
}

/* ПЛАВНЫЙ SHRINK HEADER */
#tariff-header.shrink-header{
  position: relative;
  transform: translateY(calc(-4px * var(--tariffs-shrink-progress)));
  padding-top: calc(16px * (1 - var(--tariffs-shrink-progress)));
  padding-bottom: calc(6px + 4px * (1 - var(--tariffs-shrink-progress)));
  border-radius: calc(15px * (1 - var(--tariffs-shrink-progress)));
  box-shadow: none;
  background: none !important;
  pointer-events: none;
  overflow: hidden;
}

#tariff-header.shrink-header::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to top, #151517, #2f2f32);
  opacity: calc(1 - var(--tariffs-shrink-progress));
  pointer-events: none;
  z-index: 0;
}

#tariff-header.shrink-header > *{
  position: relative;
  z-index: 1;
}

#tariff-header .header-icon{
  width: calc(58px - 18px * var(--tariffs-shrink-progress));
  height: calc(58px - 18px * var(--tariffs-shrink-progress));
  border-radius: calc(12px - 4px * var(--tariffs-shrink-progress));
}

#tariff-header .header-icon i{
  font-size: calc(30px - 8px * var(--tariffs-shrink-progress));
}

#tariff-header .tariffs-header__title{
  margin-top: calc(3px * (1 - var(--tariffs-shrink-progress)));
  margin-bottom: 0;
  font-size: calc(20px - 5px * var(--tariffs-shrink-progress));
  line-height: calc(1.2 - 0.1 * var(--tariffs-shrink-progress));
}

#tariff-header .tariffs-header__subtitle{
  margin-top: calc(5px * (1 - var(--tariffs-shrink-progress)));
  max-height: calc(32px * (1 - var(--tariffs-shrink-progress)));
  opacity: calc(1 - var(--tariffs-shrink-progress));
  overflow: hidden;
  transform:
    translateY(calc(-6px * var(--tariffs-shrink-progress)))
    scale(calc(1 - 0.08 * var(--tariffs-shrink-progress)));
  transform-origin: top center;
}

.combo-border { border: 1px solid rgba(255, 255, 255, 0.08); }

/* header-icon */
.header-icon {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background:
    linear-gradient(to top, #141414, #313131) padding-box,
    linear-gradient(#68686B, #545457) border-box;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─────────────────────────────
 * Plans list
 * ───────────────────────────── */
.plans-section {
  padding-left: 16px;
  padding-right: 16px;
  margin-bottom: 24px;
}

.plans-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.plans-empty {
  font-size: 14px;
  color: #9ca3af;
}

/* ─────────────────────────────
 * Trial card
 * ───────────────────────────── */
.trial-card {
  margin-bottom: 16px;
  padding: 6px 16px 16px 16px;
  border-radius: 16px;
  background: #2D823D;
  backdrop-filter: blur(18px);
}

.trial-card__head {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 8px;
}

.trial-card__gift {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
}

.trial-card__gift-icon {
  font-size: 23px;
  color: #fff;
}

.trial-card__title {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0px;
}

.trial-card__text {
  color: #d1d1d6;
  font-size: 14px;
  line-height: 17px;
  margin-bottom: 12px;
}

.trial-card__note {
  font-size: 14px;
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.4);
}

.trial-card__note-text{
  margin: 0;
  line-height: 1.25;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.trial-card__note-strong {
  font-weight: 600;
  color: #fff;
  margin-right: 6px;
}

.trial-card__note-link {
  font-weight: 600;
  color: #0A84FF;
  margin: 0 0 0 6px;
}

.trial-card__note-link i { margin-right: 6px; }

/* pulse */
.pulse-glow {
  animation: heartbeat-green 2.8s ease-in-out infinite;
  will-change: transform, box-shadow;
}

@keyframes heartbeat-green {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(60, 220, 130, 0), 0 0 0 rgba(60, 220, 130, 0) inset; }
  10% { transform: scale(1.17); box-shadow: 0 0 18px rgba(60, 220, 130, 0.85), 0 0 10px rgba(60, 220, 130, 0.55) inset; }
  20% { transform: scale(1.08); box-shadow: 0 0 10px rgba(60, 220, 130, 0.55), 0 0 6px rgba(60, 220, 130, 0.35) inset; }
  32% { transform: scale(1.14); box-shadow: 0 0 14px rgba(60, 220, 130, 0.75), 0 0 8px rgba(60, 220, 130, 0.45) inset; }
  42% { transform: scale(1.05); box-shadow: 0 0 8px rgba(60, 220, 130, 0.4), 0 0 5px rgba(60, 220, 130, 0.3) inset; }
  60% { transform: scale(1); box-shadow: 0 0 3px rgba(60, 220, 130, 0.18), 0 0 2px rgba(60, 220, 130, 0.15) inset; }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(60, 220, 130, 0), 0 0 0 rgba(60, 220, 130, 0) inset; }
}

/* ─────────────────────────────
 * Plan card
 * ───────────────────────────── */
.plan-card {
  padding: 12px;
  border-radius: 16px;
  position: relative;
  cursor: pointer;
  background: #1C1C1E;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.04);
  outline: none;
  transition: transform .2s ease, background .2s ease;
}

.plan-card:hover {
  transform: translateY(-2px);
  background: #2C2C2E;
}

.plan-card--default { border: 1px solid rgba(255,255,255,0.08); }

.plan-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.plan-head-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.plan-icon{
  flex: 0 0 auto;
}

.plan-title-wrap { min-width: 0; }

.plan-title {
  margin: 0;
  font-weight: 600;
  color: #fff;
  line-height: 1.15;
  font-size: 18px;
  letter-spacing: 0.2px;
  flex: 1 1 auto;
}

.plan-lead {
  margin-top: 6px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.05;
}

.plan-lead-text { min-width: 0; }

.plan-divider {
  height: 1px;
  width: 100%;
  background: #3A3A3C;
  margin-bottom: 12px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1.35;
}

.plan-feature-text { min-width: 0; }

.plan-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #6b7280;
  flex: 0 0 5px;
  margin-top: 5px;
}

.plan-price { text-align: right; line-height: 1; }
.plan-price-value { font-weight: 800; color: #fff; font-size: 24px; }
.plan-price-unit { color: #6b7280; font-size: 15px; margin-left: 0px; }

.plan-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #f59e0b;
  color: #111827;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 12px;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  z-index: 2;
}

/* ─────────────────────────────
 * Modals / Sheet
 * ───────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: .9s;
}

.sheet--wb { background: linear-gradient(to bottom, #ff10d7, #151517); }
.sheet--ozon { background: linear-gradient(to bottom, #006eff, #151517); }
.sheet--combo { background: linear-gradient(to bottom, #ff10d7, #006eff, #151517); }
.sheet--reviews { background: linear-gradient(to bottom, #ff9900, #151517); }
.sheet--ransoms { background: linear-gradient(to bottom, #00ab14, #151517); }

.sheet__top { padding: 16px; }

.sheet__scroll {
  max-height: 70vh;
  overflow-y: auto;
  padding: 0 16px 8px;
}

.sheet__body {
  padding-bottom: 12px;
  color: #e5e5ea;
  font-size: 14px;
  line-height: 24px;
}

.sheet__bottom { padding: 16px; }

/* кнопка */
.btn {
  width: 100%;
  margin: 0;
  padding: 10px 16px;
  border-radius: 12px;
  background-color: #2C2C2E;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.btn:hover { background-color: #3A3A3C; }
.btn:active { background-color: rgba(58, 58, 60, 0.9); transform: scale(0.99); }
.btn:disabled { opacity: 0.4; cursor: default; }

/* sticky header inside sheet */
.plan-info-sticky {
  position: sticky;
  top: 0;
  z-index: 10;
  transition: transform .5s ease, opacity .5s ease, padding .5s ease;
  will-change: transform, opacity;
}

.plan-info-sticky.plan-info-sticky--compact {
  transform: scale(0.65) translateY(8px);
  transform-origin: top center;
  opacity: 0.7;
}

.plan-info-top {
  background: linear-gradient(to top, #151517, #2f2f32);
  border-radius: 20px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.plan-info-top__row { display: flex; align-items: center; gap: 12px; }
.plan-info-top__meta { min-width: 0; }
.plan-info-top__title { color: #fff; font-weight: 600; }
.plan-info-top__subtitle { font-size: 14px; line-height: 20px; color: #9ca3af; }

/* ─────────────────────────────
 * Plan modal components
 * ───────────────────────────── */
.plan-stack > * + * { margin-top: 16px; }
.plan-stack-sm > * + * { margin-top: 12px; }

.plan-panel {
  border-radius: 24px;
  background: #1C1C1E;
  border: 1px solid rgba(255,255,255,0.10);
}

.plan-panel--media { overflow: hidden; }
.plan-panel__pad { padding: 16px; }

.plan-text{
  font-size: 13px;
  line-height: 1.5;
  color: #9ca3af;
  margin: 0;
}

.plan-text + .plan-text { margin-top: 6px; }
.plan-text-strong { color: #F2F2F7; }

.plan-section-title{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 15px 0;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  color: #fff;
}

.plan-section-title__icon{
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
}

.plan-section-title__icon i{
  font-size: 12px;
  color: #1C1C1E;
}

.plan-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-list__item{
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.plan-list__dot{
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.80);
  margin-top: 7px;
  flex: 0 0 6px;
  opacity: 0.8;
}

.plan-list__text{
  font-size: 13px;
  line-height: 1.3;
  color: #9ca3af;
}

.plan-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.plan-tile{
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  padding: 10px 12px;
}

.plan-tile__head{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #e5e7eb;
  margin-bottom: 0px;
}

.plan-tile__head i { color: rgba(255,255,255,0.90); }

.plan-tile__text{
  font-size: 11px;
  line-height: 1.35;
  color: #9ca3af;
  margin: 0;
}

.plan-media{
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.plan-media__inner{
  position: absolute;
  inset: 0;
}

.plan-media iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.plan-galleryWrap { margin-top: 12px; }

.plan-gallery{
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding-bottom: 8px;
}

.plan-gallery img{
  height: 160px;
  border-radius: 20px;
  background: #1f2937;
  flex: 0 0 auto;
}

.plan-btn{
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  user-select: none;
  transition: background .2s ease, transform .15s ease;
}

.plan-btn:active{ transform: scale(0.97); }

.plan-btn--ghost{
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.20);
  color: #e5e7eb;
}

.plan-btn--ghost:hover{ background: rgba(255,255,255,0.10); }
.plan-btn__ext{ font-size: 11px; opacity: 0.6; }

.plan-footer{
  margin-top: 20px;
  padding: 14px;
  text-align: center;
}

.plan-footer__text{
  margin: 0 0 8px 0;
  font-size: 12px;
  line-height: 1.3;
  color: #f3f4f6;
}

.plan-footer__infoIcon{
  margin-right: 4px;
  font-size: 15px;
  color: #fff;
  vertical-align: -2px;
}

/* RW mini cards */
.plan-cards{
  display: grid;
  gap: 10px;
}

.plan-miniCard{
  display: flex;
  align-items: center;
  gap: 12px;
  background: #2C2C2E;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 20px;
  padding: 12px 14px;
}

.plan-miniCard__icon{
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: #3A3A3C;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
}

.plan-miniCard__icon i{ font-size: 13px; color: #fff; }
.plan-miniCard__meta{ display: flex; flex-direction: column; min-width: 0; }
.plan-miniCard__label{ font-size: 13px; color: #98989F; }
.plan-miniCard__value{ font-size: 17px; line-height: 1.15; font-weight: 600; color: #fff; }

.plan-warn{
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 7px 0 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #9ca3af;
}

.plan-warn i{ font-size: 12px; color: #fff; margin-top: 3px; }

/* ─────────────────────────────
 * Image overlay modal
 * ───────────────────────────── */
.image-card { cursor: pointer; }

.plan-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.plan-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(75, 85, 99, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
}

.plan-dots .dot.active {
  background: #b2b2b2;
  transform: scale(1.2);
}

.img-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .9);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
}

.img-modal.open { display: flex; }

.img-modal-content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 12px;
}

.img-modal-close,
.img-modal-nav {
  position: absolute;
  width: 44px;
  height: 44px;
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #e5e7eb;
}

.img-modal-close { top: 20px; right: 20px; }
.img-modal-nav { top: 50%; transform: translateY(-50%); }
.img-modal-nav.prev { left: 20px; }
.img-modal-nav.next { right: 20px; }

.img-modal-close::before,
.img-modal-close::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background: #e5e7eb;
  border-radius: 1px;
}

.img-modal-close::before { transform: rotate(45deg); }
.img-modal-close::after { transform: rotate(-45deg); }

.img-modal-nav::before {
  content: '';
  width: 12px;
  height: 12px;
  border: 2px solid #e5e7eb;
  border-bottom: none;
  border-right: none;
}

.img-modal-nav.prev::before { transform: rotate(-45deg); margin-left: 3px; }
.img-modal-nav.next::before { transform: rotate(135deg); margin-right: 3px; }

.btn-secondary {
  margin-top: 10px;
  width: 100%;
  padding: 12px 0;
  border-radius: 9999px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f3f4f6;
  transition: 0.2s;
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.10); }
.btn-secondary:active { transform: scale(0.97); }
.btn-secondary i { font-size: 20px; line-height: 1; }
.btn-secondary span { font-size: 15px; }

/* ─────────────────────────────
 * FAQ
 * ───────────────────────────── */
.faq{
  padding: 20px;
  margin-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.faq__inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.faq__icon i{
  color: #fff;
  font-size: 25px;
}

.faq__title{
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
  color: #fff;
  margin: 5px 0 0 0;
}

.faq__subtitle{
  margin: 4px 0 0 0;
  font-size: 13px;
  line-height: 18px;
  color: #9ca3af;
}

.faq__buttons{
  width: 300px;
  margin: 4px 0;
}

/* безопасность: если ширина маленькая */
@media (max-width: 360px){
  .faq__buttons{ width: 100%; }
}

/* Desktop app-like layout (>= 1024px) */
@media (min-width: 1024px) {
  .tariffs-header--fixed{
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(960px, calc(100% - 32px));
  }

  .tariffs-header--fixed{
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    overflow: hidden;
  }

  .modal .sheet{
    left: 50%;
    right: auto;
    width: min(960px, calc(100% - 32px));
    transform: translateX(-50%) translateY(100%);
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
  }

  .modal.active .sheet{
    transform: translateX(-50%) translateY(0);
  }
}

/* mobile only */
@media (max-width: 1023px){
  .plans-section{
    padding-top: 12px;
  }
}
