/* ============================================================================
   Alerts + Toasts - tinted backgrounds, colored left strip, readable text
   ============================================================================ */

body.theme-new .alert {
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    border-left-width: 3px;
    padding: 12px 16px;
    box-shadow: none;
}

body.theme-new .alert-success {
    background: rgba(76, 175, 80, 0.10);
    border-color: rgba(76, 175, 80, 0.35);
    border-left-color: var(--success-color);
    color: #88e08c;
}

body.theme-new .alert-info {
    background: rgba(100, 181, 246, 0.10);
    border-color: rgba(100, 181, 246, 0.35);
    border-left-color: var(--info-color);
    color: #9ed3ff;
}

body.theme-new .alert-warning {
    background: rgba(255, 183, 77, 0.10);
    border-color: rgba(255, 183, 77, 0.35);
    border-left-color: var(--warning-color);
    color: #ffd6a0;
}

body.theme-new .alert-danger {
    background: rgba(244, 67, 54, 0.10);
    border-color: rgba(244, 67, 54, 0.35);
    border-left-color: var(--danger-color);
    color: #ff8a82;
}

/* In light theme keep tints but darken the text */
:root[data-theme="light"] body.theme-new .alert-success { color: #1b5e20; }
:root[data-theme="light"] body.theme-new .alert-info    { color: #0d47a1; }
:root[data-theme="light"] body.theme-new .alert-warning { color: #7d4900; }
:root[data-theme="light"] body.theme-new .alert-danger  { color: #7a1014; }

@media (prefers-color-scheme: light) {
    :root[data-theme="auto"] body.theme-new .alert-success { color: #1b5e20; }
    :root[data-theme="auto"] body.theme-new .alert-info    { color: #0d47a1; }
    :root[data-theme="auto"] body.theme-new .alert-warning { color: #7d4900; }
    :root[data-theme="auto"] body.theme-new .alert-danger  { color: #7a1014; }
}

/* Alert links should stay visible */
body.theme-new .alert a,
body.theme-new .alert .alert-link {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

/* Alert dismiss button */
body.theme-new .alert-dismissable .close,
body.theme-new .alert-dismissible .close {
    color: inherit;
    opacity: 0.7;
    text-shadow: none;
}

body.theme-new .alert-dismissable .close:hover,
body.theme-new .alert-dismissible .close:hover {
    opacity: 1;
}

/* Toastr / app-toast - Perfex commonly uses toastr.success / toastr.error */
body.theme-new #toast-container {
    z-index: 9999 !important;
}

body.theme-new #toast-container > div {
    border-radius: var(--radius-md);
    padding: 12px 16px 12px 50px;
    box-shadow: var(--shadow-elev);
    opacity: 0.98;
    background-image: none !important;
}

body.theme-new #toast-container > .toast-success {
    background: var(--success-color);
    color: #fff;
}

body.theme-new #toast-container > .toast-error {
    background: var(--danger-color);
    color: #fff;
}

body.theme-new #toast-container > .toast-warning {
    background: var(--warning-color);
    color: var(--bg-body);
}

body.theme-new #toast-container > .toast-info {
    background: var(--info-color);
    color: var(--bg-body);
}
