/*
 * Toast styling — guarantees toasts are always solid & readable.
 *
 * The app uses yoeunes/toastr (flasher-toastr, classic toastr 2.1.4 DOM). When
 * the package's CDN-injected stylesheet doesn't reach the page the toast renders
 * with no background, so the text is invisible. These rules make the toast
 * self-sufficient: solid colour, white text, shadow, full opacity — and they
 * cover the SweetAlert2 toast used for session flashes too.
 */

/* ---- classic toastr container / toast ---- */
#toast-container { z-index: 1090; }
#toast-container > div {
    opacity: 1 !important;
    border-radius: .5rem !important;
    box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .25) !important;
    color: #fff !important;
    padding: 14px 18px 14px 50px !important;
    background-repeat: no-repeat !important;
    background-position: 15px center !important;
    background-color: #323a45 !important; /* neutral fallback if no type class */
    width: 340px !important;
    max-width: 90vw;
    font-size: .9rem;
    line-height: 1.35;
}

/* RTL toast icon sits on the right, reserve that space. */
body.rtl #toast-container > div,
.rtl #toast-container > div {
    padding: 14px 50px 14px 18px !important;
    background-position: right 15px center !important;
}
#toast-container > div:hover { box-shadow: 0 .65rem 1.5rem rgba(0, 0, 0, .35) !important; }

#toast-container > .toast-success { background-color: #16a34a !important; }
#toast-container > .toast-error   { background-color: #dc2626 !important; }
#toast-container > .toast-warning { background-color: #d97706 !important; }
#toast-container > .toast-info    { background-color: #2563eb !important; }

.toast-title   { font-weight: 700 !important; color: #fff !important; }
.toast-message { color: #fff !important; word-wrap: break-word; }
.toast-message a, .toast-message label { color: #fff !important; }
.toast-close-button { color: #fff !important; opacity: .9 !important; text-shadow: none !important; }
.toast-progress { opacity: .35 !important; background-color: #000 !important; }

/* ---- SweetAlert2 toast (session flashes via alert-message.blade) ---- */
.swal2-container .swal2-toast {
    box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .25) !important;
    background: #ffffff !important;
}
.swal2-container .swal2-toast .swal2-title { color: #1f2733 !important; }

@media (prefers-color-scheme: dark) {
    .swal2-container .swal2-toast { background: #1f2733 !important; }
    .swal2-container .swal2-toast .swal2-title { color: #e5e7eb !important; }
}
body.dark-theme .swal2-container .swal2-toast { background: #1f2733 !important; }
body.dark-theme .swal2-container .swal2-toast .swal2-title { color: #e5e7eb !important; }
