﻿/* Subscription Management Styles for Settings Page */

/* ================================
   MODERN SUBSCRIPTION CARDS
   ================================ */

#subscription-cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

/* ✅ NEW: Plan Label Badge positioned at top */
.plan-label-badge {
    position: absolute;
    top: 12px;
    left: 24px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #64748b;
    z-index: 2;
}

/* ✅ NEW: Usage Card Label */
.usage-card-label {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 20px;
}

/* Current Plan Card - ✅ REDESIGNED with horizontal layout */
.subscription-plan-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 60%, #eef2ff 100%); /* ✅ Subtle gradient */
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), /* outer */
                inset 0 1px 0 rgba(255,255,255,0.9), /* top inner highlight */
                inset 0 -8px 16px rgba(2, 6, 23, 0.04); /* ✅ Soft inner shadow */
    border: 2px solid rgba(37, 99, 235, 0.1);
    position: relative;             /* ✅ So label badge can be absolutely placed */
    padding-top: 36px;              /* ✅ Make room for the badge */
    overflow: hidden;               /* ✅ Clip hover ring */
    transition: transform 220ms ease, box-shadow 220ms ease, background-position 500ms ease; /* ✅ Micro animation */
    background-size: 200% 200%;
    background-position: 0% 0%;
    will-change: transform, box-shadow;
}

/* Hover micro-animation + elevated look */
.subscription-plan-card:hover {
    transform: translateY(-2px) scale(1.003);
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.12),
                inset 0 1px 0 rgba(255,255,255,0.9),
                inset 0 -10px 18px rgba(2, 6, 23, 0.05);
    background-position: 100% 100%; /* ✅ Gentle gradient drift */
}

/* Apply same visual to usage card for consistency */
.subscription-usage-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 60%, #eef2ff 100%);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08),
                inset 0 1px 0 rgba(255,255,255,0.9),
                inset 0 -8px 16px rgba(2, 6, 23, 0.04);
    border: 2px solid rgba(37, 99, 235, 0.1);
    transition: transform 220ms ease, box-shadow 220ms ease, background-position 500ms ease;
    background-size: 200% 200%;
    background-position: 0% 0%;
    will-change: transform, box-shadow;
}

.subscription-usage-card:hover {
    transform: translateY(-2px) scale(1.003);
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.12),
                inset 0 1px 0 rgba(255,255,255,0.9),
                inset 0 -10px 18px rgba(2, 6, 23, 0.05);
    background-position: 100% 100%;
}

/* ✅ NEW: Card Header Layout */
.plan-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

/* ✅ NEW: Center Section - Plan Info */
.plan-center-section {
    flex: 1;
    text-align: center;
}

.plan-name {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.plan-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2563eb;
}

/* ✅ NEW: Actions Section */
.plan-actions-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

/* ✅ NEW: Modern Upgrade Button */
.upgrade-button-modern {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    text-transform: uppercase;
}

.upgrade-button-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
}

.upgrade-button-modern:active {
    transform: translateY(0);
}

/* ✅ NEW: Manage Billing Link */
.manage-billing-link {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    transition: all 0.2s ease;
    text-decoration: underline;
    text-decoration-color: transparent;
}

.manage-billing-link:hover {
    color: #1d4ed8;
    text-decoration-color: #1d4ed8;
}

/* ✅ NEW: Usage Summary */
.usage-summary {
    margin-bottom: 24px;
}

.usage-text {
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 600;
    text-align: center;
}

.usage-count {
    font-size: 2rem;
    font-weight: 800;
    color: #2563eb;
}

.usage-label {
    font-size: 1rem;
    color: #64748b;
    margin: 0 8px;
}

.usage-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

/* ✅ NEW: Animated Usage Bar */
.usage-bar-container {
    margin-bottom: 24px;
}

.usage-bar-background {
    width: 100%;
    height: 32px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.usage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb 0%, #7c3aed 50%, #db2777 100%);
    border-radius: 16px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

/* ✅ NEW: Shimmer Effect on Progress Bar */
.usage-bar-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ✅ NEW: Usage Details Grid */
.usage-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.usage-detail-item {
    text-align: center;
}

.usage-detail-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 6px;
}

.usage-detail-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

/* ✅ NEW: Upgrade Prompt at Bottom */
.usage-upgrade-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding-top: 20px;
    border-top: 2px solid rgba(37, 99, 235, 0.1);
}

.usage-upgrade-prompt span {
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
}

.upgrade-prompt-button {
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #2563eb, #7c3aed) border-box;
    border: 2px solid transparent;
    color: #2563eb;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.upgrade-prompt-button:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Focus ring when interacting with controls inside the cards */
.subscription-plan-card:focus-within,
.subscription-usage-card:focus-within {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12),
                0 8px 20px rgba(2, 6, 23, 0.12),
                inset 0 1px 0 rgba(255,255,255,0.9),
                inset 0 -8px 16px rgba(2, 6, 23, 0.04);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .subscription-plan-card,
    .subscription-usage-card {
        transition: none;
        background-position: 0% 0% !important;
    }
    .subscription-plan-card:hover,
    .subscription-usage-card:hover {
        transform: none;
    }
    .usage-bar-fill {
        transition: width 0.3s ease;
    }
    .usage-bar-shine {
        animation: none;
    }
}

/* Dark mode adjustments */
.theme-dark .subscription-plan-card,
.theme-dark .subscription-usage-card {
    background: linear-gradient(135deg, #0b1220 0%, #0f172a 70%, #111827 100%);
    border: 2px solid rgba(59, 130, 246, 0.25);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55),
                inset 0 1px 0 rgba(255, 255, 255, 0.06),
                inset 0 -10px 18px rgba(2, 6, 23, 0.4);
}

.theme-dark .subscription-plan-card:hover,
.theme-dark .subscription-usage-card:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7),
                inset 0 1px 0 rgba(255, 255, 255, 0.08),
                inset 0 -12px 20px rgba(2, 6, 23, 0.5);
}

.theme-dark .plan-name { color: #e5e7eb; }
.theme-dark .plan-price { color: #93c5fd; }
.theme-dark .usage-text { color: #cbd5e1; }
.theme-dark .usage-count { color: #93c5fd; }
.theme-dark .usage-card-label,
.theme-dark .plan-label-badge { color: #9ca3af; }
.theme-dark .usage-detail-label { color: #94a3b8; }
.theme-dark .usage-detail-value { color: #e5e7eb; }
.theme-dark .usage-total { color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,0.6); }
.theme-dark .usage-label { color: #9ca3af; }

.theme-dark .usage-bar-background {
    background: linear-gradient(135deg, #1f2937 0%, #0f172a 100%);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

.theme-dark .usage-bar-fill {
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.45);
}

.theme-dark .usage-upgrade-prompt span { color: #9ca3af; }
.theme-dark .upgrade-prompt-button {
    color: #eaf2ff;
    background: linear-gradient(#0b1220, #0b1220) padding-box,
                linear-gradient(135deg, #2563eb, #7c3aed) border-box;
    border: 2px solid transparent;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}
.theme-dark .upgrade-prompt-button:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .subscription-plan-card,
    .subscription-usage-card {
        padding: 24px 20px;
    }
    
    .plan-card-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .plan-info-section,
    .plan-header-left {
        min-width: auto;
    }
    
    .plan-name {
        font-size: 1.5rem; /* ✅ Smaller on mobile */
    }
    
    /* ✅ NEW: Center section on mobile */
    .plan-center-section {
        padding: 16px 0;
        border-top: 2px solid rgba(37, 99, 235, 0.1);
        border-bottom: 2px solid rgba(37, 99, 235, 0.1);
        margin: 16px 0;
    }
    
    .plan-actions-section,
    .plan-header-right {
        align-items: stretch;
        width: 100%;
    }
    
    .upgrade-button-modern {
        width: 100%;
        text-align: center;
    }
    
    .manage-billing-link {
        text-align: center;
    }
    
    .usage-text {
        font-size: 1.2rem;
    }
    
    .usage-count {
        font-size: 1.5rem;
    }
    
    .usage-total {
        font-size: 1.2rem;
    }
    
    .usage-details-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .usage-upgrade-prompt {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .upgrade-prompt-button {
        width: 100%;
    }
    
    /* ✅ MOBILE SCROLL FIX: Ensure body can always scroll */
    body {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
        height: auto !important;
        min-height: 100vh;
        position: relative;
    }
    
    html {
        overflow-y: auto !important;
        height: auto !important;
    }
    
    /* ✅ Ensure container doesn't block scrolling */
    .container {
        overflow: visible;
        height: auto;
        min-height: auto;
    }
    
    /* ✅ Fix premium card overlays on mobile */
    .premium-overlay {
        overflow-y: visible;                /* ✅ ALLOW VERTICAL SCROLLING */
        -webkit-overflow-scrolling: touch; /* ✅ Smooth scrolling on iOS */
        max-height: 80vh;                  /* ✅ Restrict maximum height */
    }
    
    .premium-overlay-content {
        max-height: none;                /* ✅ Allow content to flow */
    }
}

/* ================================
   OLD SUBSCRIPTION STYLES (Kept for backwards compatibility)
   ================================ */

/* Subscription Card */
#subscription-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(124, 58, 237, 0.05));
    border: 2px solid rgba(37, 99, 235, 0.2);
}

/* Force card title to be dark */
#subscription-card .card-title {
    color: #0f172a !important;
}

.subscription-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(37, 99, 235, 0.15);
}

.plan-info {
    flex: 1;
    min-width: 200px;
}

.plan-name-display {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a !important;
    margin-bottom: 6px;
    line-height: 1.2;
}

.plan-price-display {
    font-size: 1.1rem;
    color: #2563eb !important;
    font-weight: 600;
}

.plan-status-badge {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.plan-status-badge.active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white !important;
    border: none;
}

.plan-status-badge.trial {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white !important;
    border: none;
}

.subscription-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-label {
    font-size: 0.8rem;
    color: #64748b !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1.25rem;
    color: #0f172a !important;
    font-weight: 700;
}

.subscription-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 8px;
    flex-wrap: wrap;
}

.manage-subscription-btn {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.upgrade-btn {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
}

.upgrade-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

/* ========================================
   PREMIUM FEATURES STYLES - MODERN SAAS SOFT-LOCK PATTERN
   ======================================== */

.premium-feature {
    position: relative;
    overflow: visible;
    min-height: 320px;
    transition: all 0.3s ease;
}

/* ✅ NEW: Modern soft-lock approach - NO BLOCKING OVERLAY */
.premium-feature.locked {
    /* Subtle visual indication of locked state */
    opacity: 0.85;
}

/* ✅ NEW: Inline upgrade banner (replaces blocking overlay) */
.premium-upgrade-banner {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border-radius: 12px 12px 0 0;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    margin-bottom: 20px;
}

.premium-upgrade-banner-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.premium-upgrade-icon {
    font-size: 1.8rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.premium-upgrade-text {
    flex: 1;
}

.premium-upgrade-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: white;
    margin: 0 0 4px 0;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.premium-upgrade-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.3;
}

.premium-upgrade-price {
    font-weight: 700;
    color: #fbbf24;
}

/* ✅ NEW: CTA button (always clickable, in normal document flow) */
.premium-upgrade-cta {
    background: white;
    color: #2563eb;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.premium-upgrade-cta:hover {
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.premium-upgrade-cta:active {
    transform: translateY(0);
}

/* ✅ NEW: Locked content area (subtle blur, not blocking) */
.premium-feature.locked .card-body {
    filter: blur(2px);
    opacity: 0.6;
    pointer-events: none; /* Prevent interaction with blurred content */
    user-select: none;
}

/* ✅ NEW: Feature benefits list (visible before upgrade) */
.premium-benefits-preview {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.premium-benefits-preview li {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.premium-benefits-preview li::before {
    content: '✨';
    font-size: 0.85rem;
}

/* ✅ REMOVED: Old blocking overlay (causes pointer-event issues) */
.premium-overlay {
    display: none !important; /* Completely remove blocking overlay */
}

/* ✅ NEW: Premium badge (inline, not overlay) */
.premium-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(251, 191, 36, 0.4);
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

/* ========================================
   PREMIUM FEATURES STYLES - EXTERNAL BANNER PATTERN
   ======================================== */

.premium-feature {
    position: relative;
    min-height: 200px;
    transition: all 0.3s ease;
}

/* ✅ BLURRED STATE: Simple blur effect on locked cards */
.premium-feature-blurred {
    filter: blur(3px);
    opacity: 0.6;
    pointer-events: none;
    user-select: none;
}

/* ✅ UNLOCKED STATE: Remove blur */
.premium-feature.unlocked {
    filter: none;
    opacity: 1;
    pointer-events: auto;
}

/* ✅ EXTERNAL BANNER: Sits ABOVE card, not inside it */
.premium-upgrade-banner-external {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 12px; /* Space between banner and card */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.premium-upgrade-banner-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.premium-upgrade-icon {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
    flex-shrink: 0;
}

.premium-upgrade-text {
    flex: 1;
}

.premium-upgrade-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
    margin: 0 0 6px 0;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.premium-upgrade-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    line-height: 1.4;
}

.premium-upgrade-price {
    font-weight: 800;
    color: #fbbf24;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ✅ EXTERNAL CTA BUTTON: Guaranteed clickable, no z-index conflicts */
.premium-upgrade-cta-external {
    background: white;
    color: #2563eb;
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.premium-upgrade-cta-external:hover {
    background: #f0f9ff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.premium-upgrade-cta-external:active {
    transform: translateY(0) scale(1);
}

/* ✅ PREMIUM BADGE: Top-right corner */
.premium-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
    z-index: 10;
}

/* ✅ DEV MODE BADGE */
.premium-feature.unlocked .premium-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* ✅ MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .premium-upgrade-banner-external {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 20px;
    }
    
    .premium-upgrade-banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .premium-upgrade-icon {
        font-size: 2.5rem;
    }
    
    .premium-upgrade-cta-external {
        width: 100%;
        padding: 16px 24px;
    }
    
    .premium-feature-blurred {
        filter: blur(2px); /* Less blur on mobile for readability */
    }
}

/* ✅ REMOVE OLD STYLES */
.premium-upgrade-banner,
.premium-overlay {
    display: none !important; /* Hide any old inline banners/overlays */
}

/* ================================
   PRICING CTA CARD
   ================================ */

.pricing-cta-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 60%, #bfdbfe 100%);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.15),
                inset 0 1px 0 rgba(255,255,255,0.9);
    border: 2px solid rgba(37, 99, 235, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pricing-cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.pricing-cta-card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25),
                inset 0 1px 0 rgba(255,255,255,0.9);
    border-color: rgba(37, 99, 235, 0.3);
}

.pricing-cta-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1;
}

.pricing-cta-icon {
    font-size: 3rem;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.3));
    animation: bounce-subtle 2s ease-in-out infinite;
}

@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.pricing-cta-text {
    flex: 1;
}

.pricing-cta-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1e40af;
    margin: 0 0 8px 0;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.pricing-cta-subtitle {
    font-size: 0.95rem;
    color: #1e3a8a;
    margin: 0;
    line-height: 1.5;
    opacity: 0.9;
}

.pricing-cta-button {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    z-index: 1;
    position: relative;
}

.pricing-cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.pricing-cta-button:hover::before {
    opacity: 1;
}

.pricing-cta-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.5);
}

.pricing-cta-button:active {
    transform: translateY(-1px) scale(1.02);
}

.pricing-cta-button-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.pricing-cta-button-text {
    font-size: 1rem;
    letter-spacing: 0.3px;
}

.pricing-cta-button-arrow {
    font-size: 1.3rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

.pricing-cta-button:hover .pricing-cta-button-arrow {
    transform: translateX(4px);
}

/* Dark mode */
.theme-dark .pricing-cta-card {
    background: linear-gradient(135deg, #0b1220 0%, #0f172a 70%, #111827 100%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.theme-dark .pricing-cta-card:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.theme-dark .pricing-cta-title { color: #93c5fd; }
.theme-dark .pricing-cta-subtitle { color: #bfdbfe; opacity: 0.95; }

/* Mobile responsive */
@media (max-width: 768px) {
    .pricing-cta-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 24px;
    }
    
    .pricing-cta-content {
        flex-direction: column;
        text-align: center;
    }
    
    .pricing-cta-icon {
        font-size: 3.5rem;
    }
    
    .pricing-cta-title {
        font-size: 1.2rem;
    }
    
    .pricing-cta-subtitle {
        font-size: 0.9rem;
    }
    
    .pricing-cta-button {
        width: 100%;
        justify-content: center;
        padding: 18px 24px;
        font-size: 1.05rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .pricing-cta-card::before,
    .pricing-cta-icon {
        animation: none;
    }
    
    .pricing-cta-button-arrow {
        transition: none;
    }
    
    .pricing-cta-button:hover .pricing-cta-button-arrow {
        transform: none;
    }
}
