/* Site-wide broadcast banner. Shared by the Blazor shell (BroadcastBanner.razor),
   the admin dialog preview, and the login page — so it cannot be scoped CSS. */

/* RadzenLayout is height:100vh. The banner sits above it, so without this the page
   becomes 100vh + banner tall and the whole document gains a scrollbar — the editor
   pane itself fits, but the shell around it does not. Shrink the layout by the same
   amount the banner adds. The 0px fallback is a no-op when no banner is showing. */
.rz-layout {
    height: calc(100vh - var(--app-broadcast-height, 0px));
}

.broadcast-bar {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.broadcast-message {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.4;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.broadcast-info    { background: #e3f2fd; color: #0d3c61; }
.broadcast-warning { background: #fff4e5; color: #663c00; }
.broadcast-danger  { background: #fdecea; color: #611a15; }

.broadcast-icon {
    flex-shrink: 0;
    font-size: 20px;
    line-height: 1.2;
}

.broadcast-text {
    flex-grow: 1;
    min-width: 0;
}

/* The message body arrives as rendered markdown, so collapse the block margins
   Markdig emits or every banner gains a stray line of padding. */
.broadcast-text p:first-child { margin-top: 0; }
.broadcast-text p:last-child  { margin-bottom: 0; }
.broadcast-text a             { color: inherit; text-decoration: underline; }

.broadcast-dismiss {
    flex-shrink: 0;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
}

.broadcast-dismiss:hover { opacity: 1; }
