:root {
    --site-banner-height: 0px;
}

.site-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 55;
    background: linear-gradient(90deg, #ecfdf5, #d1fae5);
    border-bottom: 1px solid #a7f3d0;
}

.dark .site-banner {
    background: linear-gradient(90deg, rgba(6, 78, 59, 0.35), rgba(4, 120, 87, 0.25));
    border-bottom-color: rgba(16, 185, 129, 0.25);
}

.site-banner.is-hidden {
    display: none;
}

body.has-site-banner {
    padding-top: calc(var(--topnav-height) + var(--site-banner-height));
}

body.has-site-banner .site-topnav {
    top: var(--site-banner-height);
}

body.has-site-banner #appContent {
    min-height: calc(100vh - var(--topnav-height) - var(--site-banner-height));
}

body.has-site-banner .site-topnav-mobile-nav {
    padding-top: calc(var(--topnav-height) + var(--site-banner-height) + 2rem);
}

.site-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 2.5rem;
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

.site-banner-hit {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    flex: 1;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: opacity 0.15s ease;
}

.site-banner-hit:hover {
    opacity: 0.88;
}

.site-banner-hit:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
}

.site-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #047857;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 9999px;
}

.dark .site-banner-badge {
    color: #6ee7b7;
    background: rgba(0, 0, 0, 0.25);
}

.site-banner-text {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #065f46;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark .site-banner-text {
    color: #a7f3d0;
}

.site-banner-close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    font-size: 1.125rem;
    color: #059669;
    background: transparent;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.site-banner-close:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.dark .site-banner-close {
    color: #6ee7b7;
}

.dark .site-banner-close:hover {
    background: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}

@media (max-width: 639px) {
    .site-banner-hit {
        flex-wrap: wrap;
        row-gap: 0.25rem;
    }

    .site-banner-text {
        flex: 1 1 100%;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}
