/* ============================================================
   WizBrand — Unified professional toast / notification system
   Used project-wide for success / error / warning / info messages.
   No inline styles, mobile-friendly, accessible.
   ============================================================ */

.wz-toast-root {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 2147483000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 380px;
    max-width: calc(100vw - 36px);
    pointer-events: none;
}

.wz-toast {
    pointer-events: auto;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px 14px 14px;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e6eaf2;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .16), 0 4px 10px rgba(15, 23, 42, .06);
    overflow: hidden;
    transform: translateX(120%);
    opacity: 0;
    transition: transform .35s cubic-bezier(.22, 1, .36, 1), opacity .35s ease;
}

.wz-toast.is-in {
    transform: translateX(0);
    opacity: 1;
}

.wz-toast.is-out {
    transform: translateX(120%);
    opacity: 0;
}

/* Coloured accent bar on the left edge */
.wz-toast::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    border-radius: 14px 0 0 14px;
}

.wz-toast__icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
}

.wz-toast__icon svg {
    width: 18px;
    height: 18px;
}

.wz-toast__body {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 1px;
}

.wz-toast__title {
    display: block;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f1b34;
    margin-bottom: 2px;
}

.wz-toast__msg {
    display: block;
    font-size: .86rem;
    line-height: 1.45;
    color: #475067;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.wz-toast__close {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #94a0b8;
    font-size: 1.25rem;
    line-height: 1;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.wz-toast__close:hover {
    background: #f1f4f9;
    color: #475067;
}

/* Auto-dismiss progress bar */
.wz-toast__bar {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    transform-origin: left center;
    opacity: .55;
}

/* ---- Variants ---------------------------------------------------------- */
.wz-toast--success::before { background: #16a34a; }
.wz-toast--success .wz-toast__icon { background: #e7f7ee; color: #16a34a; }
.wz-toast--success .wz-toast__bar { background: #16a34a; }

.wz-toast--error::before { background: #dc2626; }
.wz-toast--error .wz-toast__icon { background: #fdeaea; color: #dc2626; }
.wz-toast--error .wz-toast__bar { background: #dc2626; }

.wz-toast--warning::before { background: #d97706; }
.wz-toast--warning .wz-toast__icon { background: #fef3e2; color: #d97706; }
.wz-toast--warning .wz-toast__bar { background: #d97706; }

.wz-toast--info::before { background: #2563eb; }
.wz-toast--info .wz-toast__icon { background: #e8f0fe; color: #2563eb; }
.wz-toast--info .wz-toast__bar { background: #2563eb; }

/* ---- Mobile: full-width, slide up from bottom -------------------------- */
@media (max-width: 575.98px) {
    .wz-toast-root {
        top: auto;
        bottom: 14px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
    }

    .wz-toast {
        transform: translateY(140%);
    }

    .wz-toast.is-in {
        transform: translateY(0);
    }

    .wz-toast.is-out {
        transform: translateY(140%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .wz-toast {
        transition: opacity .2s ease;
        transform: none;
    }

    .wz-toast.is-out {
        transform: none;
    }
}
