/* ==========================================================================
   PREMIUM TOAST SYSTEM (Neo Bank Style)
   ModernGlassmorphism Notifications for ClubPay
   ========================================================================== */

/* Cores e Variáveis baseadas no tema */
:root {
    --toast-bg-light: rgba(255, 255, 255, 0.95);
    --toast-bg-dark: rgba(30, 41, 59, 0.95);
    /* Slate 800 */

    --toast-text-light: #0f172a;
    /* Slate 900 */
    --toast-text-dark: #f8fafc;
    /* Slate 50 */

    --toast-border-light: rgba(226, 232, 240, 0.8);
    --toast-border-dark: rgba(51, 65, 85, 0.5);

    --toast-shadow-light: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --toast-shadow-dark: 0 10px 40px -10px rgba(0, 0, 0, 0.3);

    /* Status Colors */
    --toast-success: #10b981;
    --toast-error: #ef4444;
    --toast-warning: #f59e0b;
    --toast-info: #3b82f6;
}

/* Base Toast Popup Style */
body .swal2-popup.n-toast {
    display: flex !important;
    align-items: center !important;
    padding: 1rem 1.25rem !important;
    width: auto !important;
    min-width: 320px;
    max-width: 450px;

    background: var(--toast-bg-light) !important;
    color: var(--toast-text-light) !important;

    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;

    border: 1px solid var(--toast-border-light) !important;
    border-radius: 16px !important;
    box-shadow: var(--toast-shadow-light) !important;

    /* Animation defaults */
    transform-origin: top right;
    font-family: 'Inter', sans-serif !important;
}

/* Dark Mode Override */
html[data-theme-mode="dark"] body .swal2-popup.n-toast {
    background: var(--toast-bg-dark) !important;
    color: var(--toast-text-dark) !important;
    border-color: var(--toast-border-dark) !important;
    box-shadow: var(--toast-shadow-dark) !important;
}

/* Title Styling */
body .swal2-title.n-toast-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    text-align: left !important;
    display: block !important;
    color: inherit !important;
}

/* HTML Content Styling (Message) */
body .swal2-html-container.n-toast-content {
    margin: 0.25rem 0 0 0 !important;
    padding: 0 !important;
    font-size: 0.85rem !important;
    font-weight: 400 !important;
    opacity: 0.8;
    text-align: left !important;
    line-height: 1.4 !important;
    color: inherit !important;
}

/* Icons Size & Spacing */
body .swal2-icon.n-toast-icon {
    width: 24px !important;
    height: 24px !important;
    margin: 0 1rem 0 0 !important;
    border: none !important;
    min-width: 24px !important;
    /* Prevent shrinking */
}

/* Custom Icon Colors (Overriding Swal Default Borders) */
body .swal2-icon.swal2-success.n-toast-icon .swal2-success-ring {
    display: none !important;
}

body .swal2-icon.swal2-error.n-toast-icon .swal2-x-mark {
    display: none !important;
}

/* We will replace Swal default icons with generic colored circles or SVG via JS logic if preferable,
   BUT preserving Swal animations is nice if we just style them down. */

/* Simplifying Swal Icons for Minimalist Look */
body .swal2-icon.n-toast-icon {
    background: transparent !important;
}

/* Success Icon Text Color */
body .swal2-icon.swal2-success.n-toast-icon {
    color: var(--toast-success) !important;
}

body .swal2-icon.swal2-error.n-toast-icon {
    color: var(--toast-error) !important;
}

body .swal2-icon.swal2-warning.n-toast-icon {
    color: var(--toast-warning) !important;
}

body .swal2-icon.swal2-info.n-toast-icon {
    color: var(--toast-info) !important;
}

/* Progress Bar */
body .swal2-timer-progress-bar {
    height: 3px !important;
    background: rgba(0, 0, 0, 0.1) !important;
    bottom: 0 !important;
}

html[data-theme-mode="dark"] body .swal2-timer-progress-bar {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Success Progress Bar Color */
body .swal2-popup.n-toast.swal2-icon-success .swal2-timer-progress-bar {
    background: var(--toast-success) !important;
}

body .swal2-popup.n-toast.swal2-icon-error .swal2-timer-progress-bar {
    background: var(--toast-error) !important;
}

body .swal2-popup.n-toast.swal2-icon-warning .swal2-timer-progress-bar {
    background: var(--toast-warning) !important;
}

body .swal2-popup.n-toast.swal2-icon-info .swal2-timer-progress-bar {
    background: var(--toast-info) !important;
}

/* Animations */
@keyframes toastSlideIn {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

body .swal2-show {
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}