/* Shared styles for the announcement card (delivery/announcement_card.html).
   Loaded into the Wagtail admin via the delivery insert_global_admin_css hook. */

.announcement-card {
    --accent: #1D9E75;
    /* Lift the card off the page: mixing the page surface toward the
       text color lightens it on dark themes and darkens it on light,
       giving consistent contrast either way. */
    background: rgba(127, 127, 127, 0.07);
    background: color-mix(
        in srgb,
        var(--w-color-surface-page) 92%,
        var(--w-color-text-context) 8%
    );
    border: 1px solid var(--w-color-border-furniture-more-contrast);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.announcement-card[data-type="FEATURE"]     { --accent: #1D9E75; }
.announcement-card[data-type="IMPROVEMENT"] { --accent: #3B82F6; }
.announcement-card[data-type="FIX"]         { --accent: #F59E0B; }

.announcement-card__row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    list-style: none;
}
.announcement-card__row::-webkit-details-marker { display: none; }
.announcement-card--static .announcement-card__row { cursor: default; }
.announcement-card--static { margin-bottom: 16px; }
.announcement-card__title {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.announcement-card__chip {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 4px;
    color: var(--accent);
    background: rgba(127, 127, 127, 0.1);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    white-space: nowrap;
    flex-shrink: 0;
}
.announcement-card__date {
    font-size: 11px;
    opacity: 0.45;
    white-space: nowrap;
    flex-shrink: 0;
}
.announcement-card__chevron {
    flex-shrink: 0;
    opacity: 0.45;
    transition: transform 0.2s ease;
}
.announcement-card[open] .announcement-card__chevron { transform: rotate(180deg); }
.announcement-card__body {
    font-size: 13px;
    line-height: 1.55;
    opacity: 0.75;
    margin-top: 10px;
}
.announcement-card__body p { margin: 0 0 8px; }
.announcement-card__body p:last-child { margin-bottom: 0; }
.announcement-card__body ul,
.announcement-card__body ol { margin: 0 0 8px 20px; }

/* Narrow screens: hide the date so the chip, title and chevron fit on
   one line. The title keeps its flex/ellipsis behaviour and truncates
   gracefully if long, instead of collapsing to zero width. */
@media (max-width: 600px) {
    .announcement-card__date { display: none; }
}
