/* ============================================================
   Fly Magic — SVG-абонементы (pricing.html)
   Подключается ПОСЛЕ style.css / desktop.css / theme.css.
   Единый дизайн во всех фильтрах; стрелка «свернуть» не используется —
   в окне остаётся только кнопка «закрыть».
   ============================================================ */

/* --- исходная разметка карточки скрыта (остаётся в DOM для SEO / no-JS) --- */
html body .price-card.fm-ready.fm-ready > .price-card-top,
html body .price-card.fm-ready.fm-ready > .price-card-content,
html body .price-card.fm-ready.fm-ready > .price-badge { display: none !important; }

html body .price-card.fm-ready.fm-ready {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  transform: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html body .price-card.fm-ready.fm-ready::before,
html body .price-card.fm-ready.fm-ready::after { display: none !important; }

/* ---------- шторка (мобильная, свёрнутая) ---------- */
.fm-strip-wrap {
  width: 100%;
  filter: drop-shadow(0 12px 18px rgba(8, 3, 28, .55));
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.fm-strip {
  position: relative;
  display: block;
  width: 100%;
  height: var(--fm-h, 92px);
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 24px;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  /* вырезы-«надрывы» на линии перфорации (69 % ширины) */
  -webkit-mask: radial-gradient(circle 9px at 69% 0, transparent 96%, #000 100%), radial-gradient(circle 9px at 69% 100%, transparent 96%, #000 100%);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(circle 9px at 69% 0, transparent 96%, #000 100%) intersect, radial-gradient(circle 9px at 69% 100%, transparent 96%, #000 100%);
  mask-composite: intersect;
}
/* мягкий блик */
.fm-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, .13) 50%, transparent 62%);
  background-size: 250% 100%;
  background-position: 150% 0;
  animation: fmSheen 6s linear infinite;
}
@keyframes fmSheen { to { background-position: -60% 0; } }
@media (prefers-reduced-motion: reduce) { .fm-strip::after { animation: none; } }
.fm-strip:active { transform: scale(.985); }
.fm-strip:focus-visible { outline: 2px solid #cbb6ff; outline-offset: 3px; }
@media (hover: hover) { .fm-strip-wrap:hover { transform: translateY(-2px); } }

/* ---------- полный абонемент (окно на мобильных, карточка на десктопе) ---------- */
.fm-full {
  width: 100%;
  filter: drop-shadow(0 18px 28px rgba(6, 2, 22, .5));
  font-family: 'Manrope', -apple-system, 'Segoe UI', sans-serif;
}
.fm-top {
  border-radius: 26px 26px 0 0;
  overflow: hidden;
  -webkit-mask: radial-gradient(circle 13px at 0 100%, transparent 96%, #000 100%), radial-gradient(circle 13px at 100% 100%, transparent 96%, #000 100%);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(circle 13px at 0 100%, transparent 96%, #000 100%) intersect, radial-gradient(circle 13px at 100% 100%, transparent 96%, #000 100%);
  mask-composite: intersect;
}
.fm-top svg { display: block; width: 100%; height: auto; }
.fm-body {
  padding: 22px 24px 24px;
  border-radius: 0 0 26px 26px;
  background: linear-gradient(165deg, #2c1358 0%, #230f48 100%);
  -webkit-mask: radial-gradient(circle 13px at 0 0, transparent 96%, #000 100%), radial-gradient(circle 13px at 100% 0, transparent 96%, #000 100%);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(circle 13px at 0 0, transparent 96%, #000 100%) intersect, radial-gradient(circle 13px at 100% 0, transparent 96%, #000 100%);
  mask-composite: intersect;
}
.fm-feat { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.fm-feat li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 14.5px;
  line-height: 1.4;
  color: #ece4f8;
}
.fm-feat li svg { flex: none; margin-top: 2px; }
.fm-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(135deg, #8d5fe6, #5b32b8);
  border: 1px solid rgba(227, 216, 255, .5);
  box-shadow: 0 10px 26px -8px rgba(124, 75, 224, .8);
  transition: transform .2s, filter .2s;
}
.fm-cta:hover { transform: translateY(-2px); filter: brightness(1.1); }

/* ---------- мобильная раскладка шторок (< 1100px) ---------- */
@media (max-width: 1099px) {
  html body .price-card.fm-ready.fm-ready .fm-full { display: none; }
  html body .price-card.fm-ready.fm-ready {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    align-self: stretch !important;
  }
  html body .pricing-grid {
    flex: 0 0 auto !important;
    justify-content: flex-start !important;
    gap: 12px !important;
  }
  html body .pricing-group.active {
    justify-content: flex-start !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
  }
}

/* ---------- десктоп (≥ 1100px): полный абонемент в карточке ---------- */
@media (min-width: 1100px) {
  .fm-strip-wrap { display: none; }
  html body .pricing-grid {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px 14px !important;
    max-width: 1560px !important;
    width: 100% !important;
  }
  html body .pricing-group { width: 100%; }
  html body .section.pricing { padding-left: 20px !important; padding-right: 20px !important; box-sizing: border-box; }
  html body .price-card.fm-ready.fm-ready {
    /* ровно 5 абонементов в ряд */
    flex: 0 0 calc((100% - 56px) / 5);
    max-width: calc((100% - 56px) / 5);
    min-width: 0;
    transition: transform .25s ease;
  }
  html body .price-card.fm-ready.fm-ready:hover { transform: translateY(-6px) !important; }
}

/* ---------- окно абонемента ---------- */
html body .price-modal .price-modal-container { max-width: 420px; }
html body .price-modal .price-modal-content {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  border: 0 !important;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  scrollbar-width: none;
}
html body .price-modal .price-modal-content::-webkit-scrollbar { display: none; }
html body .price-modal .price-modal-content::before,
html body .price-modal .price-modal-content::after { display: none !important; }

/* единственная кнопка в окне — «закрыть» */
html body .price-modal .price-modal-close {
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  z-index: 2105;
  background: rgba(20, 8, 50, .55) !important;
  border: 1px solid rgba(227, 216, 255, .45) !important;
  color: #fff !important;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
html body .price-modal .price-modal-close svg { width: 16px; height: 16px; }
html body .price-modal .price-modal-content .fm-full { filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .6)); }

/* равная высота карточек на десктопе, кнопка «Записаться» всегда внизу */
.fm-full { display: flex; flex-direction: column; }
.fm-top { flex: none; }
.fm-body { flex: 1 1 auto; display: flex; flex-direction: column; }
.fm-feat { flex: 1 1 auto; }
@media (min-width: 1100px) {
  html body .price-card.fm-ready.fm-ready > .fm-full { flex: 1 1 auto; }
}
@media (min-width: 1100px) {
  html body .pricing-grid { align-items: stretch !important; }
  html body .price-card.fm-ready.fm-ready { align-self: stretch !important; display: flex !important; flex-direction: column; }
}

/* ---------- маркер «Популярный»: пульсирующая точка жёлтый → красный ---------- */
.fm-dot-core, .fm-dot-ring {
  fill: #ffd24a;
  transform-box: fill-box;
  transform-origin: center;
}
.fm-dot-core { animation: fmDotColor 2.4s ease-in-out infinite, fmDotBeat 2.4s ease-in-out infinite; filter: drop-shadow(0 0 5px rgba(255, 200, 60, .8)); }
.fm-dot-ring { animation: fmDotColor 2.4s ease-in-out infinite, fmDotRing 2.4s ease-out infinite; opacity: 0; }
@keyframes fmDotColor { 0%, 100% { fill: #ffd24a; } 50% { fill: #ff3b30; } }
@keyframes fmDotBeat  { 0%, 100% { transform: scale(.88); } 50% { transform: scale(1.12); } }
@keyframes fmDotRing  { 0% { transform: scale(1); opacity: .65; } 100% { transform: scale(2.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .fm-dot-core, .fm-dot-ring { animation: none; }
  .fm-dot-ring { display: none; }
}

/* на десктопе в 5 колонок карточка уже — слегка уменьшаем отступы и текст списка */
@media (min-width: 1100px) {
  .fm-body { padding: 18px 16px 18px; }
  .fm-feat { gap: 9px; margin-bottom: 18px; }
  .fm-feat li { font-size: 13px; gap: 8px; }
  .fm-feat li svg { width: 15px; height: 15px; margin-top: 2px; }
  .fm-cta { height: 46px; font-size: 14.5px; }
}
