/* =====================================================================
   NEWSLITTLE — Custom Toast v2
   Frosted glass toasts with colored left borders and smooth entry
   ===================================================================== */

.toast {
    border-radius: var(--nl-radius-lg);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--nl-glass-border);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: toastSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Colored left accent bar */
.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--nl-gradient-primary);
    border-radius: 4px 0 0 4px;
}

.toast.toast-success::before { background: linear-gradient(180deg, #10b981, #34d399); }
.toast.toast-danger::before,
.toast.toast-error::before   { background: linear-gradient(180deg, #ef4444, #f87171); }
.toast.toast-warning::before { background: linear-gradient(180deg, #f59e0b, #fcd34d); }
.toast.toast-info::before    { background: var(--nl-gradient-primary); }

.toast-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-family: var(--primary-font);
    font-weight: 700;
    font-size: 13px;
    color: var(--nl-text);
    padding: 10px 14px 8px 18px;
}

.toast-body {
    font-family: var(--primary-font);
    font-size: 13px;
    color: var(--nl-gray-600);
    padding: 10px 14px 12px 18px;
    line-height: 1.5;
}

/* ---- Center container ---------------------------------------------- */
.toast-center-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    width: min(90vw, 440px);
    margin: 0;
    padding: 0 8px;
    z-index: 2000;
}

.toast-center-container .toast {
    width: 100%;
}

/* ---- Centered variant ---------------------------------------------- */
.toast.centered-toast .toast-header {
    justify-content: center;
    width: 100%;
}

.toast.centered-toast .toast-header .me-auto {
    margin-right: 0;
    width: 100%;
    text-align: center;
}

.toast.centered-toast .toast-body {
    text-align: center;
}

/* ---- Overlay ------------------------------------------------------- */
#toast-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1999;
    animation: nl-fade-in 0.2s ease;
}

/* ---- Top-right stack container ------------------------------------ */
.toast-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
    max-width: 380px;
    width: calc(100vw - 40px);
}
