/* ================================================================
   member.css — member page + pricing card on account.html
   Builds on styles.css (liquid glass tokens, .glass, .btn-primary, .btn-secondary).
   ================================================================ */

/* ── Layout ── */
.fr-page { min-height: 100vh; padding: 104px 0 80px; }
.fr-wrap { max-width: 640px; margin: 0 auto; padding: 0 20px; }
.fr-hidden { display: none !important; }

/* ── Nav (brand + log out only) ── */
.fr-nav-email {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Hero ── */
.fr-hero { display: flex; align-items: center; gap: 20px; padding: 16px 0 28px; }
.fr-hero h1 {
    font-size: clamp(1.75rem, 5.4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    color: var(--text-primary);
}
.fr-hero p { font-size: 1rem; color: var(--text-secondary); margin: 0; line-height: 1.5; }

/* Small mascot (same recipe as the account page hero) */
.fr-mascot.mascot-container {
    width: 72px !important;
    height: 48px !important;
    flex-shrink: 0;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}
.fr-mascot .mascot-body { border-radius: 14px; }
.fr-mascot .mascot-glare { top: 6px; right: 10px; width: 16px; height: 5px; }
.fr-mascot .eyes { gap: 8px; }

/* ── Cards ── */
.fr-card {
    border-radius: var(--radius-lg);
    padding: 26px;
    margin-bottom: 16px;
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
}
.fr-card > * { position: relative; z-index: 1; }
.fr-card:hover { background: var(--glass-fill); box-shadow: var(--glass-shadow); }   /* static card: no hover lift */
.fr-card h2 {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 6px;
    color: var(--text-primary);
}
.fr-sub { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.55; margin: 0 0 18px; }
.fr-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

/* ── Buttons (on top of .btn-primary / .btn-secondary) ── */
.fr-btn {
    justify-content: center;
    min-height: 50px;
    padding: 12px 28px;
    font-size: 0.9375rem;
    white-space: nowrap;
    cursor: pointer;
    border-radius: var(--radius-pill);
    font-family: var(--font-sans);
    font-weight: 600;
    text-align: center;
}
.fr-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.fr-btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.fr-link {
    color: var(--text-secondary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}
.fr-link:hover { color: var(--text-primary); }
.fr-small { font-size: 0.8125rem; color: var(--text-tertiary); line-height: 1.5; margin: 14px 0 0; }

/* ── Welcome / state cards ── */
.fr-state { text-align: left; }
.fr-state .fr-btn-row { margin-top: 4px; }
.fr-state-title { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; color: var(--text-primary); }
.fr-error { border-color: rgba(239, 68, 68, 0.35); }
.fr-inline-error {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ── Loading skeleton ── */
.fr-skel { height: 14px; border-radius: 6px; background: var(--glass-fill-strong); animation: fr-pulse 1.5s ease-in-out infinite; }
@keyframes fr-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ── Banner ── */
.fr-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    margin-bottom: 16px;
    border-radius: var(--radius-lg);
    background: rgba(34, 197, 94, 0.09);
    border: 1px solid rgba(34, 197, 94, 0.32);
}
.fr-banner-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 197, 94, 0.16);
    color: #4ade80;
}
.fr-banner strong { display: block; font-size: 1rem; color: var(--text-primary); }
.fr-banner span { font-size: 0.875rem; color: var(--text-secondary); }

/* ── Balance ── */
.fr-balance-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.fr-balance-num {
    font-family: var(--font-mono);
    font-size: clamp(2.25rem, 9vw, 3rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.1;
}
.fr-balance-unit { font-size: 1rem; color: var(--text-secondary); }
.fr-balance-detail { font-size: 0.875rem; color: var(--text-tertiary); margin-top: 6px; }
.fr-pill {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    color: #4ade80;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.28);
    white-space: nowrap;
}
.fr-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fr-card-head .fr-label { margin: 0; }

/* ── License key ── */
.fr-license {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 12px 18px;
    border-radius: var(--radius-md);
    background: var(--well, rgba(0, 0, 0, 0.35));
    border: 1px solid var(--glass-stroke);
    box-shadow: var(--glass-pressed);
}
.fr-license-key {
    flex: 1;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    letter-spacing: 0.06em;
    color: var(--text-primary);
    overflow-wrap: anywhere;
    user-select: all;
}
.fr-copy { min-height: 44px; padding: 10px 20px; flex-shrink: 0; }

/* ── Steps ── */
.fr-steps { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 16px; }
.fr-step { display: flex; gap: 16px; align-items: flex-start; }
.fr-step-n {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-primary);
    background: var(--glass-fill-strong);
    border: 1px solid var(--glass-stroke);
}
.fr-step-body { min-width: 0; }
.fr-step-body strong { display: block; font-size: 0.9375rem; color: var(--text-primary); margin-bottom: 2px; }
.fr-step-body p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.55; margin: 0; }
.fr-step-body code {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--glass-fill-strong);
    color: var(--text-primary);
}
.fr-step-body a { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }

/* ── Credit packs ── */
.fr-packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fr-pack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--glass-fill);
    border: 1px solid var(--glass-stroke);
    box-shadow: var(--glass-edge);
}
.fr-pack-info { display: flex; flex-direction: column; gap: 2px; }
.fr-pack-credits {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.1;
}
.fr-pack-unit { font-size: 0.8125rem; color: var(--text-tertiary); }
.fr-pack-buy { width: 100%; padding: 12px 16px; font-size: 0.9375rem; }

/* Pricing card on account.html */
.fr-account-card { margin-bottom: 32px; }

/* ── Phones ── */
@media (max-width: 640px) {
    .fr-page { padding-top: 92px; }
    .fr-card { padding: 22px 18px; }
    .fr-hero { gap: 16px; }
    .fr-nav-email { display: none; }

    /* Packs become full-width rows: credits left, Buy button right */
    .fr-packs { grid-template-columns: 1fr; }
    .fr-pack { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 16px 18px; }
    .fr-pack-buy { width: auto; flex-shrink: 0; min-width: 132px; }

    /* License: key on its own line, Copy underneath at full width */
    .fr-license { flex-direction: column; align-items: stretch; padding: 16px; gap: 12px; }
    .fr-license-key { text-align: center; font-size: 0.9375rem; }
    .fr-copy { width: 100%; }

    .fr-btn-row .fr-btn { flex: 1 1 100%; }
}

@media (max-width: 360px) {
    .fr-hero { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .fr-skel { animation: none; }
}
