﻿/* =========================================================
   QBox Toast System v4.0 – Auth Optimized
========================================================= */

/* =========================================
   CONTAINER – Auth Center Anchored
========================================= */

.toast-container {
    position: fixed;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 9999;
    pointer-events: none;
}

/* =========================================
   BASE
========================================= */

.toast {
    min-width: 380px;
    max-width: 480px;
    border-radius: 16px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    font-weight: 500;
    pointer-events: auto;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
    backdrop-filter: blur(10px);
    animation: toast-enter 240ms cubic-bezier(.2,.8,.2,1);
    position: relative;
}

/* =========================================
   ICON
========================================= */

.toast-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* =========================================
   MESSAGE
========================================= */

.toast-message {
    flex: 1;
    line-height: 1.5;
}

/* =========================================
   CLOSE
========================================= */

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

    .toast-close:hover {
        opacity: 1;
    }

/* =========================================
   ERROR – AUTH CRITICAL
========================================= */

.toast-error {
    background: #fff1f1;
    border: 1px solid #f8caca;
}

    .toast-error .toast-icon {
        background: #ef4444;
        color: white;
    }

    .toast-error .toast-message {
        color: #7f1d1d;
        font-weight: 600;
    }

/* =========================================
   SUCCESS
========================================= */

.toast-success {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
}

    .toast-success .toast-icon {
        background: #10b981;
        color: white;
    }

    .toast-success .toast-message {
        color: #065f46;
    }

/* =========================================
   INFO
========================================= */

.toast-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

    .toast-info .toast-icon {
        background: #3b82f6;
        color: white;
    }

    .toast-info .toast-message {
        color: #1e3a8a;
    }

/* =========================================
   WARNING
========================================= */

.toast-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

    .toast-warning .toast-icon {
        background: #f59e0b;
        color: white;
    }

    .toast-warning .toast-message {
        color: #7c2d12;
    }

/* =========================================
   ANIMATION
========================================= */

.toast.hide {
    animation: toast-exit 200ms ease forwards;
}

@keyframes toast-enter {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-exit {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {
    .toast {
        min-width: auto;
        width: calc(100% - 32px);
    }
}
