/* ========================================================================
   FB-GATES — Feature Gating Overlays
   Glassmorphism + ambient glow, consistent with fd-/ff-/fc-/fa- design system
   ======================================================================== */

/* --- Gate Wrapper --- */
.fb-gate-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.fb-gate-blurred {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
    opacity: 0.65;
}

/* --- Gate Overlay (glassmorphism over blurred content) --- */
.fb-gate-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px;
    background: rgba(14, 14, 16, 0.45);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 10;
}

/* Ambient glow behind the lock icon area */
.fb-gate-overlay::before {
    content: '';
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, rgba(96, 165, 250, 0.04) 40%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.fb-gate-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 0 24px rgba(124, 58, 237, 0.06);
}

.fb-gate-icon svg {
    width: 22px;
    height: 22px;
    stroke: rgba(255, 255, 255, 0.6);
    fill: none;
    stroke-width: 1.5;
}

.fb-gate-icon.large {
    width: 72px;
    height: 72px;
    margin-bottom: 24px;
}

.fb-gate-icon.large svg {
    width: 32px;
    height: 32px;
}

.fb-gate-title {
    font-family: var(--fb-font-display);
    font-size: 18px;
    font-weight: 500;
    color: #f4f4f6;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.fb-gate-description {
    font-size: 13px;
    color: #9090a0;
    max-width: 320px;
    line-height: 1.55;
    margin-bottom: 24px;
    font-weight: 400;
}

/* --- CTA Button (glass pill) --- */
.fb-gate-cta {
    display: inline-block;
    padding: 11px 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e8e8ec;
    font-size: 13px;
    font-weight: 500;
    border-radius: 24px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    line-height: 1.4;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.fb-gate-cta:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.fb-gate-cta.small {
    padding: 7px 16px;
    font-size: 11px;
    border-radius: 20px;
}

.fb-gate-subtext {
    font-size: 11px;
    color: #6b6b78;
    margin-top: 10px;
    font-weight: 400;
}

/* --- Inline PRO / ADVISOR Badge --- */
.fb-gate-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

.fb-gate-badge svg {
    width: 10px;
    height: 10px;
    stroke: #a78bfa;
    fill: none;
    stroke-width: 2;
}

/* --- Search Limit Banner (fund finder) --- */
.fb-gate-search-banner {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.fb-gate-search-banner.warning {
    border-color: rgba(251, 191, 36, 0.2);
    background: rgba(251, 191, 36, 0.04);
}

.fb-gate-search-banner.exhausted {
    border-color: rgba(248, 113, 113, 0.2);
    background: rgba(248, 113, 113, 0.04);
}

.fb-gate-search-count {
    font-size: 13px;
    color: #c4c4cc;
}

.fb-gate-search-count strong {
    color: #f0f0f4;
    font-weight: 600;
}

/* --- Gated Toggle Buttons --- */
.fd-toggle-gated {
    opacity: 0.35;
    cursor: not-allowed !important;
    position: relative;
}

.fd-toggle-gated::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

/* --- Full-Page Gate --- */
.fb-gate-fullpage {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: radial-gradient(ellipse at 50% 30%, rgba(124, 58, 237, 0.04) 0%, transparent 60%);
}

.fb-gate-fullpage-inner {
    max-width: 480px;
    text-align: center;
}

.fb-gate-fullpage-inner h1 {
    font-family: var(--fb-font-display);
    font-size: 28px;
    font-weight: 500;
    color: #f0f0f4;
    margin-bottom: 16px;
}

.fb-gate-fullpage-inner p {
    font-size: 15px;
    color: #6b6b78;
    line-height: 1.6;
    margin-bottom: 28px;
}

.fb-gate-fullpage-inner .fb-gate-cta {
    font-size: 15px;
    padding: 14px 36px;
}

/* --- Toast Notification --- */
.fb-gate-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(18, 18, 22, 0.88);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 20px 24px;
    max-width: 360px;
    z-index: 10000;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.03);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.fb-gate-toast.visible {
    transform: translateY(0);
    opacity: 1;
}

.fb-gate-toast-content strong {
    display: block;
    font-size: 14px;
    color: #f0f0f4;
    margin-bottom: 6px;
    font-weight: 500;
}

.fb-gate-toast-content p {
    font-size: 12px;
    color: #8a8a94;
    line-height: 1.5;
    margin: 0 0 14px 0;
}

.fb-gate-toast-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: #6b6b78;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.15s;
}

.fb-gate-toast-close:hover {
    color: #f0f0f4;
}

/* --- Performance Stat Gated State --- */
.fd-stat-value.gated {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Watchlist Counter --- */
.fb-watchlist-counter {
    font-size: 11px;
    color: #6b6b78;
    margin-left: 4px;
}

.fb-watchlist-counter.at-limit {
    color: #fbbf24;
}


/* ========================================================================
   USAGE TRACKER — Redesigned to match fd-card / glassmorphism aesthetic
   Consistent with .fd-card (#1c1c1f bg, #2a2a2f borders, gold accents)
   ======================================================================== */

/* --- Trigger Button in Header --- */
.fb-usage-tracker-menu {
    display: flex !important;
    align-items: center !important;
}

.fb-usage-trigger {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 6px 14px !important;
    margin: 0 8px !important;
    background: rgba(28, 28, 31, 0.8) !important;
    border: 1px solid rgba(201, 169, 98, 0.12) !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    position: relative;
    text-decoration: none !important;
    line-height: 1 !important;
    font-size: 12px !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 140px;
}

.fb-usage-trigger:hover {
    background: rgba(42, 42, 47, 0.9) !important;
    border-color: rgba(201, 169, 98, 0.25) !important;
}

/* Plan label inside trigger */
.fb-usage-trigger-label {
    font-family: var(--fb-font-body) !important;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(201, 169, 98, 0.6);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Persistent gradient loading bar inside the trigger */
.fb-usage-headerbar {
    flex: 1;
    min-width: 60px;
}

.fb-usage-headerbar-track {
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    position: relative;
}

.fb-usage-headerbar-fill {
    height: 100%;
    border-radius: 2px;
    min-width: 0;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    background: linear-gradient(90deg, #4ade80, #fbbf24, #fb923c, #f87171);
}

/* Enterprise: green → blue */
.fb-usage-headerbar[data-plan="enterprise"] .fb-usage-headerbar-fill {
    background: linear-gradient(90deg, #4ade80, #22d3ee, #60a5fa);
}

/* Warning state */
.fb-usage-headerbar-fill.warning {
    background: linear-gradient(90deg, #fbbf24, #fb923c, #f87171);
}

/* Critical state */
.fb-usage-headerbar-fill.critical {
    background: linear-gradient(90deg, #fb923c, #f87171, #ef4444);
    animation: fb-bar-pulse 2s ease-in-out infinite;
}

@keyframes fb-bar-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Status dot on right side of trigger */
.fb-usage-trigger-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(201, 169, 98, 0.2);
    flex-shrink: 0;
    transition: all 0.3s;
}

.fb-usage-trigger-dot.active {
    background: #4ade80;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.3);
}

.fb-usage-trigger-dot.warning {
    background: #fbbf24;
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.3);
}

.fb-usage-trigger-dot.critical {
    background: #f87171;
    box-shadow: 0 0 6px rgba(248, 113, 113, 0.4);
    animation: fb-dot-pulse 2s ease-in-out infinite;
}

@keyframes fb-dot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(248, 113, 113, 0); }
}

/* --- Dropdown Panel (fd-card aesthetic) --- */
.fb-usage-panel,
#header-outer .buttons.sf-menu .fb-usage-panel {
    display: block !important;
    position: absolute !important;
    top: calc(100% + 12px) !important;
    right: 0 !important;
    left: auto !important;
    width: 340px !important;
    float: none !important;
    background: #1c1c1f !important;
    border: 1px solid #2a2a2f !important;
    border-radius: 20px !important;
    padding: 0 !important;
    z-index: 10001 !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.02);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

/* Override Salient flex/alignment on ALL panel children */
.fb-usage-panel div,
.fb-usage-panel span,
.fb-usage-panel a,
.fb-usage-panel button {
    float: none !important;
}

/* No ambient glows — clean card aesthetic */
.fb-usage-panel::before,
.fb-usage-panel::after {
    display: none;
}

.fb-usage-panel.open,
#header-outer .buttons.sf-menu .fb-usage-panel.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* --- Panel Header — Gold accent stripe top --- */
.fb-usage-panel .fb-usage-panel-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 20px 24px 16px !important;
    margin: 0 !important;
    border-bottom: 1px solid #2a2a2f;
    background: linear-gradient(180deg, rgba(201, 169, 98, 0.04) 0%, transparent 100%);
    width: 100%;
}

.fb-usage-panel-title {
    font-family: var(--fb-font-display) !important;
    font-size: 15px;
    font-weight: 600;
    color: #f5f0e8;
    text-transform: none;
    letter-spacing: -0.01em;
}

.fb-usage-plan-badge {
    font-family: var(--fb-font-body) !important;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.fb-usage-plan-badge.free {
    background: rgba(255, 255, 255, 0.05);
    color: #6b6b78;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.fb-usage-plan-badge.professional {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.15);
}

.fb-usage-plan-badge.advisor {
    background: rgba(167, 139, 250, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(167, 139, 250, 0.15);
}

.fb-usage-plan-badge.enterprise {
    background: rgba(201, 169, 98, 0.1);
    color: #c9a962;
    border: 1px solid rgba(201, 169, 98, 0.15);
}

/* --- Meters Container --- */
.fb-usage-panel .fb-usage-meters {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
    padding: 8px 0 !important;
}

/* --- Individual Meter — Row-based card items --- */
.fb-usage-meter {
    margin: 0;
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-radius: 0;
    transition: background 0.15s ease;
}

.fb-usage-meter:last-child {
    margin-bottom: 0;
}

.fb-usage-meter:hover {
    background: rgba(255, 255, 255, 0.02);
}

.fb-usage-panel .fb-usage-meter-header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 10px;
    width: 100%;
}

.fb-usage-panel .fb-usage-meter-label-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Icon container — subtle card background */
.fb-usage-meter-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.fb-usage-meter-icon svg {
    stroke: none;
    fill: currentColor;
    width: 18px;
    height: 18px;
}

/* Per-meter icon colors — muted to match fd- palette */
.fb-usage-icon-searches { color: #c9a962; }
.fb-usage-icon-watchlist { color: #4ade80; }
.fb-usage-icon-ai { color: #a78bfa; }
.fb-usage-icon-comparisons { color: #60a5fa; }

/* Labels — consistent neutral tone */
.fb-usage-meter-label {
    font-family: var(--fb-font-body) !important;
    font-size: 13px;
    color: #e2e2e8;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Remove per-meter label color overrides — use consistent white */
.fb-usage-label-searches,
.fb-usage-label-watchlist,
.fb-usage-label-ai,
.fb-usage-label-comparisons {
    color: #e2e2e8;
}

.fb-usage-meter-count {
    font-family: var(--fb-font-body) !important;
    font-size: 12px;
    color: #6b6b78;
    font-variant-numeric: tabular-nums;
}

.fb-usage-meter-count strong {
    color: #bdbdca;
    font-weight: 600;
}

/* --- Gradient Bar Track --- */
.fb-usage-panel .fb-usage-bar-track {
    width: 100% !important;
    height: 6px !important;
    border-radius: 3px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    overflow: hidden !important;
    position: relative !important;
    display: block !important;
}

.fb-usage-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    min-width: 0;
}

/* Unified gradient: green → amber → orange → red */
.fb-usage-bar-fill.searches,
.fb-usage-bar-fill.watchlist,
.fb-usage-bar-fill.ai-forecasts,
.fb-usage-bar-fill.comparisons {
    background: linear-gradient(90deg, #4ade80, #fbbf24, #fb923c, #f87171);
}

/* Enterprise plan: green → cyan → blue */
.fb-usage-panel[data-plan="enterprise"] .fb-usage-bar-fill.searches,
.fb-usage-panel[data-plan="enterprise"] .fb-usage-bar-fill.watchlist,
.fb-usage-panel[data-plan="enterprise"] .fb-usage-bar-fill.ai-forecasts,
.fb-usage-panel[data-plan="enterprise"] .fb-usage-bar-fill.comparisons {
    background: linear-gradient(90deg, #4ade80, #22d3ee, #60a5fa);
}

/* Warning state: approaching limit */
.fb-usage-bar-fill.near-limit {
    background: linear-gradient(90deg, #fbbf24, #fb923c, #f87171) !important;
}

/* Full/exhausted state */
.fb-usage-bar-fill.at-limit {
    background: linear-gradient(90deg, #fb923c, #f87171, #ef4444) !important;
}

/* No glow effects — clean bars */
.fb-usage-bar-fill.near-limit::after,
.fb-usage-bar-fill.at-limit::after {
    display: none;
}

/* Unlimited indicator */
.fb-usage-meter-unlimited {
    font-family: var(--fb-font-body) !important;
    font-size: 11px;
    color: #4ade80;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    opacity: 0.8;
}

.fb-usage-meter-unlimited svg {
    width: 13px;
    height: 13px;
    stroke: #4ade80;
    fill: none;
    stroke-width: 1.8;
}

/* --- Panel Footer --- */
.fb-usage-panel .fb-usage-panel-footer {
    display: block !important;
    padding: 14px 24px 18px !important;
    margin: 0 !important;
    border-top: 1px solid #2a2a2f;
    text-align: center;
    width: 100%;
    background: rgba(255, 255, 255, 0.01);
}

.fb-usage-panel .fb-usage-refresh-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
    margin-bottom: 10px;
}

.fb-usage-refresh-text {
    font-family: var(--fb-font-body) !important;
    font-size: 10px;
    color: #4a4a52;
    letter-spacing: 0.02em;
}

.fb-usage-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
}

.fb-usage-refresh-btn svg {
    stroke: #4a4a52;
    fill: none;
    stroke-width: 2;
}

.fb-usage-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(201, 169, 98, 0.2);
}

.fb-usage-refresh-btn:hover svg {
    stroke: #c9a962;
}

.fb-usage-upgrade-link {
    font-family: var(--fb-font-body) !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #c9a962;
    text-decoration: none;
    transition: all 0.2s;
    padding: 8px 18px;
    border-radius: 10px;
    background: rgba(201, 169, 98, 0.06);
    border: 1px solid rgba(201, 169, 98, 0.12);
}

.fb-usage-upgrade-link:hover {
    color: #e4d4a4;
    background: rgba(201, 169, 98, 0.12);
    border-color: rgba(201, 169, 98, 0.25);
    text-decoration: none;
}

.fb-usage-upgrade-link svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}


/* ========================================================================
   LIGHT THEME — Gate Overlays & Usage Tracker
   ======================================================================== */

[data-theme="light"] .fb-gate-overlay {
    background: rgba(245, 244, 240, 0.5);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .fb-gate-overlay::before {
    background: radial-gradient(circle, rgba(184, 148, 46, 0.06) 0%, rgba(96, 165, 250, 0.03) 40%, transparent 70%);
}

[data-theme="light"] .fb-gate-icon {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 0 24px rgba(184, 148, 46, 0.06);
}

[data-theme="light"] .fb-gate-icon svg {
    stroke: rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .fb-gate-title {
    color: #1a1a1e;
}

[data-theme="light"] .fb-gate-description {
    color: #6a6a74;
}

[data-theme="light"] .fb-gate-cta {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
    color: #3a3a44;
}

[data-theme="light"] .fb-gate-cta:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.16);
    color: #1a1a1e;
}

[data-theme="light"] .fb-gate-subtext {
    color: #9a9aa4;
}

[data-theme="light"] .fb-gate-badge {
    background: rgba(124, 58, 237, 0.06);
    border-color: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
}

[data-theme="light"] .fb-gate-badge svg {
    stroke: #7c3aed;
}

[data-theme="light"] .fb-gate-search-banner {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .fb-gate-search-banner.warning {
    border-color: rgba(217, 119, 6, 0.25);
    background: rgba(217, 119, 6, 0.04);
}

[data-theme="light"] .fb-gate-search-banner.exhausted {
    border-color: rgba(220, 38, 38, 0.25);
    background: rgba(220, 38, 38, 0.04);
}

[data-theme="light"] .fb-gate-search-count {
    color: #3a3a44;
}

[data-theme="light"] .fb-gate-search-count strong {
    color: #1a1a1e;
}

[data-theme="light"] .fb-gate-toast {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .fb-gate-toast-content strong {
    color: #1a1a1e;
}

[data-theme="light"] .fb-gate-toast-content p {
    color: #6a6a74;
}

[data-theme="light"] .fb-gate-toast-close {
    color: #9a9aa4;
}

[data-theme="light"] .fb-gate-toast-close:hover {
    color: #3a3a44;
}

[data-theme="light"] .fb-gate-fullpage {
    background: radial-gradient(ellipse at 50% 30%, rgba(184, 148, 46, 0.04) 0%, transparent 60%);
}

[data-theme="light"] .fb-gate-fullpage-inner h1 {
    color: #1a1a1e;
}

[data-theme="light"] .fb-gate-fullpage-inner p {
    color: #6a6a74;
}

[data-theme="light"] .fb-gate-blurred {
    opacity: 0.55;
}

[data-theme="light"] .fb-watchlist-counter.at-limit {
    color: #d97706;
}

/* --- Light Theme: Usage Tracker (header stays dark, so minimal changes) --- */
/* Note: header remains dark in light mode per Salient theme, so usage tracker
   keeps its dark glass aesthetic. Only the dropdown panel adapts if needed. */


/* --- Responsive --- */
@media (max-width: 768px) {
    .fb-gate-overlay {
        padding: 20px 16px;
    }

    .fb-gate-overlay::before {
        width: 120px;
        height: 120px;
    }

    .fb-gate-title {
        font-size: 16px;
    }

    .fb-gate-description {
        font-size: 12px;
        max-width: 280px;
    }

    .fb-gate-cta {
        padding: 10px 20px;
        font-size: 12px;
    }

    .fb-gate-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }

    .fb-gate-search-banner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .fb-gate-fullpage {
        min-height: 50vh;
        padding: 40px 16px;
    }

    .fb-gate-fullpage-inner h1 {
        font-size: 22px;
    }

    /* Usage tracker responsive */
    .fb-usage-panel {
        right: -40px !important;
        width: 300px !important;
    }
}

@media (max-width: 480px) {
    .fb-usage-panel,
    #header-outer .buttons.sf-menu .fb-usage-panel {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        transform: translateY(100%);
    }

    .fb-usage-panel.open,
    #header-outer .buttons.sf-menu .fb-usage-panel.open {
        transform: translateY(0);
    }
}
