/* Sweet Alert Custom - Dark Purple Theme */

/* Popup Container */
.swal2-popup {
    border-radius: 28px !important;
    padding: 3rem 2.5rem !important;
    background: linear-gradient(145deg, #1a1147 0%, #251862 50%, #1e1548 100%) !important;
    box-shadow: 
        0 50px 100px rgba(0, 0, 0, 0.5),
        0 25px 50px rgba(124, 92, 255, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(124, 92, 255, 0.2) !important;
    border: none !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Animated Background Glow */
.swal2-popup::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(124, 92, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    animation: glow-rotate 10s linear infinite;
    pointer-events: none;
}

@keyframes glow-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Top Gold Accent */
.swal2-popup::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #ffd700 50%, 
        transparent 100%);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

/* Icon Container */
.swal2-icon {
    margin: 1.5rem auto 2rem !important;
    width: 100px !important;
    height: 100px !important;
    border: none !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Question Icon */
.swal2-icon.swal2-question {
    background: linear-gradient(135deg, #7c5cff 0%, #a78bfa 100%) !important;
    border: 4px solid rgba(255, 215, 0, 0.3) !important;
    box-shadow: 
        0 15px 50px rgba(124, 92, 255, 0.5),
        0 0 0 8px rgba(124, 92, 255, 0.2),
        0 0 30px rgba(255, 215, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2) !important;
    animation: float-pulse 3s ease-in-out infinite !important;
}

.swal2-icon.swal2-question::before {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(124, 92, 255, 0.4) 0deg,
        rgba(255, 215, 0, 0.4) 90deg,
        rgba(124, 92, 255, 0.4) 180deg,
        rgba(255, 215, 0, 0.4) 270deg,
        rgba(124, 92, 255, 0.4) 360deg
    );
    filter: blur(8px);
    z-index: -1;
    animation: spin 4s linear infinite;
}

.swal2-icon.swal2-question .swal2-icon-content {
    font-size: 4rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    text-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(255, 215, 0, 0.5) !important;
}

/* Warning Icon */
.swal2-icon.swal2-warning {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    border: 4px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 
        0 15px 50px rgba(251, 191, 36, 0.5),
        0 0 0 8px rgba(251, 191, 36, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.2) !important;
    animation: float-pulse 3s ease-in-out infinite !important;
}

.swal2-icon.swal2-warning .swal2-icon-content {
    font-size: 4rem !important;
    color: #1a1147 !important;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.3) !important;
    font-weight: 900 !important;
}

/* Success Icon */
.swal2-icon.swal2-success {
    border: 4px solid rgba(16, 185, 129, 0.4) !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 
        0 15px 50px rgba(16, 185, 129, 0.5),
        0 0 0 8px rgba(16, 185, 129, 0.2) !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #ffffff !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Error Icon */
.swal2-icon.swal2-error {
    border: 4px solid rgba(239, 68, 68, 0.4) !important;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 
        0 15px 50px rgba(239, 68, 68, 0.5),
        0 0 0 8px rgba(239, 68, 68, 0.2) !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #ffffff !important;
}

/* Animations */
@keyframes float-pulse {
    0%, 100% { 
        transform: translateY(0) scale(1);
    }
    50% { 
        transform: translateY(-10px) scale(1.05);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Title */
.swal2-title {
    color: #ffffff !important;
    font-size: 2rem !important;
    font-weight: 900 !important;
    margin: 1rem 0 1rem !important;
    line-height: 1.3 !important;
    letter-spacing: -0.02em !important;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif !important;
    text-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(124, 92, 255, 0.3) !important;
    background: linear-gradient(135deg, #ffffff 0%, #e0d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

/* Text Content */
.swal2-html-container {
    color: #cbd5e1 !important;
    font-size: 1.0625rem !important;
    line-height: 1.7 !important;
    margin: 0 0 2.5rem !important;
    font-weight: 500 !important;
    font-family: 'Inter', sans-serif !important;
    position: relative;
    z-index: 1;
}

/* Actions Container */
.swal2-actions {
    gap: 16px !important;
    margin-top: 2.5rem !important;
    position: relative;
    z-index: 1;
}

/* Confirm Button - Purple Gold */
.swal2-confirm.btn-confirm {
    background: linear-gradient(135deg, #7c5cff 0%, #9b7dff 50%, #ffd700 100%) !important;
    background-size: 200% 100% !important;
    background-position: 0% 0% !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 1rem 2.5rem !important;
    font-size: 1.0625rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    box-shadow: 
        0 10px 30px rgba(124, 92, 255, 0.5),
        0 0 0 1px rgba(255, 215, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.3) !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    min-width: 170px !important;
    position: relative !important;
    overflow: hidden !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.swal2-confirm.btn-confirm::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.swal2-confirm.btn-confirm:hover {
    background-position: 100% 0% !important;
    box-shadow: 
        0 15px 40px rgba(255, 215, 0, 0.6),
        0 0 0 1px rgba(255, 215, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-4px) scale(1.05) !important;
}

.swal2-confirm.btn-confirm:hover::before {
    width: 400px;
    height: 400px;
}

.swal2-confirm.btn-confirm:active {
    transform: translateY(-2px) scale(0.98) !important;
}

.swal2-confirm.btn-confirm:focus {
    outline: none !important;
    box-shadow: 
        0 0 0 4px rgba(124, 92, 255, 0.4),
        0 10px 30px rgba(124, 92, 255, 0.5) !important;
}

/* Cancel Button - Dark Glass */
.swal2-cancel.btn-cancel {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    color: #e2e8f0 !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 14px !important;
    padding: 1rem 2.5rem !important;
    font-size: 1.0625rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    min-width: 170px !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
}

.swal2-cancel.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    transform: translateY(-4px) scale(1.05) !important;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
}

.swal2-cancel.btn-cancel:active {
    transform: translateY(-2px) scale(0.98) !important;
}

.swal2-cancel.btn-cancel:focus {
    outline: none !important;
    box-shadow: 
        0 0 0 4px rgba(255, 255, 255, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Close Button */
.swal2-close {
    color: #94a3b8 !important;
    font-size: 2rem !important;
    transition: all 0.3s ease !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.swal2-close:hover {
    color: #ffffff !important;
    background: rgba(239, 68, 68, 0.8) !important;
    transform: rotate(90deg) scale(1.1) !important;
}

/* Backdrop */
.swal2-container {
    backdrop-filter: blur(20px) saturate(180%) brightness(0.6) !important;
    background: 
        radial-gradient(circle at 30% 40%, rgba(124, 92, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(255, 215, 0, 0.15) 0%, transparent 50%),
        rgba(10, 7, 30, 0.85) !important;
    animation: backdrop-appear 0.3s ease-out;
}

@keyframes backdrop-appear {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Show Animation */
.swal2-popup.swal2-show {
    animation: popup-appear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes popup-appear {
    0% {
        transform: scale(0.7) translateY(-40px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .swal2-popup {
        width: 92% !important;
        padding: 2.5rem 2rem !important;
        border-radius: 24px !important;
    }

    .swal2-title {
        font-size: 1.75rem !important;
    }

    .swal2-html-container {
        font-size: 1rem !important;
        margin-bottom: 2rem !important;
    }

    .swal2-icon {
        width: 90px !important;
        height: 90px !important;
    }

    .swal2-icon.swal2-question .swal2-icon-content {
        font-size: 3.5rem !important;
    }

    .swal2-confirm.btn-confirm,
    .swal2-cancel.btn-cancel {
        padding: 0.875rem 2rem !important;
        font-size: 1rem !important;
        min-width: 150px !important;
    }
}

@media (max-width: 480px) {
    .swal2-popup {
        width: 95% !important;
        padding: 2rem 1.5rem !important;
    }

    .swal2-title {
        font-size: 1.5rem !important;
    }

    .swal2-icon {
        width: 80px !important;
        height: 80px !important;
    }

    .swal2-actions {
        flex-direction: column !important;
        width: 100% !important;
        gap: 12px !important;
    }

    .swal2-confirm.btn-confirm,
    .swal2-cancel.btn-cancel {
        width: 100% !important;
        min-width: unset !important;
    }
}
