/* === Alerts === */
.alert {
    position: fixed;
    top: 10px;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: fit-content;
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    font-family: 'Source Serif Pro', sans-serif;
}
.alert.show { opacity: 1; }
.alert.success { background-color: #d4edda; color: #155724; border-left: 5px solid #28a745; }
.alert.error { background-color: #f8d7da; color: #721c24; border-left: 5px solid #dc3545; }
.alert.warning { background-color: #fff5d5; color: #664d03; border-left: 5px solid rgb(255 203 78);}

.alert {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
}

.alert-close {
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: inherit;
    cursor: pointer;
    font-weight: 700;
    margin-left: 6px;
    opacity: 0.6;
}
.alert-close:hover { opacity: 1; }
#alert-stack {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    z-index: 2147483647;
    pointer-events: none;
}
.alert {
    position: relative;
    left: 0 !important;
    transform: none !important;
    pointer-events: auto;
}
.alert-message {
    white-space: pre-line;
}

@media (max-width: 768px) {
    #alert-stack {
        left: 20px !important;
        transform: none !important;
        width: 90%;
        padding: 0 12px;
    }

    .alert {
        width: 90%;
        border-radius: 8px;
    }
}