/* รูปแบบข้อความแจ้งเตือนกลางของระบบ e-Finance */
.system-alert-container:empty {
    display: none;
}

.system-alert {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 28px;
    gap: 11px;
    align-items: start;
    margin-bottom: 20px;
    padding: 14px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    animation: systemAlertIn 0.3s ease;
}

.system-alert:focus {
    outline: 3px solid rgba(14, 116, 144, 0.22);
    outline-offset: 2px;
}

.system-alert--error { background: #fff1f2; border-color: #fecdd3; color: #881337; }
.system-alert--warning { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.system-alert--success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.system-alert--info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }

.system-alert__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    font-size: 1.1rem;
    font-weight: 700;
}

.system-alert__title { margin: 0 0 2px; font-size: 0.95rem; font-weight: 700; }
.system-alert__message { margin: 0; font-size: 0.82rem; line-height: 1.5; }
.system-alert__code { display: block; margin-top: 5px; font-size: 0.68rem; opacity: 0.66; }

.system-alert__close {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.62;
}

.system-alert__close:hover,
.system-alert__close:focus-visible { opacity: 1; }
.system-alert.is-hiding { opacity: 0; transform: translateY(-6px); transition: 0.2s ease; }

@keyframes systemAlertIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .system-alert { animation: none; }
    .system-alert.is-hiding { transition: none; }
}
