/* Premium — карточки платных возможностей и экран подписки. */

.premium-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(27, 27, 29, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.premium-backdrop[hidden] {
  display: none;
}

.premium-modal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  width: min(100%, 980px);
  height: min(874px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  color: #111114;
  background: #ffffff;
  border-radius: 34px;
  box-shadow: 0 26px 80px rgba(45, 35, 28, 0.24);
}

.premium-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #111114;
  background: rgba(255, 255, 255, 0.82);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.premium-close:hover {
  background: #ffffff;
}

.premium-close:focus-visible {
  outline: 2px solid #111114;
  outline-offset: 3px;
}

/* ── Левая колонка: витрина функции ─────────────────────────────────── */

.premium-showcase {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 34px 30px 22px;
  background: var(--premium-tint, #dbe9ff);
  transition: background-color 260ms ease;
}

.premium-stage {
  display: grid;
  place-items: center;
  flex: 1 1 auto;
  min-height: 0;
  padding: 6px 0 20px;
}

.premium-shot {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  object-position: center;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(23, 23, 28, 0.18);
}

.premium-slide-copy {
  flex: 0 0 auto;
  text-align: center;
}

.premium-slide-copy h3 {
  margin: 0 0 10px;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.premium-slide-copy p {
  margin: 0 auto;
  max-width: 34ch;
  color: #43434a;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

.premium-slider-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  margin-top: 22px;
}

.premium-nav-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #111114;
  background: rgba(255, 255, 255, 0.72);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 140ms ease, opacity 140ms ease;
}

.premium-nav-button:hover {
  background: #ffffff;
}

.premium-nav-button:focus-visible {
  outline: 2px solid #111114;
  outline-offset: 3px;
}

.premium-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.premium-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  background: rgba(17, 17, 20, 0.24);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.premium-dot.is-active {
  background: #111114;
  transform: scale(1.28);
}

.premium-dot:focus-visible {
  outline: 2px solid #111114;
  outline-offset: 3px;
}

/* ── Правая колонка: подписка ───────────────────────────────────────── */

.premium-offer {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 40px 36px 30px;
  overflow-y: auto;
  scrollbar-width: none;
}

.premium-offer::-webkit-scrollbar {
  display: none;
}

.premium-modal:focus {
  outline: none;
}

.premium-offer h2 {
  margin: 0 0 22px;
  padding-right: 46px;
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
}

.premium-plans {
  display: grid;
  gap: 10px;
}

.premium-plan {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  color: #111114;
  background: #f1f1f4;
  border: 2px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  text-align: left;
}

.premium-plan.is-active {
  background: #ffffff;
  border-color: #111114;
}

.premium-plan:focus-visible {
  outline: 2px solid #111114;
  outline-offset: 3px;
}

.premium-plan-name {
  flex: 0 0 auto;
}

.premium-plan-badge {
  flex: 0 0 auto;
  padding: 3px 8px;
  color: #ffffff;
  background: #111114;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.premium-plan-price {
  flex: 1 1 auto;
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.premium-plan-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: transparent;
  background: transparent;
  border: 1.5px solid rgba(17, 17, 20, 0.32);
  border-radius: 50%;
}

.premium-plan-mark .coolicon {
  --coolicon-size: 13px;
}

.premium-plan.is-active .premium-plan-mark {
  color: #ffffff;
  background: #111114;
  border-color: #111114;
}

.premium-feature-list {
  display: grid;
  gap: 11px;
  /* Список длинный — прокручивается сам, чтобы кнопка оплаты оставалась на виду. */
  max-height: min(38vh, 420px);
  margin: 22px 0 0;
  padding: 0 4px 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}

.premium-feature-list::-webkit-scrollbar {
  width: 8px;
}

.premium-feature-list::-webkit-scrollbar-thumb {
  background: rgba(17, 17, 20, 0.18);
  background-clip: content-box;
  border: 2px solid transparent;
  border-radius: 999px;
}

.premium-feature-list li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #111114;
  font-size: 15px;
  font-weight: 500;
}

.premium-feature-list li .coolicon {
  --coolicon-size: 15px;
  justify-self: center;
  color: #111114;
}

.premium-feature-list li.is-current {
  font-weight: 750;
}

.premium-note {
  min-height: 18px;
  margin: 22px 0 0;
  color: #8a8a92;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  text-wrap: balance;
}

.premium-note.is-error {
  color: #c7253e;
}

.premium-cta {
  min-height: 58px;
  margin-top: 16px;
  color: #ffffff;
  background: #111114;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 17px;
  font-weight: 750;
}

.premium-cta:hover {
  background: #26262c;
}

.premium-cta:disabled {
  cursor: wait;
  opacity: .62;
}

.premium-cta:focus-visible {
  outline: 2px solid #111114;
  outline-offset: 4px;
}

.premium-legal {
  margin: 12px 0 0;
  color: #8a8a92;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.premium-legal a {
  color: inherit;
  text-underline-offset: 2px;
}

.premium-payment-toast {
  position: fixed;
  z-index: 100000;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  max-width: min(520px, calc(100vw - 28px));
  padding: 13px 18px;
  color: #fff;
  background: #111114;
  border-radius: 999px;
  box-shadow: 0 12px 36px rgb(0 0 0 / 20%);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  transform: translateX(-50%);
}

.premium-payment-toast.is-success {
  background: #176b39;
}

.premium-payment-toast.is-error {
  background: #b42038;
}

/* ── Планшет ────────────────────────────────────────────────────────── */

/* На узких экранах прокручивается вся карточка, поэтому список не делаем
   вложенным скроллом, а кнопку оплаты держим на виду. */
@media (max-width: 900px) {
  .premium-feature-list {
    max-height: none;
    overflow: visible;
  }

  .premium-cta {
    position: sticky;
    bottom: 8px;
  }

  .premium-modal {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    height: auto;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .premium-modal::-webkit-scrollbar {
    display: none;
  }

  .premium-showcase {
    padding: 30px 24px 18px;
  }

  .premium-shot {
    max-height: 240px;
  }

  .premium-offer {
    padding: 28px 24px 26px;
    overflow: visible;
  }
}

/* ── Мобильный: нижний лист ─────────────────────────────────────────── */

@media (max-width: 620px) {
  .premium-backdrop {
    align-items: end;
    padding: 0;
  }

  .premium-modal {
    width: 100%;
    max-height: 94dvh;
    border-radius: 28px 28px 0 0;
  }

  .premium-close {
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
  }

  .premium-showcase {
    padding: 32px 18px 16px;
  }

  .premium-stage {
    padding: 4px 0 16px;
  }

  .premium-shot {
    max-height: min(180px, 24dvh);
    border-radius: 14px;
  }

  .premium-slide-copy h3 {
    font-size: 21px;
  }

  .premium-slide-copy p {
    max-width: 30ch;
    font-size: 14px;
  }

  .premium-slider-nav {
    margin-top: 16px;
  }

  .premium-offer {
    padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
  }

  .premium-offer h2 {
    padding-right: 0;
    font-size: 28px;
    text-align: center;
  }

  .premium-plan {
    min-height: 54px;
    font-size: 14px;
  }

  .premium-feature-list li {
    font-size: 14px;
  }

  .premium-note {
    height: auto;
    min-height: 18px;
    line-height: 1.4;
    white-space: normal;
  }

  .premium-cta {
    min-height: 54px;
    font-size: 16px;
  }
}

@media (max-width: 380px) {
  .premium-plan {
    padding: 0 13px;
    gap: 8px;
  }

  .premium-plan-badge {
    padding: 2px 6px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .premium-showcase,
  .premium-dot {
    transition: none;
  }
}

/* One comparison axis: monthly price. Annual charge stays with its term. */
.premium-plan{display:grid;grid-template-columns:minmax(0,1fr) auto 22px;gap:16px;min-height:84px;padding:16px 18px}
.premium-plan-description{display:flex;flex-direction:column;gap:7px;min-width:0}
.premium-plan-heading{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.premium-plan-badge{background:#e9e5f8;color:#493979;font-size:11px;padding:3px 7px;line-height:1.2}
.premium-plan-price{display:flex;align-items:baseline;justify-content:flex-end;gap:4px;font-size:24px;line-height:1.2;white-space:nowrap;letter-spacing:-.025em}
.premium-plan-unit{font-size:13px;font-weight:450;color:#55555e;letter-spacing:0}
.premium-plan-billing{color:#55555e;font-size:13px;font-weight:450;line-height:1.3}
@media(max-width:380px){.premium-plan{padding:14px 12px;gap:10px;min-height:80px}.premium-plan-price{font-size:22px}.premium-plan-heading{gap:6px}.premium-plan-billing{font-size:12px}.premium-plan-unit{font-size:12px}}

/* The same cropped phone presentation as the landing page. */
.premium-stage{padding:0 0 26px;align-items:center;overflow:hidden;min-height:230px}
.premium-phone{position:relative;width:min(100% - 12px,320px);height:390px;max-height:100%;box-sizing:border-box;border:8.855px solid #111114;border-bottom:0;border-radius:50px 50px 0 0;background:var(--phone-surface,#fff);padding-top:43px;isolation:isolate}
.premium-phone:before{content:"";position:absolute;top:8px;left:50%;transform:translateX(-50%);width:88px;height:24px;border-radius:20px;background:#050505}
.premium-phone:after{content:"";position:absolute;left:-12px;top:120px;width:3px;height:25px;border-radius:2px;background:#111114;box-shadow:0 40px #111114,0 75px #111114}
.premium-phone-key{position:absolute;right:-12px;top:180px;width:3px;height:48px;background:#111114;border-radius:2px}
.premium-phone-screen{height:100%;overflow:hidden;background:var(--phone-surface,#fff)}
.premium-phone .premium-shot{width:100%;height:auto;max-height:none;object-fit:initial;border-radius:0;box-shadow:none;display:block}
@media(max-width:900px){.premium-stage{flex:none;min-height:0;padding-bottom:24px}.premium-phone{width:280px;height:320px}}
@media(max-width:620px){.premium-phone{width:270px;height:300px;border-radius:45px 45px 0 0;padding-top:39px}.premium-phone:before{height:22px;width:78px}.premium-stage{padding-bottom:22px}}
.premium-phone.is-panel{width:100%;height:auto;max-height:390px;padding:0;border:0;border-radius:12px;overflow:hidden;background:transparent}
.premium-phone.is-panel:before,.premium-phone.is-panel:after,.premium-phone.is-panel .premium-phone-key{display:none}
.premium-phone.is-panel .premium-phone-screen{height:auto;max-height:390px;background:transparent}
.premium-phone.is-panel .premium-shot{max-height:390px;object-fit:contain}

/* Focus the integration screenshot on the Telegram connection row. */
.premium-phone.is-telegram{height:auto}
.premium-phone.is-telegram .premium-phone-screen{height:auto;aspect-ratio:auto}
.premium-phone.is-telegram .premium-shot{margin-top:0}

.premium-phone.is-telegram:after,.premium-phone.is-telegram .premium-phone-key{display:none}
