/* ========================================
   SWEETALERT2 OLIVE GREEN THEME
   Theme-Aware (Works in both Light & Dark)
   ======================================== */

/* SweetAlert2 Popup Container */
.swal2-popup {
    background-color: var(--swal-bg) !important;
    color: var(--swal-text) !important;
    border: 2px solid var(--swal-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
}

/* SweetAlert2 Title */
.swal2-title {
    color: var(--swal-title) !important;
    font-weight: 600 !important;
}

/* SweetAlert2 HTML Content */
.swal2-html-container {
    color: var(--swal-text) !important;
}

/* SweetAlert2 Confirm Button */
.swal2-confirm {
    background-color: var(--swal-confirm-bg) !important;
    color: var(--btn-text) !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 12px 32px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(107, 142, 35, 0.3) !important;
}

.swal2-confirm:hover {
    background-color: var(--swal-confirm-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(107, 142, 35, 0.4) !important;
}

.swal2-confirm:focus {
    box-shadow: 0 0 0 4px var(--olive-alpha-30) !important;
}

/* SweetAlert2 Cancel Button */
.swal2-cancel {
    background-color: var(--swal-cancel-bg) !important;
    color: var(--text-inverse) !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 12px 32px !important;
    transition: all 0.3s ease !important;
}

.swal2-cancel:hover {
    background-color: var(--swal-cancel-hover) !important;
    transform: translateY(-2px) !important;
}

/* SweetAlert2 Deny Button */
.swal2-deny {
    background-color: var(--brand-warning) !important;
    color: var(--text-inverse) !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.swal2-deny:hover {
    background-color: var(--brand-warning-hover) !important;
    transform: translateY(-2px) !important;
}

/* SweetAlert2 Input */
.swal2-input,
.swal2-textarea,
.swal2-select {
    background-color: var(--input-bg) !important;
    border: 2px solid var(--input-border) !important;
    color: var(--input-text) !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.swal2-input:focus,
.swal2-textarea:focus,
.swal2-select:focus {
    border-color: var(--input-focus-border) !important;
    box-shadow: 0 0 0 4px var(--input-focus-shadow) !important;
    outline: none !important;
}

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

/* SweetAlert2 Icon Colors */
.swal2-icon.swal2-success {
    border-color: var(--swal-icon-success) !important;
    color: var(--swal-icon-success) !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: var(--swal-icon-success) !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: var(--swal-icon-success) !important;
}

.swal2-icon.swal2-error {
    border-color: var(--swal-icon-error) !important;
    color: var(--swal-icon-error) !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: var(--swal-icon-error) !important;
}

.swal2-icon.swal2-warning {
    border-color: var(--swal-icon-warning) !important;
    color: var(--swal-icon-warning) !important;
}

.swal2-icon.swal2-info {
    border-color: var(--swal-icon-info) !important;
    color: var(--swal-icon-info) !important;
}

.swal2-icon.swal2-question {
    border-color: var(--olive-primary) !important;
    color: var(--olive-primary) !important;
}

/* SweetAlert2 Timer Progress Bar */
.swal2-timer-progress-bar {
    background: linear-gradient(90deg, var(--olive-primary), var(--olive-light)) !important;
}

/* SweetAlert2 Close Button */
.swal2-close {
    color: var(--text-muted) !important;
    transition: all 0.3s ease !important;
}

.swal2-close:hover {
    color: var(--brand-danger) !important;
    transform: rotate(90deg) !important;
}

/* SweetAlert2 Footer */
.swal2-footer {
    border-top: 1px solid var(--swal-border) !important;
    color: var(--text-muted) !important;
}

.swal2-footer a {
    color: var(--olive-primary) !important;
}

.swal2-footer a:hover {
    color: var(--olive-dark) !important;
}

/* SweetAlert2 Backdrop */
.swal2-backdrop-show {
    background: rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] .swal2-backdrop-show {
    background: rgba(0, 0, 0, 0.8) !important;
}

/* SweetAlert2 Actions Container */
.swal2-actions {
    gap: 12px !important;
}

/* Toast Notifications */
.swal2-popup.swal2-toast {
    background-color: var(--swal-bg) !important;
    border-left: 4px solid var(--olive-primary) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

.swal2-popup.swal2-toast.swal2-show {
    animation: swal2-toast-show 0.3s ease !important;
}

/* Toast Success */
.swal2-popup.swal2-toast .swal2-icon.swal2-success {
    border-color: var(--swal-icon-success) !important;
}

/* Validation Message */
.swal2-validation-message {
    background-color: var(--bg-secondary) !important;
    color: var(--brand-danger) !important;
    border: 1px solid var(--brand-danger) !important;
}

/* Loading State */
.swal2-loading .swal2-confirm {
    background-color: var(--olive-light) !important;
}

/* Custom Classes for Different Alert Types */
.swal2-popup.swal-olive-success {
    border-left: 6px solid var(--swal-icon-success) !important;
}

.swal2-popup.swal-olive-error {
    border-left: 6px solid var(--swal-icon-error) !important;
}

.swal2-popup.swal-olive-warning {
    border-left: 6px solid var(--swal-icon-warning) !important;
}

.swal2-popup.swal-olive-info {
    border-left: 6px solid var(--swal-icon-info) !important;
}

/* Image container */
.swal2-image {
    border-radius: 12px !important;
    border: 2px solid var(--swal-border) !important;
}

/* Progress steps */
.swal2-progress-steps .swal2-progress-step {
    background: var(--olive-primary) !important;
    color: var(--btn-text) !important;
}

.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step {
    background: var(--olive-dark) !important;
}

.swal2-progress-steps .swal2-progress-step-line {
    background: var(--olive-primary) !important;
}

/* Checkbox and Radio */
.swal2-checkbox,
.swal2-radio {
    color: var(--swal-text) !important;
}

.swal2-checkbox input:checked,
.swal2-radio input:checked {
    accent-color: var(--olive-primary) !important;
}

/* Range Input */
.swal2-range input[type="range"] {
    accent-color: var(--olive-primary) !important;
}

.swal2-range output {
    color: var(--olive-primary) !important;
    font-weight: 600 !important;
}

/* File Input */
.swal2-file {
    background-color: var(--input-bg) !important;
    border: 2px dashed var(--input-border) !important;
    border-radius: 8px !important;
}

.swal2-file:hover {
    border-color: var(--olive-primary) !important;
}

/* Dark Mode Specific Adjustments */
[data-theme="dark"] .swal2-popup {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--olive-alpha-20) !important;
}

[data-theme="dark"] .swal2-confirm {
    color: var(--text-inverse) !important;
}

[data-theme="dark"] .swal2-popup.swal2-toast {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

/* Animation Enhancement */
.swal2-popup.swal2-show {
    animation: swal2-show 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

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

.swal2-popup.swal2-hide {
    animation: swal2-hide 0.2s ease-out forwards !important;
}

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

@keyframes swal2-toast-show {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Light Mode Specific Adjustments */
[data-theme="light"] .swal2-popup {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(107, 142, 35, 0.1) !important;
}

[data-theme="light"] .swal2-confirm {
    color: var(--text-inverse) !important;
}

[data-theme="light"] .swal2-popup.swal2-toast {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .swal2-backdrop-show {
    background: rgba(0, 0, 0, 0.5) !important;
}
