/**
 * Modal de Módulo Restringido
 * Muestra información comercial cuando un usuario intenta acceder a un módulo no disponible
 */

/* Contenedor del Modal */
.module-restricted-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Overlay oscuro con blur */
.module-restricted-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

/* Contenido del Modal */
.module-restricted-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 540px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Botón de cerrar */
.module-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
    padding: 0;
}

.module-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
    transform: rotate(90deg);
}

/* Icono del Modal */
.module-modal-icon {
    margin: 0 auto 1.5rem;
    color: #0049ff;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Título */
.module-modal-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

/* Descripción */
.module-modal-description {
    font-size: 1.125rem;
    color: #4a5568;
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

/* Sección de Beneficios */
.module-modal-benefits {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0 0 2rem 0;
    text-align: left;
}

.module-modal-benefits h3 {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.module-modal-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.module-modal-benefits li {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9375rem;
    padding: 0.5rem 0;
    padding-left: 1.75rem;
    position: relative;
    line-height: 1.5;
}

.module-modal-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    background: rgba(255, 255, 255, 0.95);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    top: 0.5rem;
}

/* Botones de Acción */
.module-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0 0 1.5rem 0;
}

.module-btn-upgrade {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    border: none;
    border-radius: 10px;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none !important;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    font-family: inherit;
}

.module-btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.module-btn-cancel {
    background: transparent;
    color: #4a5568;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.module-btn-cancel:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #1a1a1a;
}

/* Footer del Modal */
.module-modal-footer {
    font-size: 0.875rem;
    color: #718096;
    margin: 0;
}

.module-modal-footer a {
    color: #0049ff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.module-modal-footer a:hover {
    text-decoration: underline;
}

/* Efecto de cursor no permitido para módulos restringidos */
.module-restricted-link {
    position: relative;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.module-restricted-link::after {
    content: '🔒';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.875rem;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 640px) {
    .module-restricted-content {
        padding: 2rem 1.5rem;
        width: 95%;
    }

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

    .module-modal-description {
        font-size: 1rem;
    }

    .module-btn-upgrade {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }

    .module-modal-benefits h3 {
        font-size: 1rem;
    }

    .module-modal-benefits li {
        font-size: 0.875rem;
    }
}

/* Prevenir scroll del body cuando el modal está abierto */
body.module-modal-open {
    overflow: hidden;
}
