/**
 * Custom SweetAlert2 Styling for WebDirect
 * Red-themed notifications matching the site design
 */

/* Custom popup styling */
.wd-swal-popup {
    border-radius: 8px !important;
    font-family: inherit !important;
}

/* Confirm button (red theme) */
.wd-swal-confirm {
    background-color: #e74c3c !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 10px 24px !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
}

.wd-swal-confirm:hover {
    background-color: #c0392b !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3) !important;
}

.wd-swal-confirm:active {
    transform: translateY(0);
}

/* Cancel button (gray theme) */
.wd-swal-cancel {
    background-color: #95a5a6 !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 10px 24px !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
}

.wd-swal-cancel:hover {
    background-color: #7f8c8d !important;
    transform: translateY(-1px);
}

.wd-swal-cancel:active {
    transform: translateY(0);
}

/* Icon animations */
.swal2-icon {
    border-width: 3px !important;
}

.swal2-success {
    border-color: #27ae60 !important;
}

.swal2-success [class^='swal2-success-line'] {
    background-color: #27ae60 !important;
}

.swal2-success-ring {
    border-color: rgba(39, 174, 96, 0.3) !important;
}

.swal2-error {
    border-color: #e74c3c !important;
}

.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #e74c3c !important;
}

.swal2-warning {
    border-color: #f39c12 !important;
    color: #f39c12 !important;
}

/* Title styling */
.swal2-title {
    color: #2c3e50 !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    margin-bottom: 16px !important;
}

/* Text content styling */
.swal2-html-container {
    color: #555 !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
}

/* Toast notifications */
.swal2-toast {
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.swal2-toast .swal2-title {
    font-size: 16px !important;
    margin: 0 !important;
}

/* Remove container background for toasts */
.swal2-container.swal2-top-end,
.swal2-container.swal2-top-start,
.swal2-container.swal2-top,
.swal2-container.swal2-bottom-end,
.swal2-container.swal2-bottom-start,
.swal2-container.swal2-bottom {
    background-color: transparent !important;
}

/* Loading spinner color */
.swal2-loader {
    border-color: #e74c3c transparent #e74c3c transparent !important;
}

/* Timer progress bar */
.swal2-timer-progress-bar {
    background: #e74c3c !important;
}

/* Backdrop overlay - transparent for toast notifications */
.swal2-backdrop-show {
    background: rgba(0, 0, 0, 0.5) !important;
}

/* No backdrop for toast notifications */
.swal2-toast-shown .swal2-container {
    background-color: transparent !important;
}

/* Adjust z-index hierarchy */
/* Confirmation dialogs should be on top of everything */
.swal2-container:not(.swal2-top-end):not(.swal2-bottom-end) {
    z-index: 9999999 !important;  /* Dialogs on top */
}

/* Toast notifications below dialogs but above cart */
.swal2-container.swal2-top-end,
.swal2-container.swal2-bottom-end {
    z-index: 999999 !important;
}

/* Cart sidebar below toasts */
.cart_sidebar {
    z-index: 99999 !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .wd-swal-popup {
        width: 90% !important;
        padding: 20px !important;
    }
    
    .swal2-title {
        font-size: 20px !important;
    }
    
    .swal2-html-container {
        font-size: 14px !important;
    }
    
    .wd-swal-confirm,
    .wd-swal-cancel {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
}

/* Animation improvements */
.swal2-show {
    animation: swal2-show 0.3s ease-out !important;
}

.swal2-hide {
    animation: swal2-hide 0.2s ease-in !important;
}

@keyframes swal2-show {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }
    45% {
        transform: scale(1.05);
        opacity: 1;
    }
    80% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

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

