/* ============================================
   PRO TIER STYLES
   Pro badge, feature gates, dev toggle
   ============================================ */

/* Pro Badge */
.pro-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: #000;
    font-size: 0.65em;
    font-weight: bold;
    letter-spacing: 0.5px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    margin-left: 6px;
    vertical-align: middle;
}

.pro-badge.small {
    padding: 2px 5px;
    font-size: 0.55em;
}

/* Supporter Badge */
.supporter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    color: #1a0a2e;
    /* Dark purple-black — contrast ≥9:1 against gradient (WCAG AA+) */
    font-size: 0.65em;
    font-weight: bold;
    letter-spacing: 0.5px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
    margin-left: 6px;
    vertical-align: middle;
}

.supporter-badge.small {
    padding: 2px 5px;
    font-size: 0.55em;
}

/* Badge Animations */
.animate-badge {
    animation: badge-pulse 1.5s ease-in-out infinite alternate, badge-shake 0.82s cubic-bezier(.36, .07, .19, .97) both;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

@keyframes badge-pulse {
    from {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.4);
        transform: scale(1);
    }

    to {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
        transform: scale(1.1);
    }
}

.supporter-badge.animate-badge {
    animation: supporter-pulse 1.5s ease-in-out infinite alternate, badge-shake 0.82s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes supporter-pulse {
    from {
        box-shadow: 0 0 5px rgba(236, 72, 153, 0.4);
        transform: scale(1);
    }

    to {
        box-shadow: 0 0 20px rgba(236, 72, 153, 0.8);
        transform: scale(1.1);
    }
}

@keyframes badge-shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Feature Gate Container */
.pro-feature {
    position: relative;
    flex-grow: 1;
    display: grid;
    grid-template-areas: "gate";
    width: 100%;
    min-height: 100px;
    overflow: visible;
    /* Prevent clipping of glow effects */
}

.pro-feature-panel {
    min-height: max(680px, calc(100vh - 170px));
}

.pro-feature-content,
.pro-gate-overlay {
    grid-area: gate;
}

.pro-feature.locked {
    min-height: 440px;
    /* Base height for standard gate cards */
}

.pro-feature.locked.pro-feature-panel {
    min-height: max(680px, calc(100vh - 170px));
}

.pro-feature.locked .pro-feature-content {
    filter: blur(5px);
    opacity: 0.46;
    pointer-events: none;
    user-select: none;
}

.pro-feature.unlocked .pro-feature-content {
    filter: none;
    opacity: 1;
}

.pro-gate-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(2rem, 6vh, 4.5rem) 1rem 2rem;
    background:
        linear-gradient(180deg, rgba(9, 13, 19, 0.74), rgba(9, 13, 19, 0.56) 42%, rgba(9, 13, 19, 0.82)),
        rgba(10, 11, 14, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10;
    border-radius: inherit;
}

.pro-gate-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    background: color-mix(in srgb, var(--widget-bg) 88%, #05080d);
    border: 1px solid color-mix(in srgb, var(--accent-color) 34%, var(--border-color));
    border-radius: 14px;
    padding: 32px;
    text-align: center;
    width: 100%;
    max-width: min(560px, calc(100vw - 32px));
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.58),
        0 0 34px color-mix(in srgb, var(--accent-color) 12%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.pro-gate-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: clamp(1.25rem, 2.2vw, 1.55rem);
    margin: 0;
    color: var(--text-primary);
}

.pro-gate-description {
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
    font-size: 0.9rem;
    max-width: 45ch;
}

.pro-gate-features {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 6px 0 8px;
    border-radius: 8px;
}

.pro-gate-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    font-size: 0.9rem;
    min-height: 34px;
    padding: 0 2px;
}

.pro-gate-feature-item--detailed {
    align-items: flex-start;
    gap: 12px;
}

.pro-gate-check {
    color: var(--accent-color);
    font-weight: bold;
}

.pro-gate-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent-color) 16%, transparent);
    color: var(--accent-color);
}

.pro-gate-feature-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.pro-gate-feature-copy strong {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.pro-gate-feature-copy small {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.pro-gate-upgrade-btn {
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, filter 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.pro-gate-upgrade-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Legacy classes for backwards compatibility */
.pro-gate-message {
    color: var(--pro-text);
    font-size: 0.9em;
    text-align: center;
    margin: 0;
}

.pro-gate-cta {
    background: var(--accent-gradient);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8em;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.pro-gate-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

/* Dev Pro Toggle Button (remove in production) */
.dev-pro-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 16px;
    background: rgba(30, 30, 40, 0.95);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 8px;
    color: #fff;
    font-size: 0.85em;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.dev-pro-toggle:hover {
    background: rgba(40, 40, 50, 0.95);
    border-color: #ffd700;
    transform: scale(1.05);
}

/* Mobile: Make Pro toggle smaller */
@media (max-width: 768px) {
    .dev-pro-toggle {
        bottom: 8px;
        right: 8px;
        padding: 6px 10px;
        font-size: 0.7em;
        opacity: 0.7;
    }

    .dev-pro-toggle:hover {
        opacity: 1;
    }

    .pro-gate-overlay {
        padding: 1.25rem;
        align-items: flex-start;
    }

    .pro-gate-card {
        padding: 1.35rem 1rem;
    }

    .pro-gate-title {
        font-size: 1.25rem;
    }

    .pro-gate-description {
        font-size: 0.82rem;
        margin-bottom: 1rem;
    }

    .pro-gate-features {
        gap: 0.65rem;
    }
}
