/**
 * Bulletins — the sheet on the single view and the compact cards in listings.
 * Logical properties throughout for LTR/RTL safety.
 */

.fibacp-bulletin-sheet {
    --fibacp-b-navy: #041f38;
    --fibacp-b-blue: #057eb8;
    --fibacp-b-blue-600: #116b96;
    --fibacp-b-line: #e2e7eb;
    --fibacp-b-muted: #86898c;

    margin: 0 0 34px;
    padding: 0;
}

/*
 * Cap the sheet at its own pixel width. These were exported at anything from
 * 529 to 1079 px wide, and stretching the small ones to fill the content column
 * is what makes them look broken — crisp and narrower beats wide and blurred.
 */
.fibacp-bulletin-sheet__link {
    display: block;
    max-inline-size: min(100%, var(--fibacp-sheet-width, 100%));
    margin-inline: auto;
    border: 1px solid var(--fibacp-b-line);
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(4, 31, 56, 0.1);
    transition: box-shadow 0.2s ease;
}

.fibacp-bulletin-sheet__link:hover,
.fibacp-bulletin-sheet__link:focus-visible {
    box-shadow: 0 18px 44px rgba(4, 31, 56, 0.18);
}

.fibacp-bulletin-sheet__img {
    display: block;
    inline-size: 100%;
    block-size: auto;
}

/*
 * Only reached when the host produced no page-one rendition for a PDF, so the
 * document goes straight to the browser's viewer. Given a fixed height because
 * an <object> has no intrinsic one and would otherwise collapse to nothing.
 */
.fibacp-bulletin-sheet__object {
    display: block;
    inline-size: 100%;
    block-size: min(80vh, 900px);
    min-block-size: 420px;
    border: 1px solid var(--fibacp-b-line);
    border-radius: 4px;
    background: #fff;
}

.fibacp-bulletin-sheet__fallback {
    margin: 0;
    padding: 24px;
    color: var(--fibacp-b-muted);
    text-align: center;
}

.fibacp-bulletin-sheet__actions {
    margin-block-start: 16px;
    text-align: center;
}

/*
 * Not decoration: a bulletin's body copy is unreadable at container width on a
 * phone, so the way out to the original file has to be visible, not just the
 * image being quietly clickable.
 */
.fibacp-bulletin-sheet__zoom {
    display: inline-block;
    padding-block: 10px;
    padding-inline: 22px;
    border: 1px solid var(--fibacp-b-blue);
    border-radius: 3px;
    color: var(--fibacp-b-blue);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.fibacp-bulletin-sheet__zoom:hover,
.fibacp-bulletin-sheet__zoom:focus-visible {
    border-color: var(--fibacp-b-blue-600);
    background: var(--fibacp-b-blue-600);
    color: #fff;
    text-decoration: none;
}

/*
 * Listing cards. A bulletin without a cover (featured image) falls back to
 * Elementra's category + title + date card — correct, but visually weightless
 * next to the image cards in the same grid. A frame gives it a body. One with
 * a cover is an ordinary image card and needs none.
 */
.post_item.fibacp-bulletin:not(.has-post-thumbnail) {
    padding: 26px 26px 22px;
    border: 1px solid #e2e7eb;
    border-radius: 4px;
    background: #fff;
}

.post_item.fibacp-bulletin:not(.has-post-thumbnail) .post_title {
    margin-block-start: 6px;
}

/*
 * No card carries a category label in the listing. The filter bar above the
 * grid already names the category, and a bulletin's cover names the issue.
 */
.post_layout_classic .post_category {
    display: none;
}
