﻿/* =============================================================
   bulletins.css  —  All bulletin component styles
   BulletinCard, BulletinColumn, BulletinEmbedded, BulletinAccordion
   ============================================================= */

/* -------------------------------------------------------------
   Shared — used across multiple bulletin components
   ------------------------------------------------------------- */

.bulletin-badge-new {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--acc-danger);
    background: var(--acc-danger-soft);
    padding: 2px 7px;
    border-radius: 10px;
}

.bulletin-seen {
    opacity: 0.45;
}

.bulletin-seen-label {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

.bulletin-ack-btn {
    height: 28px;
    padding: 0 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
}

    .bulletin-ack-btn:hover {
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
    }

/* Accent left border variants — shared by card and embedded */
.bulletin-accent-info {
    border-left: 4px solid var(--acc-info);
}

.bulletin-accent-warning {
    border-left: 4px solid var(--acc-warning);
}

.bulletin-accent-danger {
    border-left: 4px solid var(--acc-danger);
}

/* ── Background color variants ──
   Driven by BulletinBackgroundColor enum — independent of AccentColor.
   Transparent (no class applied) keeps var(--card) from the base rule.
   Compound selectors override base background without !important. */

.bulletin-card.bulletin-bg-light-red,
.bulletin-embedded.bulletin-bg-light-red,
.be-bcard.bulletin-bg-light-red,
.form-heading-block.bulletin-bg-light-red {
    background: rgba(231, 76, 60, 0.07);
}

.bulletin-card.bulletin-bg-light-yellow,
.bulletin-embedded.bulletin-bg-light-yellow,
.be-bcard.bulletin-bg-light-yellow,
.form-heading-block.bulletin-bg-light-yellow {
    background: rgba(243, 156, 18, 0.07);
}

.bulletin-card.bulletin-bg-light-blue,
.bulletin-embedded.bulletin-bg-light-blue,
.be-bcard.bulletin-bg-light-blue,
.form-heading-block.bulletin-bg-light-blue {
    background: rgba(52, 152, 219, 0.07);
}

.bulletin-card.bulletin-bg-light-green,
.bulletin-embedded.bulletin-bg-light-green,
.be-bcard.bulletin-bg-light-green,
.form-heading-block.bulletin-bg-light-green {
    background: rgba(46, 204, 113, 0.07);
}

.bulletin-card.bulletin-bg-light-gray,
.bulletin-embedded.bulletin-bg-light-gray,
.be-bcard.bulletin-bg-light-gray,
.form-heading-block.bulletin-bg-light-gray {
    background: rgba(0, 0, 0, 0.04);
}

.bulletin-card.bulletin-bg-white,
.bulletin-embedded.bulletin-bg-white,
.be-bcard.bulletin-bg-white,
.form-heading-block.bulletin-bg-white {
    background: #ffffff;
}

/* -------------------------------------------------------------
   BulletinCard — float column cards (left/right desktop columns)
   ------------------------------------------------------------- */

.bulletin-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid transparent;
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.bulletin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: var(--card-alt);
    border-bottom: 1px solid var(--border);
}

.bulletin-card-title {
    font-weight: 700;
    font-size: 12px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bulletin-card-body {
    padding: 10px;
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.5;
}

    .bulletin-card-body p {
        margin: 0 0 6px 0;
    }

        .bulletin-card-body p:last-child {
            margin-bottom: 0;
        }

    .bulletin-card-body strong {
        font-weight: 700;
    }

    .bulletin-card-body em {
        font-style: italic;
    }

    .bulletin-card-body u {
        text-decoration: underline;
    }

    .bulletin-card-body ul,
    .bulletin-card-body ol {
        padding-left: 1.4em;
        margin: 4px 0;
    }

    .bulletin-card-body li {
        margin: 2px 0;
    }

.bulletin-card-image img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.bulletin-card-caption {
    padding: 6px 10px;
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    border-top: 1px solid var(--border);
}

.bulletin-card-footer {
    padding: 6px 10px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

/* -------------------------------------------------------------
   BulletinColumn — wrapper for the float columns
   ------------------------------------------------------------- */

.bulletin-column {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}

/* -------------------------------------------------------------
   BulletinEmbedded — inline between form sections
   ------------------------------------------------------------- */

.bulletin-embedded {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid transparent;
    border-radius: var(--radius);
    margin: 0 1rem 12px 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.bulletin-embedded-body {
    padding: 12px 14px;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
}

    .bulletin-embedded-body p {
        margin: 0 0 6px 0;
    }

        .bulletin-embedded-body p:last-child {
            margin-bottom: 0;
        }

    .bulletin-embedded-body strong {
        font-weight: 700;
    }

    .bulletin-embedded-body em {
        font-style: italic;
    }

    .bulletin-embedded-body u {
        text-decoration: underline;
    }

    .bulletin-embedded-body ul,
    .bulletin-embedded-body ol {
        padding-left: 1.4em;
        margin: 4px 0;
    }

    .bulletin-embedded-body li {
        margin: 2px 0;
    }

.bulletin-embedded-footer {
    padding: 8px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* -------------------------------------------------------------
   BulletinAccordion — mobile only toggle
   ------------------------------------------------------------- */

.bulletin-accordion {
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
    box-shadow: var(--shadow-sm);
}

.bulletin-accordion-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--card-alt);
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

    .bulletin-accordion-toggle:hover {
        background: var(--accent-soft);
    }

.bulletin-accordion-chevron {
    font-size: 18px;
    line-height: 1;
    color: var(--text-muted);
    transition: transform .2s;
    display: inline-block;
}

    .bulletin-accordion-chevron.open {
        transform: rotate(180deg);
    }

.bulletin-accordion-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--border);
}

/* Toolbar select — font size dropdown */
.be-rte-select {
    height: 26px;
    padding: 0 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--text-primary);
    font-size: 11px;
    cursor: pointer;
}

    .be-rte-select:hover {
        border-color: var(--border-strong);
    }

/* Color swatch buttons */
.be-rte-colors {
    display: flex;
    align-items: center;
    gap: 3px;
}

.be-rte-color-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color .1s, transform .1s;
    padding: 0;
}

    .be-rte-color-btn:hover {
        border-color: var(--border-strong);
        transform: scale(1.15);
    }

.be-rte-color-reset {
    background: var(--card-alt) !important;
    border: 1px solid var(--border) !important;
    font-size: 9px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    width: 20px;
    height: 18px;
}


/* ── Rich text editor ── */
.be-rte {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--input-bg);
    transition: border-color .12s, box-shadow .12s;
}

.be-rte-invalid {
    border-color: var(--status-no-bd);
    box-shadow: 0 0 0 3px rgba(139,32,32,.08);
}

.be-rte-focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(92,82,69,.12);
}

.be-rte-toolbar {
    display: flex;
    gap: 2px;
    padding: 5px 6px;
    border-bottom: 1px solid var(--border);
    background: var(--card-alt);
}

.be-rte-btn {
    width: 28px;
    height: 26px;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .12s, border-color .12s;
}

    .be-rte-btn:hover {
        background: var(--card);
        border-color: var(--border);
    }

.be-rte-btn-bold {
    font-weight: 800;
}

.be-rte-btn-italic {
    font-style: italic;
    font-family: Georgia, serif;
}

.be-rte-content {
    min-height: 88px;
    padding: 10px 12px;
    font: 500 13px var(--font-ui);
    color: var(--text-primary);
    line-height: 1.5;
    outline: none;
}

    .be-rte-content:empty::before {
        content: attr(data-placeholder);
        color: var(--text-dim);
    }

.be-rte-foot {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-top: 1px solid var(--border);
    background: var(--card-alt);
}

.be-rte-msg {
    font-size: 10.5px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.be-rte-msg-req {
    color: var(--status-no-fg);
}

.be-rte-count {
    margin-left: auto;
    font-size: 10.5px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}