/* Shared alert system for public, authenticated, student and exam layouts. */
.alert {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 58px;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    padding: 13px 48px 13px 14px !important;
    overflow: hidden;
    border: 1px solid transparent !important;
    border-left-width: 4px !important;
    border-radius: 12px !important;
    background-image: none !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .07) !important;
    color: #334155 !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
}
.alert::before {
    content: 'i';
    display: inline-flex;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #e0f2fe;
    color: #0369a1;
    font-family: Arial, sans-serif;
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
}
.alert > i.fa:first-child { display: none !important; }
.alert p,
.alert h4 { margin: 0; color: inherit !important; }
.alert a { color: inherit !important; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }

.alert-success {
    border-color: #bbf7d0 !important;
    border-left-color: #16a34a !important;
    background: linear-gradient(135deg, #f0fdf4, #ffffff 72%) !important;
    color: #166534 !important;
}
.alert-success::before { content: '\2713'; background: #dcfce7; color: #15803d; }
.alert-danger,
.alert-error {
    border-color: #fecaca !important;
    border-left-color: #dc2626 !important;
    background: linear-gradient(135deg, #fef2f2, #ffffff 72%) !important;
    color: #991b1b !important;
}
.alert-danger::before,
.alert-error::before { content: '\00d7'; background: #fee2e2; color: #dc2626; font-size: 22px; }
.alert-warning {
    border-color: #fde68a !important;
    border-left-color: #d97706 !important;
    background: linear-gradient(135deg, #fffbeb, #ffffff 72%) !important;
    color: #92400e !important;
}
.alert-warning::before { content: '!'; background: #fef3c7; color: #b45309; }
.alert-info {
    border-color: #bae6fd !important;
    border-left-color: #0284c7 !important;
    background: linear-gradient(135deg, #f0f9ff, #ffffff 72%) !important;
    color: #075985 !important;
}

.alert .btn-close,
.alert .close {
    position: absolute;
    top: 50%;
    right: 13px;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0 !important;
    transform: translateY(-50%);
    border: 0 !important;
    border-radius: 8px;
    background-color: transparent !important;
    color: currentColor !important;
    font-size: 20px;
    line-height: 28px;
    opacity: .58;
    box-shadow: none !important;
}
.alert .btn-close:hover,
.alert .close:hover { background-color: rgba(15, 23, 42, .07) !important; opacity: 1; }
.alert .btn-close:focus-visible,
.alert .close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

@media (max-width: 575.98px) {
    .alert {
        min-height: 54px;
        gap: 10px;
        margin-bottom: 14px;
        padding: 11px 42px 11px 11px !important;
        border-radius: 10px !important;
        font-size: 13px;
    }
    .alert::before { width: 29px; height: 29px; flex-basis: 29px; border-radius: 9px; font-size: 15px; }
    .alert-danger::before,
    .alert-error::before { font-size: 20px; }
    .alert .btn-close,
    .alert .close { right: 9px; }
}
