/* ============================================================
   SWEETALERT2 CUSTOM STYLES – Estilos personalizados para SweetAlert2
   ============================================================
   Estos estilos personalizan la apariencia de SweetAlert2 para
   coincidir con el tema gamer/dark de Muelitas Clínica Gamer.
   ============================================================ */

/* === POPUP CONTAINER === */
.swal-popup {
    background: #160834 !important;
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 
                0 0 20px rgba(124, 58, 237, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* === TITLES === */
.swal-title {
    color: #ffffff !important;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem !important;
    line-height: 1.8;
    margin-bottom: 0.5em !important;
}

/* === CONTENT === */
.swal-content {
    color: #e8deff !important;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}

/* === ICONS === */
.swal-icon {
    border-color: rgba(124, 58, 237, 0.3) !important;
    color: #7c3aed !important;
}

.swal-icon .swal2-icon-content {
    font-size: 3rem;
}

/* === BUTTONS === */
.swal-actions {
    margin-top: 1.5em !important;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.swal-btn-confirm,
.swal2-confirm {
    background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
    color: white !important;
    font-weight: 700 !important;
    padding: 14px 32px !important;
    border-radius: 50px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 1rem !important;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4) !important;
    position: relative !important;
    overflow: hidden !important;
}

.swal-btn-confirm:hover,
.swal2-confirm:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.6), 
                0 0 20px rgba(57, 255, 20, 0.3) !important;
}

.swal-btn-confirm::before,
.swal2-confirm::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg) translateY(-100%);
    transition: transform 0.5s;
}

.swal-btn-confirm:hover::before,
.swal2-confirm:hover::before {
    transform: rotate(45deg) translateY(100%);
}

.swal-btn-cancel,
.swal2-cancel {
    background: transparent !important;
    color: #b39ddb !important;
    border: 2px solid #7c3aed !important;
    font-weight: 600 !important;
    padding: 12px 30px !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 1rem !important;
}

.swal-btn-cancel:hover,
.swal2-cancel:hover {
    background: rgba(124, 58, 237, 0.15) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3) !important;
}

/* === TOAST NOTIFICATIONS === */
.swal2-popup.swal2-toast {
    background: rgba(22, 8, 52, 0.95) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(124, 58, 237, 0.3) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4) !important;
}

.swal2-toast .swal2-title {
    color: #ffffff !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

.swal2-toast .swal2-icon {
    margin: 0 0.5em 0 0 !important;
}

/* === TIMER PROGRESS BAR === */
.swal2-timer-progress-bar {
    background: linear-gradient(to right, #7c3aed, #39ff14) !important;
}

/* === INPUT FIELDS === */
.swal2-input,
.swal2-textarea,
.swal2-select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(124, 58, 237, 0.3) !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    padding: 14px 18px !important;
    transition: all 0.3s ease !important;
}

.swal2-input:focus,
.swal2-textarea:focus,
.swal2-select:focus {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2) !important;
    outline: none !important;
}

.swal2-input::placeholder,
.swal2-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* === VALIDATION MESSAGE === */
.swal2-validation-message {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: #f87171 !important;
    border-radius: 8px !important;
    font-size: 0.875rem !important;
}

/* === BACKDROP === */
.swal2-backdrop-show {
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

/* === ANIMATIONS === */
.swal-animate-show {
    animation: swal-show 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.swal-animate-hide {
    animation: swal-hide 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.swal-animate-backdrop-show {
    animation: swal-fade-in 0.3s ease-out;
}

.swal-animate-backdrop-hide {
    animation: swal-fade-out 0.3s ease-in;
}

@keyframes swal-show {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes swal-hide {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0;
    }
}

@keyframes swal-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes swal-fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* === LOADING SPINNER === */
.swal2-loader {
    border-color: #7c3aed !important;
    border-right-color: transparent !important;
}

/* === FOOTER === */
.swal2-footer {
    border-top: 1px solid rgba(124, 58, 237, 0.2) !important;
    color: #b39ddb !important;
    font-size: 0.875rem !important;
    margin-top: 1.5em !important;
    padding-top: 1em !important;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .swal-popup {
        width: 90% !important;
        margin: 0.5em !important;
    }
    
    .swal-title {
        font-size: 1rem !important;
    }
    
    .swal-content {
        font-size: 0.9rem !important;
    }
    
    .swal-btn-confirm,
    .swal2-confirm,
    .swal-btn-cancel,
    .swal2-cancel {
        padding: 12px 24px !important;
        font-size: 0.9rem !important;
        flex: 1;
    }
}

/* === DARK MODE ENHANCEMENTS === */
@media (prefers-color-scheme: dark) {
    .swal-popup {
        background: #100326 !important;
        border-color: rgba(124, 58, 237, 0.4) !important;
    }
}
