/**
 * Modal Profesional para Country Club Barranquilla
 * Diseño moderno y elegante
 * Version: 1.0.4
 */

/* Ocultar modal si el usuario está autenticado */
body.jwt-authenticated .jwt-modal-overlay,
body.jwt-authenticated .jwt-modal {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Ocultar contenido protegido por defecto */
.jwt-content-hidden {
    display: none !important;
}

/* Mostrar contenido cuando el usuario está autenticado */
body.jwt-authenticated .jwt-content-wrapper {
    display: block !important;
}

/* Modal container */
.jwt-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    animation: jwtFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.jwt-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Backdrop oscuro */
.jwt-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    backdrop-filter: blur(12px);
}

/* Dialog container */
.jwt-modal-dialog {
    position: relative;
    width: 90%;
    max-width: 520px;
    animation: jwtSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Content wrapper */
.jwt-modal-content-wrapper {
    background: #ffffff;
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Decoración sutil de fondo */
.jwt-modal-content-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

/* Icono del candado */
.jwt-modal-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 20px;
    position: relative;
}

.jwt-modal-icon-wrapper::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.1;
}

.jwt-lock-icon {
    width: 36px;
    height: 36px;
    color: #059669;
    filter: drop-shadow(0 2px 4px rgba(5, 150, 105, 0.2));
}

/* Título */
.jwt-modal-title {
    margin: 0 0 16px;
    font-size: 32px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1.2;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* Mensaje */
.jwt-modal-message {
    margin: 0 0 32px;
    font-size: 17px;
    line-height: 1.7;
    color: #64748b;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* Botones */
.jwt-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jwt-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 16px 32px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 33px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    width: 100% !important;
    outline: none !important;
    position: relative !important;
    overflow: hidden !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif !important;
    letter-spacing: -0.01em !important;
}

/* Botón primario */
.jwt-btn-primary {
    background: #D2966E !important;
    background-color: #D2966E !important;
    color: #ffffff !important;
    box-shadow: 
        0 4px 14px 0 rgba(210, 150, 110, 0.4),
        0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    border-radius: 33px !important;
    border: none !important;
}

.jwt-btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 33px;
}

.jwt-btn-primary:hover {
    transform: translateY(-2px) !important;
    background: #c08860 !important;
    background-color: #c08860 !important;
    box-shadow: 
        0 10px 24px 0 rgba(210, 150, 110, 0.5),
        0 4px 6px 0 rgba(0, 0, 0, 0.1) !important;
}

.jwt-btn-primary:hover::before {
    opacity: 1;
}

.jwt-btn-primary:active {
    transform: translateY(0);
}

.jwt-btn-icon {
    width: 20px;
    height: 20px;
}

/* Botón secundario (texto) */
.jwt-btn-text {
    background: transparent !important;
    background-color: transparent !important;
    color: #081f24 !important;
    padding: 12px 24px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    border: 2px solid #081f24 !important;
    border-radius: 33px !important;
}

.jwt-btn-text:hover {
    color: #081f24 !important;
    background: rgba(8, 31, 36, 0.05) !important;
    background-color: rgba(8, 31, 36, 0.05) !important;
    border-color: #081f24 !important;
}

/* Contenido bloqueado */
.jwt-content-blocked {
    filter: blur(10px);
    user-select: none;
    pointer-events: none;
    opacity: 0.4;
    position: relative;
}

/* Prevenir scroll */
body.jwt-modal-open {
    overflow: hidden;
}

/* Animaciones */
@keyframes jwtFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive */
@media (max-width: 640px) {
    .jwt-modal-dialog {
        width: 95%;
        max-width: none;
    }
    
    .jwt-modal-content-wrapper {
        padding: 36px 28px;
        border-radius: 20px;
    }
    
    .jwt-modal-icon-wrapper {
        width: 64px;
        height: 64px;
        margin-bottom: 20px;
    }
    
    .jwt-lock-icon {
        width: 28px;
        height: 28px;
    }
    
    .jwt-modal-title {
        font-size: 26px;
        margin-bottom: 12px;
    }
    
    .jwt-modal-message {
        font-size: 16px;
        margin-bottom: 28px;
        line-height: 1.6;
    }
    
    .jwt-btn {
        padding: 14px 24px;
        font-size: 15px;
        border-radius: 33px;
    }
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
    .jwt-modal-content-wrapper {
        background: #1e293b;
        box-shadow: 
            0 25px 50px -12px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(255, 255, 255, 0.05);
    }
    
    .jwt-modal-title {
        color: #f1f5f9;
    }
    
    .jwt-modal-message {
        color: #cbd5e1;
    }
    
    .jwt-modal-icon-wrapper {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.1) 100%);
    }
    
    .jwt-btn-text {
        color: #ffffff !important;
        border-color: #ffffff !important;
    }
    
    .jwt-btn-text:hover {
        color: #ffffff !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: #ffffff !important;
    }
}

/* Notice para shortcode */
.jwt-protected-notice {
    padding: 24px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 12px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: #065f46;
    margin: 20px 0;
}
