/* Page host: Communications / System hub wrap the workspace in .jbf-body.announcements-tab-body */
.announcements-tab-body {
    padding: 8px 32px 16px;
    min-height: 0;
}

.announcements-tab-body .ann-workspace {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* xs/sm tier (≤ --bp-md = 768). 767.98 mirrors --bp-md; @media can't deref vars. */
@media (max-width: 767.98px) {
    .announcements-tab-body {
        padding: 8px 16px 12px;
    }
}

/* Inline "New announcement" toolbar above the table */
.ann-workspace .ann-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    flex-shrink: 0;
}

/* Side-panel edit form (rendered inside JbfRightPanel via PaginatedTable.PanelAddContent) */
.ann-edit-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Title input: force the raw <input> to fill the panel column.
   rz-textbox has its own default width (~12.5rem) that beats w-100 at normal
   specificity, so we take the class up to rz-textbox + own class = 0,2,0. */
.ann-edit-form .ann-title-input {
    width: 100%;
    box-sizing: border-box;
    display: block;
}

.ann-date-pinned-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 20px;
}

.ann-date-field {
    flex: 0 0 auto;
}

.ann-date-picker {
    width: 9.25rem;
    max-width: 100%;
}

.ann-pinned-field {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 2px;
}

.ann-pinned-label {
    font-size: 14px;
    color: #35474e;
    user-select: none;
}

/* Rich-text preview surface used on dashboards (not the manage workspace) */
.ann-preview-html {
    font-size: 14px;
    line-height: 1.5;
    color: #35474e;
}

.ann-preview-html img {
    max-width: 100%;
    height: auto;
}

.dashboard-announcement-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-announcement-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.dashboard-announcement-list li:last-child {
    border-bottom: none;
}

.dashboard-announcement-title {
    font-weight: 600;
    color: #021922;
    margin-bottom: 4px;
}

.dashboard-announcement-meta {
    color: #808c91;
    font-size: 12px;
    margin-top: 2px;
    margin-bottom: 6px;
}

.dashboard-announcement-body {
    margin-top: 0;
    margin-bottom: 4px;
}

.dashboard-announcement-body.ann-preview-html {
    font-size: 13px;
}

.dashboard-announcement-summary {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 13px;
}

.dashboard-announcement-summary--clamped {
    max-height: 5.5rem;
    overflow: hidden;
    position: relative;
}

.dashboard-announcement-readmore {
    font-size: 12px;
    margin-top: 2px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* "Show For" audience picker - inline checkbox row. Typography inherits from
   the default label styles so the five options match other Radzen checkboxes
   on the form (e.g. "Pinned", or the rules-engine panels). */
.ann-edit-form .ann-audience-checks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
}

/* ── Row-click preview panel ───────────────────────────────────────────────
   Read-only view of an announcement inside the right panel. Edit + Delete
   actions live in the panel header via PanelHeaderActions, so this body only
   needs layout + typography. Matches the tone of the dashboard card preview
   without copy-pasting its scoped styles. */
.ann-preview-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ann-preview-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    /* Flex eats the whitespace between <span> items, so the " · " separators
       visually collide with the date/audience text. Use gap for consistent
       spacing between every meta chip (date, separator dot, audience label,
       separator dot, pinned indicator). */
    gap: 0 6px;
    font-size: 13px;
    color: #808c91;
}

.ann-preview-meta-sep {
    color: #c2cbcf;
}

.ann-preview-pinned {
    color: #35474e;
    font-weight: 600;
}

.ann-preview-pinned i {
    margin-right: 4px;
}

.ann-preview-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ann-preview-section-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #808c91;
    font-weight: 600;
}

.ann-preview-empty {
    font-size: 13px;
    color: #808c91;
    font-style: italic;
}

/* ── PageContentZone admin discovery overlay ──────────────────────────────
   Only the admin render-branch in PageContentZone.razor emits the
   .pcz-admin-target wrapper (FSC Admin / System Admin only); non-admin
   users never see this UI and these rules never apply to them.

   At rest the overlay is invisible -- zero visual cost on real pages.
   On hover, every zone exposes:
     - a 2px dashed plum outline that shows the zone's bounds, and
     - a small corner chip (anchored INSIDE the box at top-right, so it
       survives any ancestor overflow:hidden) showing the zone's
       "Page → DisplayName" so admins can correlate the live zone with
       the FSC Library / Page Content grid grouping.

   Empty + no-fallback zones show a faint dashed placeholder (.pcz-admin-empty)
   so the zone is still discoverable; the placeholder isn't rendered for
   non-admin users (no .pcz-admin-target wrapper => this branch never fires
   in their tree). */
.pcz-admin-target {
    position: relative;
    transition: outline-color 0.15s ease;
}

.pcz-admin-target:hover {
    outline: 2px dashed var(--cum-primary, #7d5b81);
    outline-offset: -2px;
    border-radius: 4px;
}

.pcz-admin-target::before {
    content: attr(data-pcz-label);
    position: absolute;
    top: 0;
    right: 0;
    padding: 3px 9px;
    background: var(--cum-primary, #7d5b81);
    color: #fff;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 0 4px 0 6px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 5;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
}

.pcz-admin-target:hover::before {
    opacity: 1;
    transform: translateY(0);
}

.pcz-admin-target--loading {
    opacity: 0.6;
}

.pcz-admin-empty {
    border: 1px dashed rgba(125, 91, 129, 0.35);
    border-radius: 4px;
    padding: 12px 14px;
    font-size: 12px;
    color: rgba(125, 91, 129, 0.85);
    background: rgba(125, 91, 129, 0.04);
    text-align: center;
    font-style: italic;
}

/* Read more link rendered by PageContentZone when both Summary and Body
   are authored. Mirrors .dashboard-announcement-readmore visually (same
   plum link, same compact size) so the dashboard feed and the page-content
   strip read as the same family of components. Tight margin-top leaves the
   summary's natural bottom rhythm intact. */
.pcz-readmore {
    margin-top: 6px;
    color: var(--cum-primary, #7d5b81);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
}

.pcz-readmore:hover {
    color: #5a4360;
}

.pcz-summary {
    /* Inherit the announcements rich-text rhythm so HTML pasted from the
       authoring rich-text editor renders consistent with dashboard cards. */
    margin: 0;
}

/* The rich-text editor wraps every paragraph in <p>, which carries the UA
   default top/bottom margin (~1em). Inside the tightened .pcz-card__body
   that compounds with our padding and re-introduces the "too much space"
   problem above/below the content. Reset the first/last child margin so
   the body's own padding controls the gap, while preserving inter-paragraph
   spacing for multi-paragraph summaries. */
.pcz-card__body :first-child {
    margin-top: 0;
}

.pcz-card__body :last-child {
    margin-bottom: 0;
}

/* ──────────────────────────────────────────────────────────────────────────
   Embedded video iframe sizing inside PageContentZone surfaces.

   The rich-text editor stores iframes with the dimensions Vimeo / YouTube
   supplied at paste time (commonly width="640" height="360"). When a PCZ
   surface is narrower than 640px (carousel slides, tile grid cells, list
   rows, or any responsive card on tablets / phones), the browser scales
   the WIDTH down to fit but the inline `height` attribute stays at 360px.
   That forces the iframe taller than the scaled video needs, so the
   player letterboxes -- you see the (small) video poster on top with a
   wide black band underneath. Forcing `height: auto` + a 16/9 aspect ratio
   collapses that band so the iframe is exactly as tall as the video,
   eliminating the "black bar" without any clip-path tricks. We constrain
   it to PCZ surfaces only so the rest of the app's iframe layouts (Canva
   embeds in the FSC library editor, e.g.) keep their authored proportions.
   ────────────────────────────────────────────────────────────────────── */
.pcz-card iframe,
.pcz-list iframe,
.pcz-tile-grid iframe,
.pcz-carousel iframe {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
}

/* ──────────────────────────────────────────────────────────────────────────
   PageContentZone card frame.
   Renders ONLY when an admin authored a Title on the row; otherwise the
   zone emits content "naked" (no card chrome) so a banner / strip can sit
   flush against host-page layout. The visual vocabulary -- pink centered
   title bar, hairline divider, white card on a light shadow -- is
   intentionally identical to the event-landing .evl-card / .evl-card__title
   pair (Web/wwwroot/css/event-landing.css) so PageContent zones, the
   public Event Landing 2x2 grid, and the dashboard cards (which now use
   the same .dashboard-section-title-accent underline treatment) all read
   as one family of components instead of three near-misses.

   Color tokens are duplicated rather than referenced (event-landing.css
   scopes --pl-card-border / --pl-text-default to that page only) so the
   frame ports correctly to any page hosting a PageContentZone.
   ────────────────────────────────────────────────────────────────────── */
.pcz-card {
    background: #ffffff;
    border: 1px solid #e6e8e9;
    border-radius: 12px;
    padding: 0; /* padding lives on .pcz-card__title and .pcz-card__body */
    color: #021922;
    line-height: 1.55;
    font-size: 15px;
    overflow: hidden; /* clips the title bar's bottom border to the rounded corners */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.pcz-card__title {
    padding: 6px 14px;
    /* Match the dashboard card titles. The dashboard markup renders the
       title as <h3 class="h6 dashboard-section-title-accent">, and
       Bootstrap's .h6 forces font-size: 1rem (16px) on the inner heading
       -- so even though .dashboard-card-title-bar declares 18px on the
       wrapper, the actual rendered text on My Events / My Tags / Message
       Center cards is 1rem with Bootstrap's heading line-height of 1.2.
       Matching both font-size AND line-height here keeps the PCZ card
       title visually consistent with every other card on the dashboard /
       page-content surfaces -- a wider line-height makes the bar look
       taller and the type look bigger even at the same px size. */
    font-size: 1rem;
    font-weight: 600;
    color: #D23C77;
    text-align: center;
    border-bottom: 1px solid #e6e8e9;
    letter-spacing: 0.005em;
    line-height: 1.2;
}

.pcz-card__body {
    padding: 8px 14px 10px;
}

/* xs/sm tier breakpoint mirrors --bp-md (768px). Media queries can't deref CSS
   vars so the literal is duplicated from the rest of the responsive surface.
   Dashboard mobile parity: .dashboard-card-title-bar drops to 14.5px on
   the wrapper, but the inner <h3 class="h6"> keeps Bootstrap's 1rem so we
   leave the title size alone here and only tighten padding. */
@media (max-width: 767.98px) {
    .pcz-card__title { padding: 5px 12px; }
    .pcz-card__body  { padding: 7px 12px 9px; }
}

/* ──────────────────────────────────────────────────────────────────────────
   PageContentZone multi-item display modes (Carousel / List / Tile).
   Each mode is configured per-zone in page_content_zone_setting; missing
   rows fall back to Static which keeps the .pcz-card rendering above. The
   three modes below all reuse the .pcz-card chrome where it makes sense
   (Carousel renders a single card at a time and rotates; List is a stack
   of titled summary rows; Tile is an image grid with title overlay) so the
   visual vocabulary stays consistent regardless of which mode the admin
   picks. Click handlers route into JBFPageContentModal -- see the modal
   styling block further below.
   ────────────────────────────────────────────────────────────────────── */

/* ── Carousel ─────────────────────────────────────────────────────────── */
.pcz-carousel {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* Active slide is rendered as a button so keyboard users can open the modal
   with Enter / Space; we strip the default button chrome and reuse .pcz-card
   for the visual frame so the carousel reads exactly like the static card. */
.pcz-carousel__slide.pcz-card {
    display: block;
    width: 100%;
    text-align: inherit;
    font: inherit;
    line-height: inherit;
    padding: 0;
    border: 1px solid #e6e8e9;
    background: #ffffff;
    color: inherit;
    cursor: pointer;
    transition: box-shadow 120ms ease-in-out;
}

.pcz-carousel__slide.pcz-card:hover,
.pcz-carousel__slide.pcz-card:focus-visible {
    box-shadow: 0 2px 8px rgba(210, 60, 119, 0.15);
    outline: none;
}

.pcz-carousel__dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding-top: 4px;
}

.pcz-carousel__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d6d6d6;
    transition: background-color 120ms ease-in-out, transform 120ms ease-in-out;
}

.pcz-carousel__dot--active {
    background: #D23C77;
    transform: scale(1.2);
}

/* ── List ────────────────────────────────────────────────────────────── */
.pcz-list {
    /* Fixed-height scrollable container per the design spec. The exact
       max-height is generous enough to show ~3 entries before scrolling
       kicks in on a typical 1080p viewport. */
    background: #ffffff;
    border: 1px solid #e6e8e9;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    max-height: none;
    min-height: 0;
    width: 100%;
    overflow-y: visible;
    overflow-x: hidden;
}

.pcz-list__item {
    display: block;
    width: 100%;
    font: inherit;
    line-height: inherit;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #f0f0f0;
    padding: 14px 18px;
    cursor: pointer;
    text-align: inherit;
    color: inherit;
    transition: background-color 120ms ease-in-out;
}

.pcz-list__item:last-child {
    border-bottom: 0;
}

.pcz-list__item:hover,
.pcz-list__item:focus-visible {
    background-color: rgba(210, 60, 119, 0.04);
    outline: none;
}

.pcz-list__title {
    font-size: 15px;
    font-weight: 600;
    color: #D23C77;
    margin-bottom: 4px;
    letter-spacing: 0.005em;
}

.pcz-list__summary {
    font-size: 14px;
    color: #4a4a4a;
    line-height: 1.5;
    overflow: visible;
}

/* ── Tile grid ───────────────────────────────────────────────────────── */
.pcz-tile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
}

.pcz-tile {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: 100%;
    font: inherit;
    line-height: inherit;
    min-height: 180px;
    height: auto;
    border: 0;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background-color: #f3eaef; /* default fill behind any transparent image */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 120ms ease-in-out, box-shadow 120ms ease-in-out;
}

/* Brand-color placeholder when an admin hasn't authored a TileImageUrl yet.
   Avoids a broken-image flicker and gives the title a readable backdrop. */
.pcz-tile--placeholder {
    background-image: linear-gradient(135deg, #f7d8e6 0%, #d23c77 100%);
}

.pcz-tile:hover,
.pcz-tile:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(210, 60, 119, 0.18);
    outline: none;
}

.pcz-tile__title {
    position: static;
    display: block;
    width: 100%;
    padding: 14px 14px 12px;
    font-size: 14.5px;
    font-weight: 600;
    color: #ffffff;
    text-align: left;
    line-height: 1.35;
    /* Gradient scrim ensures the title stays readable regardless of the
       underlying tile image. The transparent->dark stops match the contrast
       guidelines at 4.5:1 against worst-case lighter imagery. */
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.70) 100%);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

@media (max-width: 767.98px) {
    .pcz-tile-grid { grid-template-columns: 1fr; }
    .pcz-tile__title { font-size: 13px; padding: 12px 12px 10px; }
}

/* ──────────────────────────────────────────────────────────────────────────
   JBFPageContentModal -- standardized read-only viewer reused by Carousel
   / List / Tile click paths. The title bar mirrors .dashboard-card-title-bar
   (centered pink heading + hairline divider) so the modal reads as part of
   the same card family. Prev/next nav arrows live in the top-right of the
   bar via .dashboard-card-title-bar--with-action.
   ────────────────────────────────────────────────────────────────────── */
.jbf-pcm {
    /* The modal owns its own focus outline only on keyboard nav so click
       paths don't show a ring when the user dismisses with the mouse. */
    outline: none;
}

.jbf-pcm__title {
    margin: 0 !important; /* override the negative-margin on .dashboard-card-title-bar */
    padding: 14px 22px;
    font-size: 18px;
    font-weight: 600;
    color: #D23C77 !important;
    border-bottom: 1px solid #e6e8e9;
    letter-spacing: 0.005em;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.jbf-pcm__title-text {
    flex: 1;
    text-align: center;
}

.jbf-pcm__title-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.jbf-pcm__nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.jbf-pcm__nav-counter {
    font-size: 12.5px;
    color: #6c757d;
    font-weight: 500;
    min-width: 36px;
    text-align: center;
}

.jbf-pcm__nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e6e8e9;
    background: #ffffff;
    color: #D23C77;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 120ms ease-in-out, color 120ms ease-in-out;
}

.jbf-pcm__nav-btn:hover:not([disabled]),
.jbf-pcm__nav-btn:focus-visible:not([disabled]) {
    background-color: #D23C77;
    color: #ffffff;
    outline: none;
}

.jbf-pcm__nav-btn[disabled] {
    color: #c0c0c0;
    cursor: not-allowed;
    background-color: #fafafa;
}

.jbf-pcm__close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e6e8e9;
    background: #ffffff;
    color: #D23C77;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 120ms ease-in-out, color 120ms ease-in-out;
}

.jbf-pcm__close-btn:hover,
.jbf-pcm__close-btn:focus-visible {
    background-color: #D23C77;
    color: #ffffff;
    outline: none;
}

.jbf-pcm__body {
    padding: 18px 22px 12px;
}

.jbf-pcm__image-wrap {
    margin: -18px -22px 16px;
    background-color: #f3eaef;
}

.jbf-pcm__image {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: cover;
}

.jbf-pcm__summary {
    font-size: 15px;
    line-height: 1.55;
    color: #021922;
}

.jbf-pcm__summary + .jbf-pcm__body-html {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e6e8e9;
}

.jbf-pcm__body-html {
    font-size: 14.5px;
    line-height: 1.55;
    color: #021922;
}

.jbf-pcm__empty {
    color: #6c757d;
    text-align: center;
    margin: 12px 0 0;
}

@media (max-width: 767.98px) {
    .jbf-pcm__title { padding: 12px 16px; font-size: 14.5px; }
    .jbf-pcm__body  { padding: 16px 16px 8px; }
    .jbf-pcm__image-wrap { margin: -16px -16px 14px; }
}


/* ── Multi-zone picker (Page Content authoring) ─────────────────────────
   Replaces the single-zone dropdown with a checkbox list. Selected zones
   are pinned to the top by the codebehind so admins always see what's
   already chosen. The list is fixed-height + scrollable so a long catalog
   doesn't push the rest of the form off screen.                             */
.ann-edit-form .ann-zone-picker {
    width: 100%;
}

.ann-edit-form .ann-zone-picker__filter input {
    width: 100%;
}

.ann-edit-form .ann-zone-picker__list {
    border: 1px solid var(--rz-input-border-color, #e0e0e0);
    border-radius: 6px;
    max-height: 240px;
    overflow-y: auto;
    background: var(--rz-input-background-color, #fff);
    padding: 4px 0;
}

.ann-edit-form .ann-zone-picker__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin: 0;
    cursor: pointer;
    border-radius: 0;
    border-left: 3px solid transparent;
}

.ann-edit-form .ann-zone-picker__item:hover {
    background-color: rgba(210, 60, 119, 0.06);
}

.ann-edit-form .ann-zone-picker__item--selected {
    background-color: rgba(210, 60, 119, 0.08);
    border-left-color: #d23c77;
}

.ann-edit-form .ann-zone-picker__page {
    font-size: 0.85rem;
    min-width: 110px;
    flex-shrink: 0;
}

.ann-edit-form .ann-zone-picker__sep {
    font-size: 0.85rem;
}

.ann-edit-form .ann-zone-picker__zone {
    font-weight: 500;
}
