/* ==========================================================================
   TebZone toast notifications (loaded only when TZ_UI is on).

   The markup comes from window.showToast() in app.min.js:
   .toast-notification.{success|warning|danger|error|info} with an inline
   background colour, so the surface and accent rules below use !important.
   Surface: white card (dark teal in dark mode). Accent bar: deep teal for
   success and info, gold for warnings, crimson for errors.
   ========================================================================== */

.toast-container {
    --tzt-accent: #005A6E;
    --tzt-surface: #FFFFFF;
    --tzt-ink: #061A22;
    --tzt-muted: #46606a;
    --tzt-close: #5b7480;
    --tzt-close-hover-bg: rgba(0, 90, 110, .10);
    --tzt-shadow: 0 10px 30px rgba(6, 26, 34, .14), 0 2px 6px rgba(6, 26, 34, .08);
    bottom: 24px;
    gap: 12px;
    max-width: 380px;
    z-index: 10000;
}

body.dark-mode .toast-container {
    --tzt-surface: #0B3A47;
    --tzt-ink: #F2FAFB;
    --tzt-muted: #B9D3D9;
    --tzt-close: #B9D3D9;
    --tzt-close-hover-bg: rgba(255, 255, 255, .12);
    --tzt-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

.toast-container .toast-notification {
    background: var(--tzt-surface) !important;
    color: var(--tzt-ink) !important;
    border: 1px solid rgba(0, 90, 110, .12);
    border-inline-start: 5px solid var(--tzt-accent);
    border-radius: 14px;
    padding: 14px 44px 16px 14px;
    min-height: 0;
    margin: 0;
    box-shadow: var(--tzt-shadow);
    align-items: flex-start;
    font-family: var(--tz-font-body, "Nexa Book", "Cairo", Arial, sans-serif);
}

.toast-container .toast-notification.success,
.toast-container .toast-notification.info { --tzt-accent: #005A6E; }
.toast-container .toast-notification.warning { --tzt-accent: #E0A82E; }
.toast-container .toast-notification.danger,
.toast-container .toast-notification.error { --tzt-accent: #B3203F; }

body.dark-mode .toast-container .toast-notification.success,
body.dark-mode .toast-container .toast-notification.info { --tzt-accent: #15D1C8; }
body.dark-mode .toast-container .toast-notification.danger,
body.dark-mode .toast-container .toast-notification.error { --tzt-accent: #FF6B86; }

/* Icon: a soft tinted disc with the accent colour */
.toast-container .toast-icon {
    width: 34px;
    height: 34px;
    margin: 0;
    margin-inline-end: 12px;
    background: color-mix(in srgb, var(--tzt-accent) 14%, transparent);
    flex-shrink: 0;
}
.toast-container .toast-icon::before { display: none; }
.toast-container .toast-icon-inner,
.toast-container .toast-icon-inner.success-icon,
.toast-container .toast-icon-inner.warning-icon,
.toast-container .toast-icon-inner.danger-icon,
.toast-container .toast-icon-inner.info-icon {
    width: 34px;
    height: 34px;
    color: var(--tzt-accent);
}
.toast-container .toast-notification.warning .toast-icon-inner { color: #9A6A00; }
body.dark-mode .toast-container .toast-notification.warning .toast-icon-inner { color: #E0A82E; }

.toast-container .toast-content { padding: 0; min-width: 0; }
.toast-container .toast-title {
    font-family: var(--tz-font-head, "Conto Bold", "Cairo", Arial, sans-serif);
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
    margin: 0 0 2px;
    color: var(--tzt-ink);
}
.toast-container .toast-message {
    font-size: 13.5px;
    line-height: 1.5;
    opacity: 1;
    color: var(--tzt-muted);
    overflow-wrap: anywhere;
}
.toast-container .toast-title:empty { display: none; }

/* Close button */
.toast-container .toast-close {
    position: absolute;
    top: 10px;
    right: auto;
    left: auto;
    inset-inline-end: 10px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--tzt-close);
    opacity: 1;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.toast-container .toast-close svg { fill: currentColor; }
.toast-container .toast-close:hover { background: var(--tzt-close-hover-bg); color: var(--tzt-ink); }
.toast-container .toast-close:focus-visible { outline: 2px solid var(--tzt-accent); outline-offset: 2px; }

/* Progress strip: the accent colour, thin */
.toast-container .toast-divider { display: none; }
.toast-container .toast-progress {
    height: 3px;
    background: var(--tzt-accent);
    opacity: .55;
}

@media (max-width: 575.98px) {
    .toast-container { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    .toast-container .toast-notification { transition: none !important; }
    .toast-container .toast-progress { transition: none !important; }
}
