/* ============================================
   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";
    min-height: 100px;
    overflow: visible;
    /* Prevent clipping of glow effects */
}

.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-content {
    filter: blur(6px);
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}

.pro-feature.unlocked .pro-feature-content {
    filter: none;
    opacity: 1;
}

.pro-gate-overlay {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px 40px 16px;
    /* Added more space at bottom */
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.pro-gate-card {
    background: var(--popup-bg);
    border: 1px solid var(--accent-color);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    max-width: 380px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 15px var(--accent-glow);
}

.pro-gate-title {
    font-size: 1.5rem;
    margin: 0 0 0.75rem 0;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.pro-gate-features {
    text-align: left;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: var(--accent-bg);
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

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

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

.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;
    }
}