/**
 * Dashboard-style system toast — solid color variant
 * Used by $.systemMessage() and layouts/flash.blade.php
 */

.system_message,
.alert.alert--positioned.bk-dash-toast {
    display: none;
    position: fixed;
    z-index: 9999;
    right: 20px;
    top: 50px;
    left: auto;
    width: auto;
    min-width: 300px;
    max-width: min(440px, calc(100vw - 40px));
    margin: 0;
    box-sizing: border-box;
    align-items: center;
    gap: 12px;
    padding: 12px 14px !important;
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 24px rgba(15, 30, 60, 0.18), 0 2px 6px rgba(15, 30, 60, 0.1);
    font-family: "DM Sans", "Source Sans 3", system-ui, -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: #ffffff;
    background-image: none !important;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.alert.alert--positioned.bk-dash-toast[style*="display: block"],
.alert.alert--positioned.bk-dash-toast[style*="display:block"],
.alert.alert--positioned.bk-dash-toast[style*="display: flex"],
.alert.alert--positioned.bk-dash-toast[style*="display:flex"] {
    display: flex !important;
}

.bk-dash-toast__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 1.05rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.bk-dash-toast__text,
.alert.alert--positioned.bk-dash-toast .sysmsgcontent,
.alert.alert--positioned.bk-dash-toast .content {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    color: #ffffff;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.bk-dash-toast__dismiss.close {
    position: static;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    cursor: pointer;
    opacity: 0.9;
    transform: none !important;
    -webkit-transform: none !important;
    line-height: 1;
    text-align: center;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.bk-dash-toast__dismiss.close::before,
.bk-dash-toast__dismiss.close::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
}

.bk-dash-toast__dismiss.close i {
    font-size: 0.95rem;
    line-height: 1;
}

.bk-dash-toast__dismiss.close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.26);
}

/* Success */
.alert.alert--positioned.bk-dash-toast.alert--success,
.alert.alert--positioned.bk-dash-toast.alert--success.bg-primary {
    background: #2e8b57 !important;
    color: #ffffff !important;
}

/* Error */
.alert.alert--positioned.bk-dash-toast.alert--danger {
    background: #dc2626 !important;
    color: #ffffff !important;
}

/* Warning */
.alert.alert--positioned.bk-dash-toast.alert--warning {
    background: #d97706 !important;
    color: #ffffff !important;
}

/* Info */
.alert.alert--positioned.bk-dash-toast.alert--info {
    background: #2563eb !important;
    color: #ffffff !important;
}

/* Processing */
.alert.alert--positioned.bk-dash-toast.alert--process {
    background: #0f172a !important;
    color: #f8fafc !important;
    padding-left: 52px !important;
}

.alert.alert--positioned.bk-dash-toast.alert--process .bk-dash-toast__icon {
    display: none;
}

.alert.alert--positioned.bk-dash-toast.alert--danger a.-link-underline,
.alert.alert--positioned.bk-dash-toast.alert--success a.-link-underline,
.alert.alert--positioned.bk-dash-toast.alert--info a.-link-underline,
.alert.alert--positioned.bk-dash-toast.alert--warning a.-link-underline {
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
}

/* Dark mode — keep solid fills, slightly deeper tones */
[data-theme="dark"] .alert.alert--positioned.bk-dash-toast.alert--success {
    background: #228b4e !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .alert.alert--positioned.bk-dash-toast.alert--danger {
    background: #b91c1c !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .alert.alert--positioned.bk-dash-toast.alert--warning {
    background: #b45309 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .alert.alert--positioned.bk-dash-toast.alert--info {
    background: #1d4ed8 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .alert.alert--positioned.bk-dash-toast.alert--process {
    background: #020617 !important;
}

@media (max-width: 767px) {
    .system_message,
    .alert.alert--positioned.bk-dash-toast {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
    }
}
