/**
 * SS Membership — Level Card chrome
 *
 * v0.11.06 (Pass B): Replaces legacy .ppm-membership-card Bootstrap chrome.
 *
 * Consumes the --ssc-* token contract from SS Commerce UX Standard v1.1.
 * Token defaults are declared on .ssm-level-card itself as fallbacks so the
 * module renders correctly even when no theme-level :root tokens exist.
 *
 * Visual register:
 * - Charcoal hero default (matches checkout)
 * - No border-radius
 * - 0.5px borders
 * - Dark flat CTA (Subscribe / Create Account)
 * - No "Sign Up" green button, no Bootstrap blue gradient
 */

.ssm-level-card {
    /* token defaults (fallbacks) */
    --ssc-hero-bg:           #1d1d1b;
    --ssc-hero-fg:           #ffffff;
    --ssc-hero-accent:       #d4740e;
    --ssc-surface:           #ffffff;
    --ssc-surface-fg:        #1d1d1b;
    --ssc-surface-fg-muted:  #6c6c68;
    --ssc-border:            #d8d8d4;
    --ssc-cta-bg:            #1d1d1b;
    --ssc-cta-fg:            #ffffff;
    --ssc-cta-hover-bg:      #ffffff;
    --ssc-cta-hover-fg:      #1d1d1b;
    --ssc-success:           #6fb89e;

    display: flex;
    flex-direction: column;
    background: var(--ssc-surface);
    color: var(--ssc-surface-fg);
    border: 0.5px solid var(--ssc-border);
    border-radius: 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    margin: 0 0 1.5rem;
    box-sizing: border-box;
}

.ssm-level-card *,
.ssm-level-card *::before,
.ssm-level-card *::after {
    box-sizing: border-box;
}

/* ============================================================ */
/* HEADER (charcoal hero, white-on-dark)                        */
/* ============================================================ */

.ssm-level-card__header {
    background: var(--ssc-hero-bg);
    color: var(--ssc-hero-fg);
    padding: 24px;
}

.ssm-level-card__name {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 12px;
    color: var(--ssc-hero-fg);
}

.ssm-level-card__price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.ssm-level-card__price-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--ssc-hero-fg);
    line-height: 1.1;
}

.ssm-level-card__price-meta {
    font-size: 12px;
    font-weight: 400;
    color: var(--ssc-hero-fg);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ssm-level-card__price-secondary {
    margin-top: 8px;
    font-size: 12px;
    color: var(--ssc-hero-fg);
    opacity: 0.7;
}

/* Free variant — neutral header, no dark hero */
.ssm-level-card--free .ssm-level-card__header {
    background: var(--ssc-surface);
    color: var(--ssc-surface-fg);
    border-bottom: 0.5px solid var(--ssc-border);
}

.ssm-level-card--free .ssm-level-card__name,
.ssm-level-card--free .ssm-level-card__price-amount {
    color: var(--ssc-surface-fg);
}

.ssm-level-card--free .ssm-level-card__price-meta,
.ssm-level-card--free .ssm-level-card__price-secondary {
    color: var(--ssc-surface-fg-muted);
    opacity: 1;
}

/* ============================================================ */
/* BODY (features list)                                         */
/* ============================================================ */

.ssm-level-card__body {
    padding: 20px 24px;
    flex: 1;
    background: var(--ssc-surface);
}

.ssm-level-card__features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ssm-level-card__feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-size: 14px;
    color: var(--ssc-surface-fg);
    line-height: 1.4;
}

.ssm-level-card__feature-icon {
    color: var(--ssc-success);
    flex-shrink: 0;
    margin-top: 3px;
}

.ssm-level-card__feature-text {
    flex: 1;
}

.ssm-level-card__no-features {
    font-size: 13px;
    color: var(--ssc-surface-fg-muted);
    font-style: italic;
    margin: 0;
}

/* ============================================================ */
/* FOOTER (CTA)                                                 */
/* ============================================================ */

.ssm-level-card__footer {
    padding: 0;
    background: var(--ssc-surface);
    border-top: 0.5px solid var(--ssc-border);
}

.ssm-level-card__cta {
    display: block;
    width: 100%;
    background: var(--ssc-cta-bg);
    color: var(--ssc-cta-fg);
    border: 0;
    padding: 18px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    border-radius: 0;
    text-decoration: none;
    font-family: inherit;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ssm-level-card__cta:hover,
.ssm-level-card__cta:focus {
    background: var(--ssc-cta-hover-bg);
    color: var(--ssc-cta-hover-fg);
    outline: none;
}

.ssm-level-card__cta--disabled {
    background: var(--ssc-surface);
    color: var(--ssc-surface-fg-muted);
    cursor: not-allowed;
    pointer-events: none;
    border-top: 0;
}

.ssm-level-card__cta--disabled:hover,
.ssm-level-card__cta--disabled:focus {
    background: var(--ssc-surface);
    color: var(--ssc-surface-fg-muted);
}

.ssm-level-card__stripe-warning {
    padding: 16px;
    font-size: 13px;
    color: var(--ssc-surface-fg-muted);
    background: var(--ssc-surface);
    text-align: center;
}

/* ============================================================ */
/* RESPONSIVE                                                   */
/* ============================================================ */

@media (max-width: 480px) {
    .ssm-level-card__header,
    .ssm-level-card__body {
        padding: 18px;
    }
    .ssm-level-card__price-amount {
        font-size: 24px;
    }
}
