/* ========================================
   PLAN BADGE - WIDGET DE PLAN EN SIDEBAR
   ======================================== */

.plan-badge-widget {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(99, 102, 241, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 1rem;
    margin: 1rem 0;
}

.plan-badge-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.plan-badge-header i {
    font-size: 1.2rem;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-badge-header span {
    font-weight: 600;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Plan Badge Types */
.plan-badge-widget.plan-pobre .plan-badge-header i {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-badge-widget.plan-pobre {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(22, 163, 74, 0.1));
    border-color: rgba(34, 197, 94, 0.3);
}

.plan-badge-widget.plan-empresarial .plan-badge-header i {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-badge-widget.plan-empresarial {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
    border-color: rgba(245, 158, 11, 0.3);
}

/* Usage Section */
.plan-usage {
    margin-bottom: 1rem;
}

.usage-item {
    margin-bottom: 0.75rem;
}

.usage-item:last-child {
    margin-bottom: 0;
}

.usage-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.usage-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 3px;
    overflow: hidden;
    margin: 0.25rem 0;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #6366f1);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress.warning {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.progress.danger {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.progress.success {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

/* For Unlimited Plans */
.usage-item.unlimited .progress-bar {
    display: none;
}

.usage-item.unlimited .usage-text {
    color: #22c55e;
}

.usage-item.unlimited .usage-text::after {
    content: ' ∞';
    font-size: 1rem;
}

/* Upgrade Button */
.btn-upgrade {
    width: 100%;
    padding: 0.625rem;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn-upgrade i {
    font-size: 0.9rem;
}

/* Hide upgrade button for empresarial plan */
.plan-badge-widget.plan-empresarial .btn-upgrade {
    display: none;
}

/* Upgrade Modal */
.upgrade-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.upgrade-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.upgrade-modal {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border-radius: 24px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.upgrade-modal-overlay.active .upgrade-modal {
    transform: scale(1) translateY(0);
}

.upgrade-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

.upgrade-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
}

.upgrade-modal-icon {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upgrade-modal-icon i {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upgrade-modal h3 {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    color: white;
}

.upgrade-modal p {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.upgrade-modal-limit {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.upgrade-modal-limit-text {
    font-size: 0.9rem;
    color: #ef4444;
    font-weight: 600;
}

.upgrade-modal-actions {
    display: flex;
    gap: 1rem;
}

.upgrade-modal-btn {
    flex: 1;
    padding: 0.875rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.95rem;
}

.upgrade-modal-btn-cancel {
    background: rgba(71, 85, 105, 0.3);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.5);
}

.upgrade-modal-btn-cancel:hover {
    background: rgba(71, 85, 105, 0.5);
}

.upgrade-modal-btn-upgrade {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.upgrade-modal-btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

/* Tooltip for features */
.feature-locked {
    position: relative;
    opacity: 0.5;
    pointer-events: none;
}

.feature-locked::after {
    content: '🔒 Disponible en plan superior';
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.feature-locked:hover::after {
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 968px) {

    /* Ocultar el badge de plan en móviles - ocupa mucho espacio */
    .plan-badge-widget {
        display: none !important;
    }
}

/* Solo para tablets y dispositivos pequeños (pero no móviles) */
@media (min-width: 969px) and (max-width: 1200px) {
    .plan-badge-widget {
        margin: 0.5rem 0;
        padding: 0.875rem;
    }

    .upgrade-modal {
        padding: 1.5rem;
    }

    .upgrade-modal h3 {
        font-size: 1.5rem;
    }

    .upgrade-modal-actions {
        flex-direction: column;
    }
}