body.alert-active {
    margin-top: var(--alert-height, 0); /* Pushes content down by alert height */
    transition: margin-top 0.3s ease; /* Smooth transition when alert appears/disappears */
}

.alert {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
}

#sitewide-alert {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    gap: 10px;
    opacity: 1; /* Default opacity */
    transition: opacity 0.5s ease, height 0.5s ease; /* Smooth fade-out and collapse */
}

/* Example for button outline colors based on alert color */
#sitewide-alert .close-alert-btn {
    background-color: #fff;
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    opacity: 1;
    padding: 3px 10px;
}

/* Ensure the button applies Bootstrap's outline style dynamically */
#sitewide-alert .close-alert-btn.btn-outline-success {
    border-color: #28a745;
    color: #28a745;
}

#sitewide-alert .close-alert-btn.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

#sitewide-alert .close-alert-btn.btn-outline-warning {
    border-color: #856404;
    color: #856404;
}

#sitewide-alert .close-alert-btn.btn-outline-info {
    border-color: #17a2b8;
    color: #17a2b8;
}

#sitewide-alert .close-alert-btn:hover {
    opacity: 0.8; /* Button hover effect */
}
