/* Shared Pricing Cards — Modern SaaS Style (Stripe/Linear/Vercel) */

/* ─── Interval Toggle ──────────────────────────────────────────────── */
.cf-plan-interval-toggle {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 1.5rem 0 2.5rem;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.cf-plan-interval-btn {
    padding: 8px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cf-plan-interval-btn.is-active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.cf-plan-save-badge {
    display: inline-block;
    background: #ecfdf5;
    color: #059669;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
}

/* ─── Card Grid ────────────────────────────────────────────────────── */
.cf-plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* ─── Card ─────────────────────────────────────────────────────────── */
.cf-plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.75rem 1.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.cf-plan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.cf-plan-card.is-selected {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99,102,241,0.15), 0 12px 40px rgba(0,0,0,0.06);
}

.cf-plan-card.is-popular {
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    border-color: #e2e8f0;
}

/* Hide radio in selection contexts */
.cf-plan-card input[type="radio"] {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 16px;
    height: 16px;
    accent-color: #6366f1;
}

/* ─── Popular Pill (not ribbon) ────────────────────────────────────── */
.cf-plan-card__popular {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 6px;
    background: #f0f0ff;
    color: #6366f1;
    margin-bottom: 1rem;
    width: fit-content;
}

/* Legacy badge class (for onboarding view compat) */
.cf-plan-card__badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 6px;
    background: #f0f0ff;
    color: #6366f1;
    margin-bottom: 1rem;
    width: fit-content;
    position: static;
    transform: none;
}

/* ─── Head ─────────────────────────────────────────────────────────── */
.cf-plan-card__head {
    margin-bottom: 1.5rem;
}

.cf-plan-card__tagline {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6366f1;
    margin: 0 0 0.375rem;
}

.cf-plan-card__header {
    margin-bottom: 1.5rem;
}

.cf-plan-card__name {
    font-size: 1.375rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.375rem;
    letter-spacing: -0.01em;
}

.cf-plan-card__desc {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* ─── Price ────────────────────────────────────────────────────────── */
.cf-plan-card__price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 1.5rem;
}

.cf-plan-card__amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1;
}

.cf-plan-card__period {
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ─── Divider ──────────────────────────────────────────────────────── */
.cf-plan-card__divider {
    height: 1px;
    background: #f1f5f9;
    margin-bottom: 1.5rem;
}

/* ─── Features ─────────────────────────────────────────────────────── */
.cf-plan-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    flex: 1;
}

.cf-plan-card__features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8125rem;
    color: #334155;
    padding: 5px 0;
    line-height: 1.5;
}

.cf-plan-card__features li svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* ─── Seats ────────────────────────────────────────────────────────── */
.cf-plan-card__seats {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0 0 1.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

/* ─── CTA Button ───────────────────────────────────────────────────── */
.cf-plan-card__cta {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    background: #6366f1;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    text-decoration: none;
    margin-top: auto;
}

.cf-plan-card__cta:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.cf-plan-card__cta:active {
    transform: translateY(0);
}

/* ─── Add-On Line Items ────────────────────────────────────────────── */
.cf-plan-card__addons-heading {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin: 0 0 0.5rem;
}

.cf-plan-card__addons {
    padding: 0;
    margin: 0 0 1.25rem;
    list-style: none;
}

.cf-plan-card__addon {
    list-style: none;
    margin: 0 0 0.5rem;
}

.cf-plan-card__addon:last-child {
    margin-bottom: 0;
}

.cf-plan-card__addon-card {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.625rem 0.75rem;
}

.cf-plan-card__addon-head {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.25rem;
}

.cf-plan-card__addon-title {
    flex: 1;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}

.cf-plan-card__addon-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
}

.cf-plan-card__addon-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: #4f46e5;
    letter-spacing: -0.01em;
}

.cf-plan-card__addon-unit {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
}

.cf-plan-card__addon-included {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Legacy flat layout (kept for backwards compat) */
.cf-plan-card__addon-sep {
    color: #cbd5e1;
}

.cf-plan-card__addon-name {
    flex: 1;
}

.cf-plan-card__addon-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #fff;
    color: #64748b;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.cf-plan-card__addon-info-btn:hover,
.cf-plan-card__addon-info-btn:focus-visible {
    border-color: #6366f1;
    color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
    outline: none;
}

.cf-plan-card__addon-info-content {
    display: none;
}

/* ─── Add-on info modal (? button) ─────────────────────────────────── */
body.cf-addon-info-modal-open {
    overflow: hidden;
}

.cf-addon-info-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
}

.cf-addon-info-modal[hidden] {
    display: none !important;
}

.cf-addon-info-modal__dialog {
    position: relative;
    width: min(100%, 420px);
    max-height: min(80vh, 520px);
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
    padding: 1.5rem 1.5rem 1.25rem;
}

.cf-addon-info-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.cf-addon-info-modal__close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.cf-addon-info-modal__title {
    margin: 0 2rem 0.75rem 0;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.cf-addon-info-modal__body {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #334155;
}

.cf-addon-info-modal__body p {
    margin: 0 0 0.75rem;
}

.cf-addon-info-modal__body ul,
.cf-addon-info-modal__body ol {
    margin: 0 0 0.75rem 1.125rem;
    padding: 0;
}

.cf-addon-info-modal__body li {
    margin-bottom: 0.35rem;
}

.cf-addon-info-modal__body h3,
.cf-addon-info-modal__body h4 {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
    color: #0f172a;
}

.cf-addon-info-modal__body a {
    color: #4f46e5;
    text-decoration: underline;
}

/* Legacy hover tooltip (deprecated) */
.cf-plan-card__addon-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.5625rem;
    font-weight: 700;
    cursor: help;
    flex-shrink: 0;
}

.cf-plan-card__addon-info:hover .cf-plan-card__addon-tip {
    display: block;
}

.cf-plan-card__addon-tip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    right: -8px;
    width: 220px;
    padding: 0.625rem 0.75rem;
    background: #0f172a;
    color: #f1f5f9;
    font-size: 0.6875rem;
    font-weight: 400;
    line-height: 1.5;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 10;
    pointer-events: none;
}

.cf-plan-card__addon-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 12px;
    border: 6px solid transparent;
    border-top-color: #0f172a;
}

/* ─── Dark Mode ────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .cf-plan-interval-toggle {
        background: #1e293b;
    }
    .cf-plan-interval-btn {
        color: #94a3b8;
    }
    .cf-plan-interval-btn.is-active {
        background: #334155;
        color: #f1f5f9;
        box-shadow: none;
    }
    .cf-plan-save-badge {
        background: rgba(5,150,105,0.15);
        color: #6ee7b7;
    }
    .cf-plan-card {
        background: #1e293b;
        border-color: #334155;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }
    .cf-plan-card:hover {
        box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    }
    .cf-plan-card.is-selected {
        border-color: #818cf8;
        box-shadow: 0 0 0 2px rgba(129,140,248,0.2);
    }
    .cf-plan-card__popular,
    .cf-plan-card__badge {
        background: rgba(99,102,241,0.15);
        color: #a5b4fc;
    }
    .cf-plan-card__tagline { color: #a5b4fc; }
    .cf-plan-card__name { color: #f1f5f9; }
    .cf-plan-card__desc { color: #94a3b8; }
    .cf-plan-card__amount { color: #f1f5f9; }
    .cf-plan-card__period { color: #64748b; }
    .cf-plan-card__divider { background: #334155; }
    .cf-plan-card__features li { color: #cbd5e1; }
    .cf-plan-card__seats { color: #64748b; border-top-color: #334155; }
    .cf-plan-card__cta {
        background: #818cf8;
    }
    .cf-plan-card__cta:hover {
        background: #6366f1;
    }
}

/* ─── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .cf-plan-cards {
        grid-template-columns: 1fr;
    }
}

/* Marketing site theme toggle (class-based, not prefers-color-scheme) */
html.su-theme-dark .cf-plan-interval-toggle {
    background: rgba(255, 255, 255, 0.06);
}
html.su-theme-dark .cf-plan-interval-btn {
    color: #94a3b8;
}
html.su-theme-dark .cf-plan-interval-btn.is-active {
    background: #1e293b;
    color: #e2e8f0;
    box-shadow: none;
}
html.su-theme-dark .cf-plan-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}
html.su-theme-dark .cf-plan-card__name {
    color: #f1f5f9;
}
html.su-theme-dark .cf-plan-card__desc,
html.su-theme-dark .cf-plan-card__period {
    color: #94a3b8;
}
