/* ===== Overlay ===== */
.announce-overlay {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(2px);
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    padding-top: 5vh;
    animation: announce-fadeIn 0.2s ease-out;
    display: block;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(50,50,50); /* Fallback color */
    background-color: rgba(0, 0, 0, 0.55);
}

/* ===== Modal Container ===== */
.announce-modal {
    background: var(--almost-white);
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 90%; /* Could be more or less, depending on screen size */
    max-width: 750px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 10px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    animation: announce-slideDown 0.25s ease-out;
    display: flex;
    flex-direction: column;
}

/* ===== Header ===== */
.announce-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.announce-title {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

/* ===== Close Button ===== */
.announce-close {
    background: none;
    border: none;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--dark-color);
    transition: color 0.2s ease;
    float: right;
}

.announce-close:hover,
.announce-close:focus{
    color: var(--medium-dark-color);
    text-decoration: none;
    cursor: pointer;
}

/* ===== Body ===== */
.announce-body {
    padding: 1.5rem;
}

/* ===== Individual Announcement ===== */
.announce-item {
    margin-bottom: 1.75rem;
}

.announce-item:last-child {
    margin-bottom: 0;
}

/* ===== Important Badge ===== */
.announce-badge {
    display: inline-block;
    background: var(--error-background);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== Content Styling ===== */
.announce-content h1,
.announce-content h2,
.announce-content h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.announce-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.announce-content ul,
.announce-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.announce-content a {
    color: #1565c0;
    text-decoration: underline;
}

.announce-content blockquote {
    border-left: 4px solid #ddd;
    padding-left: 1rem;
    color: #555;
    margin: 1rem 0;
}

/* ===== Footer ===== */
.announce-footer {
    border-top: 1px solid #eee;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== Preference Toggle ===== */
.announce-preference {
    font-size: 1.3rem;
    color: var(--dark-color);
}

.announce-preference input {
    margin-right: 0.4rem;
}

/* ===== Acknowledge Button ===== */
.announce-ack-btn {
    background: var(--dark-color);
    color: var(--almost-white);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.announce-ack-btn:hover {
    background-color: var(--medium-dark-color);
}

/* ===== Divider ===== */
.announce-divider {
    border-top: 1px solid #eee;
    margin: 1.5rem 0;
}

/* ===== Animations ===== */
@keyframes announce-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes announce-slideDown {
    from { 
        opacity: 0;
        transform: translateY(-15px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Prevent Background Scroll ===== */
body.announce-lock {
    overflow: hidden;
}

[role="switch"]
{
    margin-bottom: 2px !important;
}

.announce-preference label
{
    font-size: 1rem;
    font-weight: normal;
}

.announce-body, .announce-header, .announce-footer, .announce-preference, .announce-item
{
    padding: 5px;
}

.announce-divider
{
    margin: .2rem 0;
}

.announce-item
{
    margin: .2rem 0;
}

.announce-close
{
    margin: -1rem 0;
}

.announce-content p
{
    margin-bottom: .2rem;
    font-size: 18px;
}
