/* ═══════════════════════════════════════════════════════════
   SHARED PLAN CARD STYLES
   Loaded by both the pricing page and the dashboard layout.
   ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   BILLING TOGGLE
   ═══════════════════════════════════════════════════════════ */
.billing-toggle-wrap {
    display: inline-flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.billing-toggle {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
    position: relative;
    white-space: nowrap;
}

.billing-toggle:hover:not(.active) {
    color: var(--text);
    background: rgba(var(--primary-rgb), 0.05);
}

.billing-toggle.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.35);
}

.billing-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.25);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.45rem;
    border-radius: 20px;
    text-transform: uppercase;
}

.billing-toggle.active .billing-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════════
   PLANS GRID
   ═══════════════════════════════════════════════════════════ */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .plans-grid { grid-template-columns: 1fr; }
}

/* ── Plan card ── */
.plan-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
    position: relative;
    overflow: hidden;
}

/* Subtle top accent stripe */
.plan-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    opacity: 0.35;
    transition: opacity 0.25s;
}

.plan-card:hover {
    border-color: rgba(var(--primary-rgb), 0.45);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(var(--bg-rgb), 0.35), 0 0 0 1px rgba(var(--primary-rgb), 0.15);
}

.plan-card:hover::before {
    opacity: 1;
}

.plan-card.plan-card--current {
    border-color: var(--primary);
    border-width: 2px;
    background: linear-gradient(160deg, rgba(var(--primary-rgb), 0.1) 0%, var(--surface) 55%);
}

.plan-card.plan-card--current::before {
    opacity: 0.8;
}

.plan-tier {
    font-family: 'JetBrains Mono', 'Monaco', monospace;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    opacity: 0.85;
}

.plan-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 1.25rem;
}

/* ── Price block ── */
.plan-price-block {
    margin-bottom: 1.25rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    line-height: 1;
}

.plan-price-amount {
    font-size: 2.75rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--primary);
}

.plan-price-period {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.plan-price-monthly-eq {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.plan-price-monthly-eq strong {
    color: var(--text);
}

/* ── Trial badge ── */
.plan-trial-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    width: 100%;
    box-sizing: border-box;
}

.plan-trial-badge__header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.plan-trial-badge__limits {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    width: 100%;
}

.plan-trial-limit {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
}


/* ── Key metrics ── */
.plan-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.25rem;
}

.plan-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
}

.plan-metric-label {
    color: var(--text-muted);
}

.plan-metric-value {
    font-family: 'JetBrains Mono', 'Monaco', monospace;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-bright);
    background: rgba(var(--primary-rgb), 0.05);
    border: 1px solid var(--border);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
}

/* ── Feature list ── */
.plan-features {
    flex: 1;
    margin-bottom: 1.5rem;
}

.plan-features--shrink {
    flex: 0 0 auto;
}

.plan-features-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-subtle);
    margin-bottom: 0.75rem;
}

.plan-features ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: var(--text);
}

.plan-features li.disabled {
    opacity: 0.35;
    color: var(--text-muted);
}

.check-icon { color: var(--success); flex-shrink: 0; }
.cross-icon { color: var(--text-subtle); flex-shrink: 0; }

/* ── CTA ── */
.plan-cta {
    margin-top: auto;
}

.btn-plan {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.18s ease;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--text-bright);
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.35);
}

.btn-plan:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.5);
}

.btn-plan:disabled {
    opacity: 0.5;
    cursor: default;
    background: var(--bg-elevated);
    color: var(--text-muted);
    box-shadow: none;
    border: 1px solid var(--border);
}

/* button_to puts class on the <button>, form always gets class="button_to" */
.plan-cta form {
    display: block;
    width: 100%;
}

.btn-plan-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.18s ease;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--text-bright);
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.35);
}

.btn-plan-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.5);
}

.btn-plan-form--secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border-soft);
    box-shadow: none;
}

.btn-plan-form--secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: none;
    transform: none;
}
