/* =================== LOGITERA GLOBAL SWEETALERT2 =================== */

/* --- Popup (global — applies to ALL Swal2 dialogs) --- */
body.is-dark div:where(.swal2-container) div:where(.swal2-popup),
.swal2-popup {
    background: rgb(31, 31, 35) !important;
    border: 1px solid rgba(121, 123, 242, 0.3) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6) !important;
    padding: 32px !important;
}

/* Title */
.swal2-popup .swal2-title {
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    color: #fff !important;
    margin-bottom: 12px !important;
}

/* Text Content */
.swal2-popup .swal2-html-container {
    color: #ccc !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
}

/* --- Buttons --- */
.swal2-popup .swal2-confirm {
    background: #797bf2 !important;
    border-radius: 8px !important;
    padding: 10px 28px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    box-shadow: 0 4px 12px rgba(121, 123, 242, 0.4) !important;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
    border: none !important;
}

.swal2-popup .swal2-confirm:hover {
    background: #6668db !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(121, 123, 242, 0.6) !important;
}

.swal2-popup .swal2-deny {
    background: #ef4444 !important;
    border-radius: 8px !important;
    padding: 10px 28px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
    border: none !important;
}

.swal2-popup .swal2-deny:hover {
    background: #dc2626 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6) !important;
}

.swal2-popup .swal2-cancel {
    background: #6b7280 !important;
    border-radius: 8px !important;
    padding: 10px 28px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4) !important;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
    border: none !important;
}

.swal2-popup .swal2-cancel:hover {
    background: #4b5563 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.6) !important;
}

/* --- Icons --- */
.swal2-popup .swal2-icon {
    border-width: 3px !important;
    margin: 20px auto 16px !important;
}

.swal2-popup .swal2-icon.swal2-success {
    border-color: #10b981 !important;
}

.swal2-popup .swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.swal2-popup .swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #10b981 !important;
}

.swal2-popup .swal2-icon.swal2-error {
    border-color: #ef4444 !important;
}

.swal2-popup .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #ef4444 !important;
}

.swal2-popup .swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}

.swal2-popup .swal2-icon.swal2-info {
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
}

.swal2-popup .swal2-icon.swal2-question {
    border-color: #797bf2 !important;
    color: #797bf2 !important;
}

/* --- Actions --- */
.swal2-popup .swal2-actions {
    gap: 12px !important;
    margin-top: 20px !important;
}

/* --- Backdrop --- */
.swal2-container {
    background: rgba(0, 0, 0, 0.75) !important;
    z-index: 2000000 !important;
}

/* --- Timer progress bar --- */
.swal2-timer-progress-bar {
    background: rgba(121, 123, 242, 0.8) !important;
}

/* --- Close button --- */
.swal2-popup .swal2-close {
    color: #999 !important;
    font-size: 2rem !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
}

.swal2-popup .swal2-close:hover {
    color: #fff !important;
    transform: rotate(90deg);
}

/* --- Animations --- */
@keyframes logitera-swal-show {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes logitera-swal-hide {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
}

.swal2-show {
    animation: logitera-swal-show 0.3s ease !important;
}

.swal2-hide {
    animation: logitera-swal-hide 0.2s ease !important;
}

/* =================== LIGHT MODE OVERRIDES =================== */

body:not(.is-dark) .swal2-popup {
    background: var(--logi-theme-bg-card) !important;
    border-color: var(--logi-theme-border) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
}

body:not(.is-dark) .swal2-popup .swal2-title {
    color: var(--logi-theme-text-primary) !important;
}

body:not(.is-dark) .swal2-popup .swal2-html-container {
    color: var(--logi-theme-text-secondary) !important;
}

body:not(.is-dark) .swal2-popup .swal2-close {
    color: var(--logi-theme-text-muted) !important;
}

body:not(.is-dark) .swal2-popup .swal2-close:hover {
    color: var(--logi-theme-text-primary) !important;
}

body:not(.is-dark) .swal2-container {
    background: rgba(0, 0, 0, 0.4) !important;
}

/* =================== END LOGITERA SWEETALERT2 =================== */
