/* ==========================================================================
   Midtown Luxury Alerts & Toasts Design System (SweetAlert2 & Toastr)
   Matches Midtown Luxury Hotel Brand Aesthetics:
   - Primary Gold: #978667 / #ba9256 / #a17339
   - Deep Midnight / Charcoal: #182232 / #1e293b
   - Emerald Success: #10b981
   - Ruby Error: #ef4444
   - Amber Warning: #f59e0b
   - Glassmorphism, refined typography & sleek micro-animations
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. SWEETALERT2: BACKDROP & MODAL CONTAINER
   -------------------------------------------------------------------------- */
.swal2-container {
    z-index: 100000 !important;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.swal2-container.swal2-backdrop-show {
    background: rgba(15, 23, 42, 0.55) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.swal2-container.swal2-backdrop-hide {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: background 0.15s ease-out !important;
}

/* Modal Popup Card */
.swal2-popup:not(.swal2-toast) {
    background: #ffffff !important;
    border-radius: 20px !important;
    border: 1px solid rgba(151, 134, 103, 0.2) !important;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    padding: 2.25rem 2rem 2rem !important;
    width: 32em !important;
    max-width: 92vw !important;
    overflow: hidden !important;
    position: relative !important;
}

/* Modal Opening & Closing Animations */
.swal2-popup.swal2-show:not(.swal2-toast) {
    animation: swal2ModernZoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.swal2-popup.swal2-hide:not(.swal2-toast) {
    animation: swal2ModernZoomOut 0.15s cubic-bezier(0.4, 0, 1, 1) forwards !important;
}

/* Subtle luxury gold gradient border glow at the top edge */
.swal2-popup:not(.swal2-toast)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #978667, #d4af37, #978667);
    opacity: 0.9;
}

@keyframes swal2ModernZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes swal2ModernZoomOut {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
}

/* --------------------------------------------------------------------------
   2. SWEETALERT2: TYPOGRAPHY & HEADINGS
   -------------------------------------------------------------------------- */
.swal2-title {
    color: #182232 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 1.45rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    margin: 0.75rem 0 0.5rem 0 !important;
    padding: 0 !important;
    line-height: 1.35 !important;
}

.swal2-html-container {
    color: #4b5563 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    line-height: 1.65 !important;
    margin: 0.5rem 0.5rem 1.25rem 0.5rem !important;
    padding: 0 !important;
}

/* --------------------------------------------------------------------------
   3. SWEETALERT2: MODERNIZED ICONS
   -------------------------------------------------------------------------- */
.swal2-icon {
    width: 4.5rem !important;
    height: 4.5rem !important;
    margin: 0.5rem auto 1rem !important;
    border-width: 2.5px !important;
    border-style: solid !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
    user-select: none !important;
    transition: transform 0.3s ease !important;
}

.swal2-icon:hover {
    transform: scale(1.05);
}

/* Success Icon */
.swal2-icon.swal2-success {
    border-color: #10b981 !important;
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.08) !important;
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.18) !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(16, 185, 129, 0.35) !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #10b981 !important;
    height: 4px !important;
    border-radius: 2px !important;
}

.swal2-icon.swal2-success .swal2-success-circular-line-left,
.swal2-icon.swal2-success .swal2-success-circular-line-right,
.swal2-icon.swal2-success .swal2-success-fix {
    background-color: transparent !important;
}

/* Error Icon */
.swal2-icon.swal2-error {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.08) !important;
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.18) !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #ef4444 !important;
    height: 4px !important;
    border-radius: 2px !important;
}

/* Warning Icon */
.swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.08) !important;
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.18) !important;
    font-size: 3rem !important;
    line-height: 4.2rem !important;
}

/* Question Icon */
.swal2-icon.swal2-question {
    border-color: #ba9256 !important;
    color: #ba9256 !important;
    background: rgba(186, 146, 86, 0.08) !important;
    box-shadow: 0 0 24px rgba(186, 146, 86, 0.18) !important;
    font-size: 3rem !important;
    line-height: 4.2rem !important;
}

/* Info Icon */
.swal2-icon.swal2-info {
    border-color: #0ea5e9 !important;
    color: #0ea5e9 !important;
    background: rgba(14, 165, 233, 0.08) !important;
    box-shadow: 0 0 24px rgba(14, 165, 233, 0.18) !important;
    font-size: 3rem !important;
    line-height: 4.2rem !important;
}

/* --------------------------------------------------------------------------
   4. SWEETALERT2: ACTION BUTTONS (CONFIRM & CANCEL)
   -------------------------------------------------------------------------- */
.swal2-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    margin: 1.5rem auto 0.25rem !important;
    width: 100% !important;
}

/* Confirm Button (Midtown Luxury Gold) */
.swal2-styled.swal2-confirm {
    background: linear-gradient(135deg, #ba9256 0%, #978667 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.925rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.025em !important;
    padding: 0.72rem 1.85rem !important;
    min-height: 44px !important;
    box-shadow: 0 4px 14px rgba(151, 134, 103, 0.35) !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    outline: none !important;
}

.swal2-styled.swal2-confirm:hover {
    background: linear-gradient(135deg, #c5a059 0%, #a17339 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 22px rgba(151, 134, 103, 0.45) !important;
    filter: brightness(1.04) !important;
}

.swal2-styled.swal2-confirm:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(151, 134, 103, 0.25) !important;
}

.swal2-styled.swal2-confirm:focus {
    box-shadow: 0 0 0 3px rgba(151, 134, 103, 0.35) !important;
}

/* Cancel Button */
.swal2-styled.swal2-cancel {
    background: #f8fafc !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.925rem !important;
    font-weight: 500 !important;
    padding: 0.72rem 1.6rem !important;
    min-height: 44px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    outline: none !important;
}

.swal2-styled.swal2-cancel:hover {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.swal2-styled.swal2-cancel:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.swal2-styled.swal2-cancel:focus {
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25) !important;
}

/* Deny Button */
.swal2-styled.swal2-deny {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
    border-radius: 10px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.925rem !important;
    font-weight: 600 !important;
    padding: 0.72rem 1.6rem !important;
    min-height: 44px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
}

.swal2-styled.swal2-deny:hover {
    background: #fecaca !important;
    transform: translateY(-2px) !important;
}

/* Close Button (top-right X) */
.swal2-close {
    width: 34px !important;
    height: 34px !important;
    font-size: 22px !important;
    color: #94a3b8 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    margin: 8px 8px 0 0 !important;
}

.swal2-close:hover {
    color: #1e293b !important;
    background: #f1f5f9 !important;
    transform: scale(1.08) !important;
}

/* Form Inputs within SweetAlert */
.swal2-input,
.swal2-textarea,
.swal2-select {
    border-radius: 10px !important;
    border: 1.5px solid #e2e8f0 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.95rem !important;
    padding: 0.65rem 1rem !important;
    color: #1e293b !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03) !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.swal2-input:focus,
.swal2-textarea:focus,
.swal2-select:focus {
    border-color: #978667 !important;
    box-shadow: 0 0 0 3px rgba(151, 134, 103, 0.25) !important;
    outline: none !important;
}

/* --------------------------------------------------------------------------
   5. SWEETALERT2: TOAST NOTIFICATIONS (.swal2-toast)
   -------------------------------------------------------------------------- */
.swal2-popup.swal2-toast {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: 14px !important;
    box-shadow: 0 14px 35px -5px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    padding: 0.85rem 1.25rem !important;
    width: auto !important;
    min-width: 310px !important;
    max-width: 440px !important;
    font-family: 'Montserrat', sans-serif !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    overflow: hidden !important;
    transition: all 0.25s ease !important;
}

.swal2-popup.swal2-toast:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px -5px rgba(15, 23, 42, 0.22) !important;
}

/* Toast Title */
.swal2-popup.swal2-toast .swal2-title {
    color: #182232 !important;
    font-size: 0.925rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

.swal2-popup.swal2-toast .swal2-html-container {
    color: #4b5563 !important;
    font-size: 0.85rem !important;
    line-height: 1.45 !important;
    margin: 2px 0 0 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

/* Toast Icon */
.swal2-popup.swal2-toast .swal2-icon {
    width: 2.2rem !important;
    height: 2.2rem !important;
    min-width: 2.2rem !important;
    margin: 0 !important;
    border-width: 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.swal2-popup.swal2-toast .swal2-icon.swal2-success {
    border-color: #10b981 !important;
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.12) !important;
}

.swal2-popup.swal2-toast .swal2-icon.swal2-error {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.12) !important;
}

.swal2-popup.swal2-toast .swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.12) !important;
    font-size: 1.4rem !important;
    line-height: 2.2rem !important;
}

.swal2-popup.swal2-toast .swal2-icon.swal2-info,
.swal2-popup.swal2-toast .swal2-icon.swal2-question {
    border-color: #ba9256 !important;
    color: #ba9256 !important;
    background: rgba(186, 146, 86, 0.12) !important;
    font-size: 1.4rem !important;
    line-height: 2.2rem !important;
}

/* Left Indicator Stripe per Type */
.swal2-popup.swal2-toast.swal2-icon-success {
    border-left: 4px solid #10b981 !important;
}

.swal2-popup.swal2-toast.swal2-icon-error {
    border-left: 4px solid #ef4444 !important;
}

.swal2-popup.swal2-toast.swal2-icon-warning {
    border-left: 4px solid #f59e0b !important;
}

.swal2-popup.swal2-toast.swal2-icon-info,
.swal2-popup.swal2-toast.swal2-icon-question {
    border-left: 4px solid #ba9256 !important;
}

/* Sleek Progress Bar for Toasts */
.swal2-timer-progress-bar {
    height: 3px !important;
    border-radius: 0 0 14px 14px !important;
    background: linear-gradient(90deg, #ba9256, #d4af37) !important;
}

.swal2-popup.swal2-toast.swal2-icon-success .swal2-timer-progress-bar {
    background: linear-gradient(90deg, #10b981, #34d399) !important;
}

.swal2-popup.swal2-toast.swal2-icon-error .swal2-timer-progress-bar {
    background: linear-gradient(90deg, #ef4444, #f87171) !important;
}

.swal2-popup.swal2-toast.swal2-icon-warning .swal2-timer-progress-bar {
    background: linear-gradient(90deg, #f59e0b, #fbbf24) !important;
}

/* --------------------------------------------------------------------------
   6. TOASTR: MODERN FLOATING CARDS & GLASSMORPHISM
   -------------------------------------------------------------------------- */
#toast-container {
    z-index: 999999 !important;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Position Spacing & Responsive Offsets */
#toast-container.toast-top-right,
#toast-container.toast-top-left,
#toast-container.toast-top-center {
    top: 24px !important;
}

#toast-container.toast-bottom-right,
#toast-container.toast-bottom-left,
#toast-container.toast-bottom-center {
    bottom: 24px !important;
}

#toast-container.toast-top-right,
#toast-container.toast-bottom-right {
    right: 24px !important;
}

#toast-container.toast-top-left,
#toast-container.toast-bottom-left {
    left: 24px !important;
}

/* Base Toast Item */
#toast-container > div,
.toast {
    background-color: rgba(255, 255, 255, 0.97) !important;
    color: #182232 !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: 14px !important;
    box-shadow: 0 14px 35px -5px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    width: 350px !important;
    max-width: calc(100vw - 40px) !important;
    padding: 16px 18px 16px 54px !important;
    margin-bottom: 12px !important;
    opacity: 1 !important;
    overflow: hidden !important;
    position: relative !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#toast-container > div:hover,
.toast:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 18px 42px -6px rgba(15, 23, 42, 0.22) !important;
}

/* Toast Typography */
#toast-container .toast-title {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.925rem !important;
    color: #182232 !important;
    letter-spacing: -0.01em !important;
    margin-bottom: 4px !important;
    line-height: 1.35 !important;
}

#toast-container .toast-message {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 400 !important;
    font-size: 0.85rem !important;
    color: #4b5563 !important;
    line-height: 1.5 !important;
    word-wrap: break-word !important;
}

/* Close Button */
#toast-container .toast-close-button {
    position: absolute !important;
    top: 10px !important;
    right: 12px !important;
    color: #94a3b8 !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    text-shadow: none !important;
    opacity: 0.7 !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
}

#toast-container .toast-close-button:hover {
    color: #1e293b !important;
    opacity: 1 !important;
    background: #f1f5f9 !important;
}

/* Toast Progress Bar */
#toast-container .toast-progress {
    position: absolute !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 3px !important;
    opacity: 0.9 !important;
    border-radius: 0 0 14px 14px !important;
}

/* --------------------------------------------------------------------------
   7. TOASTR: HIGH-RESOLUTION SVG ICONS & ACCENT STRIPES
   -------------------------------------------------------------------------- */

/* Toast Success */
#toast-container > .toast-success {
    border-left: 4px solid #10b981 !important;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10' fill='rgba(16,185,129,0.1)'/%3E%3Cpolyline points='16 9 10.5 14.5 8 12'/%3E%3C/svg%3E") !important;
    background-size: 26px 26px !important;
    background-position: 16px 15px !important;
    background-repeat: no-repeat !important;
}

#toast-container > .toast-success .toast-progress {
    background: linear-gradient(90deg, #10b981, #34d399) !important;
}

/* Toast Error */
#toast-container > .toast-error {
    border-left: 4px solid #ef4444 !important;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10' fill='rgba(239,68,68,0.1)'/%3E%3Cline x1='15' y1='9' x2='9' y2='15'/%3E%3Cline x1='9' y1='9' x2='15' y2='15'/%3E%3C/svg%3E") !important;
    background-size: 26px 26px !important;
    background-position: 16px 15px !important;
    background-repeat: no-repeat !important;
}

#toast-container > .toast-error .toast-progress {
    background: linear-gradient(90deg, #ef4444, #f87171) !important;
}

/* Toast Warning */
#toast-container > .toast-warning {
    border-left: 4px solid #f59e0b !important;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z' fill='rgba(245,158,11,0.1)'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") !important;
    background-size: 26px 26px !important;
    background-position: 16px 15px !important;
    background-repeat: no-repeat !important;
}

#toast-container > .toast-warning .toast-progress {
    background: linear-gradient(90deg, #f59e0b, #fbbf24) !important;
}

/* Toast Info (Midtown Luxury Gold) */
#toast-container > .toast-info {
    border-left: 4px solid #ba9256 !important;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ba9256' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10' fill='rgba(186,146,86,0.1)'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") !important;
    background-size: 26px 26px !important;
    background-position: 16px 15px !important;
    background-repeat: no-repeat !important;
}

#toast-container > .toast-info .toast-progress {
    background: linear-gradient(90deg, #ba9256, #d4af37) !important;
}

/* --------------------------------------------------------------------------
   8. MOBILE RESPONSIVENESS
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .swal2-popup:not(.swal2-toast) {
        padding: 1.75rem 1.25rem 1.5rem !important;
        border-radius: 16px !important;
    }

    .swal2-title {
        font-size: 1.25rem !important;
    }

    .swal2-html-container {
        font-size: 0.88rem !important;
    }

    .swal2-actions {
        flex-direction: column-reverse !important;
        gap: 8px !important;
    }

    .swal2-styled.swal2-confirm,
    .swal2-styled.swal2-cancel,
    .swal2-styled.swal2-deny {
        width: 100% !important;
    }

    #toast-container {
        right: 12px !important;
        left: 12px !important;
        width: auto !important;
    }

    #toast-container > div,
    .toast {
        width: 100% !important;
        max-width: 100% !important;
    }

    .swal2-popup.swal2-toast {
        min-width: 0 !important;
        width: calc(100vw - 24px) !important;
        margin: 8px 12px !important;
    }
}
