/* Banner Styles */
.banner-container {
    width: 100%;
}

.banner {
    position: relative;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.banner-info {
    background-color: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.banner-success {
    background-color: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.banner-warning {
    background-color: #fed7aa;
    border: 1px solid #fdba74;
    color: #92400e;
}

.banner-announcement {
    background-color: #e9d5ff;
    border: 1px solid #c084fc;
    color: #6b21a8;
}

/* Dark mode: saturated surfaces on gray-950 pages (html.dark from main-layout) */
html.dark .banner {
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.35),
        0 2px 4px -2px rgba(0, 0, 0, 0.35);
}

html.dark .banner-info {
    background-color: #1e3a8a;
    border-color: #3b82f6;
    color: #dbeafe;
}

html.dark .banner-success {
    background-color: #14532d;
    border-color: #4ade80;
    color: #dcfce7;
}

html.dark .banner-warning {
    background-color: #7c2d12;
    border-color: #fb923c;
    color: #ffedd5;
}

html.dark .banner-announcement {
    background-color: #581c87;
    border-color: #c084fc;
    color: #f3e8ff;
}

html.dark .banner-message,
html.dark .banner-message .ql-editor {
    color: inherit;
}

html.dark .banner-info .banner-message a,
html.dark .banner-info .banner-message .ql-editor a {
    color: #93c5fd;
}

html.dark .banner-success .banner-message a,
html.dark .banner-success .banner-message .ql-editor a {
    color: #86efac;
}

html.dark .banner-warning .banner-message a,
html.dark .banner-warning .banner-message .ql-editor a {
    color: #fdba74;
}

html.dark .banner-announcement .banner-message a,
html.dark .banner-announcement .banner-message .ql-editor a {
    color: #e9d5ff;
}

html.dark .banner-message a:hover,
html.dark .banner-message .ql-editor a:hover {
    opacity: 0.92;
}

.banner-content-link {
    text-decoration: none;
    color: inherit;
}

.banner-content-link:hover {
    opacity: 0.9;
}

.banner-image {
    max-height: 200px;
    max-width: 300px;
    width: auto;
    height: auto;
    border-radius: 0.375rem;
    object-fit: contain;
}

.banner-text {
    min-width: 0;
}

.banner-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.banner-message {
    font-size: 0.875rem;
    line-height: 1.5;
}

.banner-close {
    flex-shrink: 0;
    background-color: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 0.5rem;
}

.banner-close:hover {
    opacity: 1;
}

.banner-dismissible.banner-hidden {
    display: none;
}

/* Hide banner areas until JS has applied dismissed state (prevents flash on hx-boost).
   Flow wrappers: visibility alone still reserves margin/padding (body bg shows as a strip on boost);
   collapse layout until checked. Fixed middle overlay/container: visibility only. */
#topBannersContainer[data-checked="false"],
#bottomBannersContainer[data-checked="false"] {
    visibility: hidden;
    max-height: 0;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

#middleBannerOverlay[data-checked="false"],
#middleBannersContainer[data-checked="false"] {
    visibility: hidden;
}

@media (max-width: 640px) {
    .banner-image {
        max-height: 120px;
        max-width: 150px;
    }
    
    .banner-title {
        font-size: 1rem;
    }
    
    .banner-message {
        font-size: 0.8125rem;
    }
} 