/* ============================================
   PLAN FEATURES STYLING
   Stili per gestione features Base/Premium
   ============================================ */

/* Feature Locked State */
.feature-locked {
    position: relative;
    pointer-events: none;
    user-select: none;
}

.feature-locked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    border-radius: inherit;
    z-index: 1;
}

[data-theme="dark"] .feature-locked::after {
    background: rgba(26, 26, 36, 0.7);
}

/* Premium Badge on Elements */
.premium-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #1a1d2e;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    animation: badge-pulse 2s ease-in-out infinite;
}

.premium-badge i {
    font-size: 0.75rem;
}

@keyframes badge-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Plan Badge in Header */
.plan-badge-header {
    margin-left: auto;
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Upgrade Modal Overlay */
.upgrade-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Upgrade Modal */
.upgrade-modal {
    background: white;
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: scaleIn 0.3s ease;
    text-align: center;
}

[data-theme="dark"] .upgrade-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modal Close Button */
.upgrade-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-gray);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.upgrade-modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Modal Icon */
.upgrade-modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3);
}

.upgrade-modal-icon i {
    font-size: 2.5rem;
    color: #1a1d2e;
}

/* Modal Title */
.upgrade-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

/* Modal Description */
.upgrade-modal-description {
    color: var(--text-gray);
    font-size: 1rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.upgrade-modal-description strong {
    color: var(--brand-primary);
    font-weight: 600;
}

/* Benefits List */
.upgrade-modal-benefits {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: left;
}

.upgrade-benefit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.upgrade-benefit i {
    color: var(--success);
    font-size: 1.125rem;
    flex-shrink: 0;
}

/* Price Display */
.upgrade-modal-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.upgrade-price-label {
    font-size: 1rem;
    color: var(--text-gray);
}

.upgrade-price-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--brand-primary);
}

.upgrade-price-period {
    font-size: 0.9375rem;
    color: var(--text-gray);
}

/* Modal CTA Button */
.upgrade-modal-cta {
    width: 100%;
    padding: 18px 32px;
    font-size: 1.125rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
}

.upgrade-modal-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(91, 99, 245, 0.4);
}

/* Modal Footer */
.upgrade-modal-footer {
    font-size: 0.8125rem;
    color: var(--text-gray);
    margin: 0;
}

/* Premium Only Sections */
[data-premium-only] {
    position: relative;
}

/* Responsive */
@media (max-width: 768px) {
    .upgrade-modal {
        padding: 32px 24px;
        margin: 20px;
    }

    .upgrade-modal-title {
        font-size: 1.5rem;
    }

    .upgrade-price-value {
        font-size: 2rem;
    }

    .premium-badge {
        font-size: 0.65rem;
        padding: 3px 10px;
    }
}

/* Animations for locked features */
.feature-locked:hover::after {
    background: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .feature-locked:hover::after {
    background: rgba(26, 26, 36, 0.8);
}

/* Tooltip for locked features */
.feature-locked[title] {
    cursor: help;
}