/* ================================================================
   UPGRADE TO PRO — Eye-catching button styles
   ================================================================ */

/* ── Sidebar footer upgrade button ────────────────────────── */
.upgrade-pro-sidebar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #f97316, #ef4444);
    background-size: 200% 200%;
    box-shadow:
        0 0 12px rgba(245, 158, 11, 0.35),
        0 0 24px rgba(239, 68, 68, 0.15);
    animation: upgradeGlow 3s ease-in-out infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.upgrade-pro-sidebar:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow:
        0 0 18px rgba(245, 158, 11, 0.5),
        0 0 36px rgba(239, 68, 68, 0.25);
}

.upgrade-pro-sidebar i {
    font-size: 1rem;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

/* In collapsed sidebar, hide the label */
.sidebar.collapsed .upgrade-pro-sidebar span {
    display: none;
}

.sidebar.collapsed .upgrade-pro-sidebar {
    justify-content: center;
    padding: 10px;
}

/* ── Header quick-action upgrade button ───────────────────── */
.upgrade-pro-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding-inline: 16px;
    border-radius: 999px;
    border: none;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #f97316, #ef4444);
    background-size: 200% 200%;
    box-shadow:
        0 0 10px rgba(245, 158, 11, 0.3),
        0 0 20px rgba(239, 68, 68, 0.12);
    animation: upgradeGlow 3s ease-in-out infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.upgrade-pro-header:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 16px rgba(245, 158, 11, 0.45),
        0 0 30px rgba(239, 68, 68, 0.2);
}

.upgrade-pro-header i {
    font-size: 0.9rem;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.6));
}

/* ── Shared animation ─────────────────────────────────────── */
@keyframes upgradeGlow {
    0%, 100% {
        background-position: 0% 50%;
        box-shadow:
            0 0 12px rgba(245, 158, 11, 0.35),
            0 0 24px rgba(239, 68, 68, 0.15);
    }
    50% {
        background-position: 100% 50%;
        box-shadow:
            0 0 20px rgba(245, 158, 11, 0.5),
            0 0 40px rgba(239, 68, 68, 0.25);
    }
}

/* ── Responsive: compact header button on small screens ──── */
@media (max-width: 768px) {
    .upgrade-pro-header {
        padding-inline: 12px;
        font-size: 0.78rem;
        min-height: 38px;
        gap: 5px;
    }
}

/* ================================================================
   SUBSCRIPTION STATUS BADGES
   ================================================================ */

/* ── Sidebar badge (shared base) ─────────────────────────── */
.subscription-badge-sidebar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.subscription-badge-sidebar i {
    font-size: 1rem;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

/* In collapsed sidebar, hide the label */
.sidebar.collapsed .subscription-badge-sidebar span {
    display: none;
}

.sidebar.collapsed .subscription-badge-sidebar {
    justify-content: center;
    padding: 10px;
}

/* ── Trialing variant (blue glow) ────────────────────────── */
.subscription-badge-sidebar.sub-trialing {
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    box-shadow:
        0 0 12px rgba(59, 130, 246, 0.35),
        0 0 24px rgba(139, 92, 246, 0.15);
}

.subscription-badge-sidebar.sub-trialing:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow:
        0 0 18px rgba(59, 130, 246, 0.5),
        0 0 36px rgba(139, 92, 246, 0.25);
}

/* ── Pro variant (gold/green glow) ───────────────────────── */
.subscription-badge-sidebar.sub-pro {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #10b981);
    box-shadow:
        0 0 12px rgba(245, 158, 11, 0.35),
        0 0 24px rgba(16, 185, 129, 0.15);
}

.subscription-badge-sidebar.sub-pro:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow:
        0 0 18px rgba(245, 158, 11, 0.5),
        0 0 36px rgba(16, 185, 129, 0.25);
}

/* ── Header badge ────────────────────────────────────────── */
.subscription-badge-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.subscription-badge-header.sub-trialing {
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.subscription-badge-header.sub-trialing:hover {
    transform: scale(1.1);
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.5);
}

.subscription-badge-header.sub-pro {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #10b981);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.subscription-badge-header.sub-pro:hover {
    transform: scale(1.1);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.5);
}

/* ================================================================
   PRO GATE — Blur overlay for non-Pro content
   ================================================================ */

.pro-gate {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* ── Blurred content ─────────────────────────────────────── */

.pro-gate__content--locked {
    filter: blur(6px) saturate(0.6);
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    transition: filter var(--transition-normal);
    max-height: 550px;
    overflow: hidden;
}

/* Gradient fade at the bottom so cut-off feels natural */
.pro-gate__content--locked::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--bg-body), transparent);
    pointer-events: none;
    z-index: 1;
}

/* ── Overlay layer ───────────────────────────────────────── */

.pro-gate__overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 48px;
    background: var(--bg-overlay-light);
    border-radius: inherit;
}

/* ── Floating card (the visible CTA) ─────────────────────── */

.pro-gate__overlay-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 36px 32px;
    text-align: center;
    max-width: 400px;
    width: 90%;

    /* Card visual — matches Fineas card-glass + gradient-card */
    background:
        radial-gradient(ellipse at top, color-mix(in srgb, var(--color-warning) 8%, transparent), transparent 70%),
        var(--gradient-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    /* Accent bar top (like settings-card::before) */
    position: relative;
    overflow: hidden;
}

.pro-gate__overlay-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-warning), var(--color-warning-light), transparent);
    opacity: 0.8;
}

/* ── Icon ─────────────────────────────────────────────────── */

.pro-gate__overlay-icon {
    font-size: 1.8rem;
    color: var(--color-warning);
    filter: drop-shadow(0 0 10px var(--color-warning-bg));
}

/* ── Text ─────────────────────────────────────────────────── */

.pro-gate__overlay-text {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0;
}

.pro-gate__overlay-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: -6px 0 0;
    line-height: 1.45;
}

/* ── CTA button ──────────────────────────────────────────── */

.pro-gate__overlay-btn {
    margin-top: 4px;
    padding: 10px 28px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    color: var(--text-on-primary);
    background: linear-gradient(135deg, var(--color-warning), var(--color-warning-gold));
    box-shadow:
        0 2px 12px var(--color-warning-bg),
        var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.pro-gate__overlay-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow:
        0 4px 20px var(--color-warning-border),
        var(--shadow-md);
}

.pro-gate__overlay-btn:active {
    transform: translateY(0);
}

/* ── Variant: full-page sections ─────────────────────────── */

.pro-gate--page {
    min-height: 280px;
}

/* ── Variant: grid (dashboard) ───────────────────────────── */

.pro-gate--grid {
    grid-column: 1 / -1;
}

.pro-gate--grid.pro-gate--unlocked {
    display: contents;
}

.pro-gate--grid.pro-gate--unlocked > .pro-gate__content {
    display: contents;
}

.pro-gate--grid .pro-gate__content--locked {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    max-height: 480px;
}

/* ── Variant: inline (FinAI bubbles) ─────────────────────── */

.pro-gate--inline {
    display: inline-block;
    border-radius: var(--radius-md);
}

.pro-gate--inline .pro-gate__overlay {
    padding-top: 0;
    align-items: center;
}

.pro-gate--inline .pro-gate__overlay-card {
    padding: 16px 20px 18px;
    gap: 8px;
    max-width: 320px;
}

.pro-gate--inline .pro-gate__overlay-card::before {
    display: none;
}

.pro-gate--inline .pro-gate__overlay-icon {
    font-size: 1.2rem;
}

.pro-gate--inline .pro-gate__overlay-text {
    font-size: 0.82rem;
}

.pro-gate--inline .pro-gate__overlay-btn {
    padding: 6px 18px;
    font-size: 0.78rem;
}

.pro-gate--inline .pro-gate__content--locked {
    max-height: 200px;
}

.pro-gate--inline .pro-gate__content--locked::after {
    height: 60px;
}

/* ── Variant: settings card ──────────────────────────────── */

.pro-gate--settings {
    border-radius: var(--radius-lg);
}

.pro-gate--settings .pro-gate__overlay {
    padding-top: 36px;
}

.pro-gate--settings .pro-gate__content--locked {
    max-height: 380px;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 768px) {
    .pro-gate__overlay {
        padding-top: 28px;
    }

    .pro-gate__overlay-card {
        padding: 22px 20px 26px;
        max-width: 92%;
    }

    .pro-gate__overlay-text {
        font-size: 0.88rem;
    }

    .pro-gate--grid .pro-gate__content--locked {
        grid-template-columns: 1fr;
    }
}

/* ── Recurrence quota badge ──────────────────────────────── */
.recurrence-quota-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--bg-subtle-hover);
    color: var(--text-muted);
    border: 1px solid var(--border-light);
}

.recurrence-quota-badge--full {
    color: var(--color-warning);
    border-color: var(--color-warning-border);
    background: var(--color-warning-bg);
}

.recurrence-quota-badge i {
    font-size: 0.7rem;
}

