/* ===========================
   Metronic-Style SweetAlert2 
   Pixel-Perfect Theme for MC Project
   Extracted from Metronic v8.3.2
   NO DARK MODE - Always Light Theme
   =========================== */

/* ===========================
   Force Light Theme - Always White Background
   =========================== */
.swal2-popup,
.swal2-popup.swal2-show,
html[data-bs-theme="dark"] .swal2-popup,
[data-theme="dark"] .swal2-popup,
.dark .swal2-popup {
    background-color: #ffffff !important;
    color: #545454 !important;
}

/* Base Popup Styles - Metronic Exact Values */
.swal2-popup {
    display: grid !important; /* CRITICAL - Centers all content */
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    font-family: 'Inter', Helvetica, sans-serif;
    border-radius: 0.385rem; /* 6.175px */
    padding: 1.625rem; /* 26px */
    box-shadow: none;
    border: 0;
    width: 26rem; /* 416px */
    max-width: 100%;
}

.swal2-popup.swal2-toast {
    padding: 0.75rem 1rem;
}

/* Title Styles - Metronic Exact */
.swal2-title {
    font-size: 1.056rem; /* 16.9px */
    font-weight: 500;
    color: #1e2129 !important;
    padding: 0.845rem 1.056rem 0; /* 13.52px 16.9px 0 */
    margin: 0;
    line-height: 1.2;
}

/* HTML Content / Text Styles - Metronic Exact */
.swal2-html-container,
.swal2-content {
    font-size: 0.894rem; /* 14.3px */
    font-weight: 400;
    color: #252f4a !important;
    line-height: normal;
    text-align: center;
    padding: 0.894rem 1.43rem 0.268rem; /* 14.3px 22.88px 4.29px */
    margin: 1.219rem 0 0; /* 19.5px 0 0 */
}

/* ===========================
   Icon Colors Only - SweetAlert2 Original Animations Preserved
   =========================== */

/* Success Icon - Metronic Green */
.swal2-icon.swal2-success {
    border-color: #17c653 !important;
}

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

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(23, 198, 83, 0.3) !important;
}

/* Error Icon - Metronic Red */
.swal2-icon.swal2-error {
    border-color: #f8285a !important;
}

.swal2-icon.swal2-error .swal2-x-mark-line-left,
.swal2-icon.swal2-error .swal2-x-mark-line-right {
    background-color: #f8285a !important;
}

/* Warning Icon - Metronic Yellow */
.swal2-icon.swal2-warning {
    border-color: #f6c000 !important;
    color: #f6c000 !important;
}

/* Info Icon - Metronic Purple */
.swal2-icon.swal2-info {
    border-color: #7239ea !important;
    color: #7239ea !important;
}

/* Question Icon - Metronic Blue */
.swal2-icon.swal2-question {
    border-color: #009ef7 !important;
    color: #009ef7 !important;
}

/* ===========================
   Button Styles - Metronic Exact
   =========================== */

/* Disable Default SweetAlert2 Button Styling */
.swal2-styled {
    box-shadow: none !important;
    font-weight: 500 !important;
    font-size: 0.894rem !important; /* 14.3px */
    padding: 0.692rem 1.281rem !important; /* 11.075px 20.5px */
    border-radius: 0.385rem !important; /* 6.175px */
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    outline: none !important;
    margin: 0.9375rem 0.3125rem 0 !important; /* 15px 5px 0 */
    border: 0 !important;
    line-height: 1.5 !important;
}

/* Override Bootstrap .btn padding/border-radius in SweetAlert */
.swal2-popup .btn,
.swal2-popup .btn.btn-success,
.swal2-popup .btn.btn-primary,
.swal2-popup .btn.btn-danger,
.swal2-popup .btn.btn-warning,
.swal2-popup .btn.btn-info {
    padding: 0.692rem 1.281rem !important; /* 11.075px 20.5px */
    border-radius: 0.385rem !important; /* 6.175px */
    font-size: 0.894rem !important; /* 14.3px */
    font-weight: 500 !important;
    line-height: 1.5 !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.swal2-popup .btn:focus,
.swal2-popup .btn:active,
.swal2-popup .btn:hover {
    outline: none !important;
    box-shadow: none !important;
}

.swal2-styled:focus {
    box-shadow: none !important;
}

/* Primary Button - Metronic Blue #009ef7 */
.swal2-confirm.btn-primary,
.swal2-popup .btn.btn-primary {
    background-color: #009ef7 !important;
    border-color: #009ef7 !important;
    color: #fff !important;
}

.swal2-confirm.btn-primary:hover,
.swal2-popup .btn.btn-primary:hover {
    background-color: #0095e8 !important;
    border-color: #0095e8 !important;
}

.swal2-confirm.btn-primary:focus,
.swal2-confirm.btn-primary:active,
.swal2-popup .btn.btn-primary:focus,
.swal2-popup .btn.btn-primary:active {
    background-color: #008dd9 !important;
    border-color: #008dd9 !important;
}

/* Success Button - Metronic Green #04b440 */
.swal2-confirm.btn-success,
.swal2-popup .btn.btn-success {
    background-color: #04b440 !important;
    color: #fff !important;
}

.swal2-confirm.btn-success:hover,
.swal2-popup .btn.btn-success:hover {
    background-color: #03a039 !important;
}

/* Danger Button - Metronic Red #d81a48 */
.swal2-cancel.btn-danger,
.swal2-confirm.btn-danger,
.swal2-popup .btn.btn-danger {
    background-color: #d81a48 !important;
    color: #fff !important;
}

.swal2-cancel.btn-danger:hover,
.swal2-confirm.btn-danger:hover,
.swal2-popup .btn.btn-danger:hover {
    background-color: #c4163f !important;
}

/* Warning Button - Metronic Yellow #dead00 */
.swal2-confirm.btn-warning,
.swal2-popup .btn.btn-warning {
    background-color: #dead00 !important;
    color: #fff !important;
}

.swal2-confirm.btn-warning:hover,
.swal2-popup .btn.btn-warning:hover {
    background-color: #c89d00 !important;
}

/* Info Button - Metronic Purple #5014d0 */
.swal2-confirm.btn-info,
.swal2-popup .btn.btn-info {
    background-color: #5014d0 !important;
    color: #fff !important;
}

.swal2-confirm.btn-info:hover,
.swal2-popup .btn.btn-info:hover {
    background-color: #4610b8 !important;
}

/* Secondary/Light Button */
.swal2-cancel.btn-secondary,
.swal2-popup .btn.btn-secondary,
.swal2-popup .btn.btn-light {
    background-color: #f5f8fa !important;
    border-color: #f5f8fa !important;
    color: #7e8299 !important;
}

.swal2-cancel.btn-secondary:hover,
.swal2-popup .btn.btn-secondary:hover,
.swal2-popup .btn.btn-light:hover {
    background-color: #eff2f5 !important;
    border-color: #eff2f5 !important;
    color: #181c32 !important;
}

/* Active/Light Variants */
.swal2-popup .btn.btn-light-primary {
    background-color: #f1faff !important;
    border-color: transparent !important;
    color: #009ef7 !important;
}

.swal2-popup .btn.btn-light-primary:hover {
    background-color: #009ef7 !important;
    color: #fff !important;
}

.swal2-popup .btn.btn-light-success {
    background-color: #e8fff3 !important;
    border-color: transparent !important;
    color: #17c653 !important;
}

.swal2-popup .btn.btn-light-success:hover {
    background-color: #17c653 !important;
    color: #fff !important;
}

.swal2-popup .btn.btn-light-danger {
    background-color: #fff5f8 !important;
    border-color: transparent !important;
    color: #f8285a !important;
}

.swal2-popup .btn.btn-light-danger:hover {
    background-color: #f8285a !important;
    color: #fff !important;
}

.swal2-popup .btn.btn-light-warning {
    background-color: #fff8dd !important;
    border-color: transparent !important;
    color: #f6c000 !important;
}

.swal2-popup .btn.btn-light-warning:hover {
    background-color: #f6c000 !important;
    color: #fff !important;
}

.swal2-popup .btn.btn-light-info {
    background-color: #f8f5ff !important;
    border-color: transparent !important;
    color: #7239ea !important;
}

.swal2-popup .btn.btn-light-info:hover {
    background-color: #7239ea !important;
    color: #fff !important;
}

/* ===========================
   Actions Container - Metronic Exact
   =========================== */
.swal2-actions {
    margin: 1.219rem 0 0.813rem; /* 19.5px 0 13px */
    padding: 0;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ===========================
   Close Button
   =========================== */
.swal2-close {
    font-size: 2rem;
    color: #b5b5c3;
    transition: color 0.15s ease-in-out;
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 1.5rem;
    height: 1.5rem;
}

.swal2-close:hover {
    color: #f8285a;
}

.swal2-close:focus {
    box-shadow: none;
    outline: none;
}

/* ===========================
   Backdrop/Overlay - Metronic Exact
   =========================== */
.swal2-container {
    z-index: 10000;
}

.swal2-container.swal2-backdrop-show {
    background: rgba(0, 0, 0, 0.4);
    transition: background-color 0.15s;
}

.swal2-container.swal2-backdrop-hide {
    background: transparent;
}

/* ===========================
   Input Styles
   =========================== */
.swal2-input,
.swal2-textarea,
.swal2-select {
    font-size: 0.894rem;
    font-weight: 500;
    color: #252f4a !important;
    background-color: #fff !important;
    border: 1px solid #e4e6ef !important;
    border-radius: 0.385rem;
    padding: 0.75rem 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.swal2-input:focus,
.swal2-textarea:focus,
.swal2-select:focus {
    border-color: #009ef7 !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 158, 247, 0.25);
    outline: none;
}

.swal2-input::placeholder,
.swal2-textarea::placeholder {
    color: #a1a5b7;
}

/* ===========================
   Validation Message
   =========================== */
.swal2-validation-message {
    background-color: #fff5f8 !important;
    color: #f8285a !important;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 0.385rem;
    margin: 1rem 0 0 0;
}

.swal2-validation-message::before {
    background-color: #f8285a !important;
}

/* ===========================
   Timer Progress Bar
   =========================== */
.swal2-timer-progress-bar {
    background: rgba(0, 158, 247, 0.6);
}

/* ===========================
   Loading States
   =========================== */
.swal2-loading .swal2-styled.swal2-confirm {
    background-color: #009ef7 !important;
    border-color: #009ef7 !important;
}

/* ===========================
   Toast Styles
   =========================== */
.swal2-popup.swal2-toast {
    flex-direction: row;
    align-items: center;
    padding: 1rem 1.25rem;
    box-shadow: 0 0.5rem 1.5rem 0.5rem rgba(0, 0, 0, 0.075);
    background-color: #fff !important;
}

.swal2-popup.swal2-toast .swal2-title {
    margin: 0 0.625rem;
    padding: 0;
    font-size: 1rem;
    color: #1e2129 !important;
}

.swal2-popup.swal2-toast .swal2-icon {
    width: 2rem;
    min-width: 2rem;
    height: 2rem;
    margin: 0;
    border-width: 2px;
}

.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content {
    font-size: 1.25rem;
}

.swal2-popup.swal2-toast .swal2-success [class^='swal2-success-line'] {
    height: 0.125rem;
}

.swal2-popup.swal2-toast .swal2-success [class^='swal2-success-line'][class$='tip'] {
    width: 0.45rem;
}

.swal2-popup.swal2-toast .swal2-success [class^='swal2-success-line'][class$='long'] {
    width: 0.875rem;
}

/* ===========================
   Animations - Metronic Exact
   =========================== */
.swal2-show {
    animation: swal2-show 0.3s ease;
}

.swal2-hide {
    animation: swal2-hide 0.15s forwards;
}

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

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

/* ===========================
   Image Styles
   =========================== */
.swal2-image {
    max-width: 100%;
    margin: 1rem auto;
    border-radius: 0.385rem;
}

/* ===========================
   Footer
   =========================== */
.swal2-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eff2f5 !important;
    color: #a1a5b7 !important;
    font-size: 0.925rem;
}

.swal2-footer a {
    color: #009ef7;
    font-weight: 500;
    text-decoration: none;
}

.swal2-footer a:hover {
    color: #0095e8;
    text-decoration: underline;
}

/* ===========================
   Checkbox & Radio
   =========================== */
.swal2-checkbox,
.swal2-radio {
    align-items: center;
    justify-content: center;
    margin: 1rem auto 0;
    color: #7e8299 !important;
}

.swal2-checkbox input,
.swal2-radio input {
    margin-right: 0.5rem;
}

/* ===========================
   Range Input
   =========================== */
.swal2-range {
    margin: 1rem auto;
}

.swal2-range input[type=range] {
    width: 100%;
}

.swal2-range output {
    font-weight: 600;
    color: #252f4a !important;
}

/* ===========================
   Deny Button
   =========================== */
.swal2-deny {
    background-color: #f8285a !important;
    color: #fff !important;
}

.swal2-deny:hover {
    background-color: #d81a48 !important;
}

/* ===========================
   Responsive Adjustments
   =========================== */
@media (max-width: 575.98px) {
    .swal2-popup {
        padding: 1.25rem;
        max-width: calc(100vw - 2rem);
    }
    
    .swal2-title {
        font-size: 1rem;
    }
    
    .swal2-html-container,
    .swal2-content {
        font-size: 0.85rem;
    }
    
    .swal2-icon {
        width: 55px;
        height: 55px;
    }
    
    .swal2-styled {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}
