/*
 * javired.com — Pricing v3 PREMIUM
 */

/* ─── Toggle ──────────────────────────────────────────── */
.pricing__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-12);
}

.pricing__toggle-label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--t-fast);
}

.pricing__toggle-label.active { color: var(--text-primary); font-weight: var(--fw-semibold); }

.pricing__toggle-switch {
    position: relative;
    width: 52px; height: 28px;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--t-base);
    flex-shrink: 0;
}

.pricing__toggle-switch.annual {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: var(--glow-accent-sm);
}

.pricing__toggle-slider {
    position: absolute;
    top: 3px; left: 3px;
    width: 20px; height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--t-base);
    pointer-events: none;
    box-shadow: var(--shadow-sm);
}

.pricing__toggle-switch.annual .pricing__toggle-slider {
    transform: translateX(24px);
}

.savings-badge {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--success);
    background: var(--success-dim);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    margin-left: var(--space-2);
    border: 1px solid rgba(16,185,129,0.2);
    opacity: 0;
    transform: scale(0.8) translateY(4px);
    transition: all var(--t-base);
}

.savings-badge.visible { opacity: 1; transform: scale(1) translateY(0); }

/* ─── Grid ────────────────────────────────────────────── */
.pricing__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
    max-width: 1060px;
    margin-inline: auto;
    align-items: center;
}

@media (min-width: 768px) { .pricing__grid { grid-template-columns: repeat(3, 1fr); } }

/* ─── Base Pricing Card ───────────────────────────────── */
.pricing-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: transform 350ms var(--ease-out), box-shadow 350ms var(--ease-out), border-color 350ms ease;
}

/* Dark mode card bg */
[data-theme="dark"] .pricing-card,
:root .pricing-card {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-md);
}

/* Light mode card bg */
[data-theme="light"] .pricing-card {
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.pricing-card:hover {
    transform: translateY(-6px);
}

[data-theme="dark"] .pricing-card:hover,
:root .pricing-card:hover {
    box-shadow: var(--shadow-xl), 0 0 0 1px var(--border-accent);
    border-color: var(--border-accent);
}

[data-theme="light"] .pricing-card:hover {
    box-shadow: var(--shadow-xl);
    border-color: rgba(109,40,217,0.15);
}

/* Light mode pricing hover — lighten text for contrast */
[data-theme="light"] .pricing-card:hover .pricing-card__name {
    color: #ffffff;
}

[data-theme="light"] .pricing-card:hover .pricing-card__subtitle {
    color: rgba(255, 255, 255, 0.70);
}

[data-theme="light"] .pricing-card:hover .pricing-card__amount {
    color: #ffffff;
}

[data-theme="light"] .pricing-card:hover .pricing-card__currency {
    color: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .pricing-card:hover .pricing-period {
    color: rgba(255, 255, 255, 0.65);
}

[data-theme="light"] .pricing-card:hover .pricing-card__cuota {
    color: rgba(255, 255, 255, 0.65);
}

[data-theme="light"] .pricing-card:hover .pricing-card__cuota strong {
    color: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .pricing-card:hover .pricing-card__features li {
    color: rgba(255, 255, 255, 0.80);
}

[data-theme="light"] .pricing-card:hover .pricing-card__badge {
    color: rgba(255, 255, 255, 0.80);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.20);
}

/* ─── Card header ─────────────────────────────────────── */
.pricing-card__header { margin-bottom: var(--space-6); }

.pricing-card__badge {
    display: inline-block;
    font-size: 11px;
    font-weight: var(--fw-semibold);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

[data-theme="light"] .pricing-card__badge {
    background: var(--bg-tertiary);
    border-color: var(--border);
}

.pricing-card__badge--popular {
    color: var(--accent-secondary);
    background: var(--accent-dim);
    border-color: var(--border-accent);
}

.pricing-card__badge--enterprise {
    color: var(--gold);
    background: var(--gold-dim);
    border-color: rgba(245,158,11,0.25);
}

.pricing-card__name {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: var(--fw-extrabold);
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1;
    transition: color 350ms ease;
}

.pricing-card__subtitle {
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

/* ─── Price ───────────────────────────────────────────── */
.pricing-card__price {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-bottom: 4px;
}

.pricing-card__currency {
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: var(--text-secondary);
    align-self: flex-start;
    margin-top: 8px;
}

.pricing-card__amount {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: var(--fw-black);
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.03em;
    transition: opacity 200ms ease, transform 200ms var(--ease-out), color 350ms ease;
}

.pricing-card__amount.price-changing {
    opacity: 0;
    transform: translateY(-6px);
}

.pricing-period {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    align-self: flex-end;
    margin-bottom: 6px;
}

.pricing-card__cuota {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-6);
}

.pricing-card__cuota strong { color: var(--text-secondary); }

/* ─── Separator ───────────────────────────────────────── */
.pricing-card__sep {
    height: 1px;
    background: var(--border);
    margin-bottom: var(--space-6);
}

/* ─── Features ────────────────────────────────────────── */
.pricing-card__features {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
}

.pricing-card__features li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    transition: color 350ms ease;
}

.pricing-card__features li.included::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    min-width: 18px;
    background: var(--success-dim);
    color: var(--success);
    border-radius: 50%;
    font-size: 10px;
    font-weight: var(--fw-bold);
    margin-top: 1px;
}

/* ═══════════════════════════════════════════════════════
   POPULAR CARD — Full gradient treatment
   ═══════════════════════════════════════════════════════ */
.pricing-card--popular {
    border-color: transparent;
    position: relative;
}

/* Gradient border via wrapper trick */
.pricing-card--popular::before {
    content: '';
    position: absolute;
    inset: -1.5px;
    background: var(--gradient-primary);
    border-radius: calc(var(--radius-2xl) + 2px);
    z-index: -1;
}

[data-theme="dark"] .pricing-card--popular,
:root .pricing-card--popular {
    background: linear-gradient(180deg, rgba(109,40,217,0.12) 0%, var(--bg-secondary) 40%);
    box-shadow: var(--glow-accent), var(--shadow-2xl);
}

[data-theme="light"] .pricing-card--popular {
    background: linear-gradient(180deg, rgba(109,40,217,0.04) 0%, #fff 40%);
    box-shadow: var(--shadow-xl), 0 0 0 1.5px rgba(109,40,217,0.3);
}

.pricing-card--popular:hover { transform: translateY(-8px); }

.pricing-card--popular .pricing-card__name {
    background: var(--gradient-hero-text);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (min-width: 768px) {
    .pricing-card--popular {
        transform: scale(1.04);
    }
    .pricing-card--popular:hover {
        transform: scale(1.04) translateY(-8px);
    }
}

/* ═══════════════════════════════════════════════════════
   ENTERPRISE CARD — Gold
   ═══════════════════════════════════════════════════════ */
.pricing-card--enterprise {
    border-color: rgba(245,158,11,0.2);
}

[data-theme="dark"] .pricing-card--enterprise,
:root .pricing-card--enterprise {
    background: linear-gradient(180deg, rgba(245,158,11,0.06) 0%, var(--bg-secondary) 40%);
}

.pricing-card--enterprise:hover {
    border-color: rgba(245,158,11,0.4);
    box-shadow: var(--glow-gold), var(--shadow-xl);
}

.pricing-card--enterprise .pricing-card__name { color: var(--gold); }

/* Enterprise CTA */
.pricing-card__cta--enterprise {
    background: transparent;
    border-color: var(--gold);
    color: var(--gold);
}

.pricing-card__cta--enterprise:hover {
    background: var(--gold-dim);
    box-shadow: var(--glow-gold);
    color: var(--gold-light);
    transform: translateY(-2px);
}

/* ─── Note ────────────────────────────────────────────── */
.pricing__note {
    text-align: center;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-top: var(--space-8);
}

.pricing__note a { color: var(--accent-primary); font-weight: var(--fw-medium); }
