/* assets/css/pricing.css
   PRICING page only. */

/* Hero backdrop */
.pr-hero-glow {
    position: absolute;
    top: -6rem;
    left: 50%;
    transform: translateX(-50%);
    width: 46rem;
    height: 30rem;
    background: radial-gradient(ellipse at center, rgba(79,70,229,0.14) 0%, transparent 65%);
    z-index: 0;
    pointer-events: none;
}
.dark .pr-hero-glow {
    background: radial-gradient(ellipse at center, rgba(99,102,241,0.22) 0%, transparent 65%);
}

/* Segmented PWA toggle */
.price-toggle {
    position: relative;
    display: inline-flex;
    padding: 0.3rem;
    border-radius: 9999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}
.dark .price-toggle { background: #1e293b; border-color: #334155; }

.price-toggle .pt-opt {
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    min-width: 8rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.55rem 1.4rem;
    border-radius: 9999px;
    color: #64748b;
    transition: color var(--transition-base);
    white-space: nowrap;
}
.dark .price-toggle .pt-opt { color: #94a3b8; }
.price-toggle .pt-opt.active { color: #ffffff; }

/* Sliding pill — sits under the active option */
.price-toggle .pt-slider {
    position: absolute;
    top: 0.3rem;
    bottom: 0.3rem;
    left: 0.3rem;
    width: calc(50% - 0.3rem);
    border-radius: 9999px;
    background: var(--color-primary);
    box-shadow: 0 4px 14px 0 rgba(79,70,229,0.35);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    z-index: 0;
}
.price-toggle.pwa .pt-slider { transform: translateX(100%); }

/* Popular card emphasis */
.plan-popular {
    box-shadow: 0 20px 45px -20px rgba(79,70,229,0.45);
}
.plan-popular::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    padding: 1px;
    background: linear-gradient(135deg, rgba(99,102,241,0.5), rgba(139,92,246,0.2));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

/* PWA-only feature row: hidden until PWA mode is on */
.plan-pwa-feature { display: none; }
.pwa-on .plan-pwa-feature { display: flex; }

/* Alt price lines toggle with mode */
.plan-alt-pwa { display: none; }
.pwa-on .plan-alt-standard { display: none; }
.pwa-on .plan-alt-pwa { display: block; }

/* Subtle price swap animation */
.plan-price { transition: opacity 0.18s ease; }
.plan-price.swapping { opacity: 0; }

/* Duration toggle (monthly / 3m / 6m / yearly) */
.dur-toggle {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
    padding: 0.35rem;
    border-radius: 1.1rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    max-width: 32rem;
    margin: 0 auto;
}
.dark .dur-toggle { background: #1e293b; border-color: #334155; }
@media (min-width: 640px) {
    .dur-toggle { grid-template-columns: repeat(4, 1fr); border-radius: 9999px; max-width: 40rem; }
}

.dur-opt {
    position: relative;
    border-radius: 0.85rem;
    padding: 0.5rem 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.25;
    color: #64748b;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.dark .dur-opt { color: #94a3b8; }
@media (min-width: 640px) { .dur-opt { border-radius: 9999px; padding: 0.5rem 0.75rem; } }
.dur-opt:hover { color: #4f46e5; }
.dark .dur-opt:hover { color: #a5b4fc; }
.dur-opt.active {
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(79,70,229,0.35);
}
.dur-opt.active:hover { color: #ffffff; }
.dur-save {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 0.85;
    margin-top: 0.1rem;
}

/* Price/strike swap animation */
.plan-per, .plan-alt-price, .plan-strike { transition: opacity 0.18s ease; }
.plan-price.swapping, .plan-alt-price.swapping, .plan-strike.swapping { opacity: 0; }

/* Responsive polish */
@media (max-width: 380px) {
    .price-toggle .pt-opt { min-width: 6.5rem; padding: 0.55rem 0.9rem; font-size: 0.82rem; }
}
