/* ============================================================
   AASSFIX — Notification / Toast System
   Sharp corners, solid colour-fills, no glassmorphism
   ============================================================ */

/* ── Stack container ─────────────────────────────────────── */
#app-toast-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: 360px;
    max-width: calc(100vw - 40px);
}

/* ── Single Toast ────────────────────────────────────────── */
.app-toast {
    pointer-events: all;
    display: flex;
    align-items: stretch;
    border-radius: 8px;
    overflow: hidden;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.15),
        0 6px 16px rgba(0, 0, 0, 0.12);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    animation: toast-in 0.28s ease-out both;
    background: #fff;
}

.app-toast.toast-leaving {
    animation: toast-out 0.24s ease-in both;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateX(0);
        max-height: 200px;
    }
    to {
        opacity: 0;
        transform: translateX(50px);
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* ── Coloured side strip ─────────────────────────────────── */
.app-toast__stripe {
    width: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    background: var(--toast-stripe, #64748b);
}

/* ── Body ────────────────────────────────────────────────── */
.app-toast__body {
    flex: 1;
    min-width: 0;
    padding: 12px 10px 12px 14px;
    border-left: 1px solid var(--toast-border, #e2e8f0);
}

.app-toast__heading {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--toast-stripe, #64748b);
    margin: 0 0 3px;
    line-height: 1.2;
}

.app-toast__text {
    font-size: 13px;
    line-height: 1.55;
    color: #2d3748;
    margin: 0;
    word-break: break-word;
}

/* ── Dismiss button ──────────────────────────────────────── */
.app-toast__close {
    flex-shrink: 0;
    align-self: flex-start;
    background: none;
    border: none;
    cursor: pointer;
    color: #a0aec0;
    font-size: 16px;
    line-height: 1;
    padding: 10px 12px 0 4px;
    transition: color 0.15s;
}

.app-toast__close:hover {
    color: #4a5568;
}

/* ── Progress bar ────────────────────────────────────────── */
.app-toast__progress {
    position: absolute;
    left: 52px;   /* starts after the stripe */
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--toast-stripe, #64748b);
    opacity: 0.3;
    transform-origin: left;
    animation: toast-progress linear both;
    animation-duration: var(--toast-duration, 4000ms);
}

@keyframes toast-progress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* make toast position:relative so progress bar anchors correctly */
.app-toast {
    position: relative;
}

/* ═══════════════════════════════════════════════════════════
   VARIANTS  — solid stripe colours
   ═══════════════════════════════════════════════════════════ */

/* ── Success ─── green ───────────────────────────────────── */
.app-toast--success {
    --toast-stripe:  #16a34a;
    --toast-border:  #bbf7d0;
}
.app-toast--success .app-toast__stripe {
    background: #16a34a;
}

/* ── Error ─── red ───────────────────────────────────────── */
.app-toast--error {
    --toast-stripe:  #dc2626;
    --toast-border:  #fecaca;
}
.app-toast--error .app-toast__stripe {
    background: #dc2626;
}

/* ── Warning ─── amber ───────────────────────────────────── */
.app-toast--warning {
    --toast-stripe:  #d97706;
    --toast-border:  #fde68a;
}
.app-toast--warning .app-toast__stripe {
    background: #d97706;
}

/* ── Info ─── blue ───────────────────────────────────────── */
.app-toast--info {
    --toast-stripe:  #2563eb;
    --toast-border:  #bfdbfe;
}
.app-toast--info .app-toast__stripe {
    background: #2563eb;
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    #app-toast-stack {
        top: auto;
        bottom: 16px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: 100%;
    }

    @keyframes toast-in {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes toast-out {
        from {
            opacity: 1;
            transform: translateY(0);
            max-height: 200px;
        }
        to {
            opacity: 0;
            transform: translateY(30px);
            max-height: 0;
        }
    }
}
