/* ==========================================================================
   announcement-bar.css — Sliding announcement strip (build-plan §4)
   ========================================================================== */

.announcement-bar {
    background-color: var(--color-text);
    color: #fff;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 200;
    font-size: var(--font-caption);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.announcement-bar__track {
    position: relative;
    flex: 1;
    text-align: center;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.announcement-bar__message {
    position: absolute;
    width: 100%;
    text-align: center;
    opacity: 0;
    transition: opacity 300ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.announcement-bar__message.is-active {
    opacity: 1;
    position: relative; /* active one takes flow */
}

.announcement-bar__message a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.announcement-bar__message a:hover {
    color: #fff;
}

.announcement-bar__message svg {
    flex-shrink: 0;
    color: var(--color-primary);
}

.announcement-bar__dismiss {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 12px;
    font-size: 1rem;
    line-height: 1;
    transition: color var(--transition);
    display: flex;
    align-items: center;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
}

.announcement-bar__dismiss:hover { color: #fff; }
.announcement-bar__dismiss:focus-visible { outline: 2px solid var(--color-primary); }

/* Hidden when dismissed (sessionStorage managed in JS) */
.announcement-bar--hidden { display: none; }

/* Dots navigation — subtle, below bar not inside it */
.announcement-bar__dots {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
}

.announcement-bar__dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: background var(--transition);
}

.announcement-bar__dot.is-active { background: rgba(255, 255, 255, 0.85); }

/* ---- Mobile Announcement Bar Fix ---- */
@media (max-width: 640px) {
    .announcement-bar {
        height: auto;
        min-height: 36px;
        padding: 4px 0;
    }

    .announcement-bar__message {
        white-space: normal;
        padding: 2px 2.75rem 2px 0.75rem;
        font-size: 0.75rem;
        line-height: 1.3;
        text-overflow: clip;
    }

    .announcement-bar__dismiss {
        right: 0;
    }

    .announcement-bar__dots {
        display: none;
    }
}
