/* Toast notify — light / dark aware, progress clipped inside radius */

.aiz-notify {
    /* Light mode defaults — match site surface language */
    --nt-bg: var(--theme-surface, #ffffff);
    --nt-ink: var(--theme-ink, #111827);
    --nt-muted: var(--theme-muted, #6b7280);
    --nt-border: var(--theme-line, #e5e7eb);
    --nt-shadow: 0 12px 32px var(--theme-shadow-lg, rgba(15, 23, 42, 0.14));
    --nt-track: rgba(15, 23, 42, 0.1);
    --nt-accent: var(--primary, #e62e04);
    --nt-success: #059669;
    --nt-danger: #e11d48;
    --nt-warning: #d97706;
    --nt-info: #0284c7;
    --nt-type: var(--nt-accent);

    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    min-width: 0 !important;
    max-width: min(420px, calc(100vw - 28px)) !important;
    width: max-content !important;
    margin: 10px 14px !important;
    padding: 12px 14px 16px !important;
    border: 1px solid var(--nt-border) !important;
    border-radius: 14px !important;
    background: var(--nt-bg) !important;
    color: var(--nt-ink) !important;
    box-shadow: var(--nt-shadow) !important;
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    /* Clip progress bar to rounded corners — never let it poke out */
    overflow: hidden !important;
    z-index: 1080 !important;
}

/* Dark mode — soft raised surface, no harsh pure-black bar */
[data-theme="dark"] .aiz-notify {
    --nt-bg: var(--theme-surface-raised, #252530);
    --nt-ink: var(--theme-ink, #f0f0f5);
    --nt-muted: var(--theme-muted, #9898a8);
    --nt-border: var(--theme-line, rgba(255, 255, 255, 0.1));
    --nt-shadow: 0 14px 36px var(--theme-shadow-lg, rgba(0, 0, 0, 0.55));
    --nt-track: rgba(255, 255, 255, 0.12);
    --nt-success: #34d399;
    --nt-danger: #fb7185;
    --nt-warning: #fbbf24;
    --nt-info: #38bdf8;
}

.aiz-notify::before {
    display: none !important;
}

[dir="rtl"] .aiz-notify {
    text-align: right !important;
}

.aiz-notify__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--nt-type) 16%, transparent);
    color: var(--nt-type);
    font-size: 14px;
    line-height: 1;
}

.aiz-notify__icon i {
    line-height: 1;
}

.aiz-notify [data-notify="message"],
.aiz-notify__message {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    padding: 0;
    margin: 0;
    color: var(--nt-ink) !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.4;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.aiz-notify .close {
    display: none !important;
}

/*
 * Progress timer — flush to bottom edge, full width of toast.
 * Use inset + max-width so Bootstrap `.progress { width:100% }` cannot
 * stretch past the padded/rounded box.
 */
.aiz-notify .progress,
.aiz-notify [data-notify="progressbar"] {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 3px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--nt-track) !important;
    overflow: hidden !important;
    box-shadow: none !important;
    z-index: 1;
    pointer-events: none;
}

.aiz-notify .progress-bar,
.aiz-notify [data-notify="progressbar"] > .progress-bar,
.aiz-notify [data-notify="progressbar"] > div {
    display: block !important;
    height: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--nt-type) !important;
    box-shadow: none !important;
    opacity: 1;
    transition: none;
}

/* Types — keep solid brand colors off the toast chrome; tint via --nt-type only */
.aiz-notify.alert-success,
.aiz-notify.alert-danger,
.aiz-notify.alert-warning,
.aiz-notify.alert-info,
.aiz-notify.alert-primary,
.aiz-notify.alert-dark,
.aiz-notify.alert-secondary,
.aiz-notify.alert-secondary-base,
.aiz-notify.alert-light {
    background: var(--nt-bg) !important;
    color: var(--nt-ink) !important;
    border-color: var(--nt-border) !important;
}

.aiz-notify.alert-success { --nt-type: var(--nt-success); }
.aiz-notify.alert-danger { --nt-type: var(--nt-danger); }
.aiz-notify.alert-warning { --nt-type: var(--nt-warning); }
.aiz-notify.alert-info,
.aiz-notify.alert-primary { --nt-type: var(--nt-info); }
.aiz-notify.alert-dark,
.aiz-notify.alert-secondary,
.aiz-notify.alert-secondary-base { --nt-type: var(--nt-muted); }
.aiz-notify.alert-light { --nt-type: var(--nt-accent); }

@media (max-width: 575.98px) {
    .aiz-notify {
        max-width: calc(100vw - 28px) !important;
        width: calc(100vw - 28px) !important;
    }
}

@supports not (background: color-mix(in srgb, red 10%, transparent)) {
    .aiz-notify__icon {
        background: rgba(15, 23, 42, 0.06);
    }

    [data-theme="dark"] .aiz-notify__icon {
        background: rgba(255, 255, 255, 0.08);
    }
}
