/* Course Manager — class announcements (course page, card chips, board) */

/* ---- colours per type ---- */
.cm-ann-t-cancel  { --ann: #C43A3A; --ann-bg: #FDEEEE; --ann-ink: #8F1F1F; }
.cm-ann-t-delay   { --ann: #B45F06; --ann-bg: #FFF4E5; --ann-ink: #7A3F02; }
.cm-ann-t-online  { --ann: #1D6FD6; --ann-bg: #EAF3FF; --ann-ink: #124B94; }
.cm-ann-t-room    { --ann: #6B4FD3; --ann-bg: #F1EEFD; --ann-ink: #46318F; }
.cm-ann-t-makeup  { --ann: #178043; --ann-bg: #E9F8EF; --ann-ink: #0F5A2E; }
.cm-ann-t-general { --ann: #475569; --ann-bg: #F1F5F9; --ann-ink: #2B3544; }

/* ---- panel (course page) / board (shortcode) ---- */
.cm-ann-panel,
.cm-ann-board {
    margin: 0 0 32px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #16202B;
    box-sizing: border-box;
}
.cm-ann-panel *, .cm-ann-board * { box-sizing: border-box; }

.cm-ann-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #5B6B76;
}
.cm-ann-panel-title svg { width: 17px; height: 17px; flex: none; }

.cm-ann {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--ann-bg);
    border: 1px solid rgba(0, 0, 0, .08);
    border: 1px solid color-mix(in srgb, var(--ann) 22%, transparent);
    border-left: 5px solid var(--ann);
    border-radius: 14px;
    padding: 16px 18px;
    margin: 0 0 12px;
}
.cm-ann:last-child { margin-bottom: 0; }

.cm-ann-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--ann);
    color: #fff;
}
.cm-ann-icon svg { width: 20px; height: 20px; }

.cm-ann-main { flex: 1; min-width: 0; }

.cm-ann-course {
    margin: 0 0 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: #5B6B76;
}
.cm-ann-course a { color: inherit !important; text-decoration: underline; text-underline-offset: 2px; }
.cm-ann-course a:hover { color: var(--ann-ink) !important; }

.cm-ann-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
}
.cm-ann-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ann-ink);
}
.cm-ann-when {
    font-size: 14px;
    font-weight: 600;
    color: #16202B;
}

.cm-ann-bits {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin-top: 6px;
    font-size: 14px;
    color: #16202B;
}
.cm-ann-bit em {
    font-style: normal;
    font-weight: 600;
    color: var(--ann-ink);
    margin-right: 4px;
}

.cm-ann-note {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.65;
    color: #34434E;
}

.cm-ann-btn {
    flex: none;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ann);
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: 0 6px 16px -8px var(--ann);
    transition: transform .2s ease, filter .2s ease;
}
.cm-ann-btn svg { width: 16px; height: 16px; }
.cm-ann-btn:hover, .cm-ann-btn:focus { transform: translateY(-2px); filter: brightness(.93); color: #fff !important; }
.cm-ann-btn:focus-visible { outline: 2px solid var(--ann); outline-offset: 3px; }

.cm-ann-empty { margin: 0; font-size: 14px; color: #5B6B76; }

@media (max-width: 640px) {
    .cm-ann { flex-wrap: wrap; padding: 14px 14px; gap: 12px; }
    .cm-ann-icon { width: 34px; height: 34px; }
    .cm-ann-btn { width: 100%; justify-content: center; }
}

/* ---- chip on course cards (sits at the bottom of the card image) ---- */
.cm-ann-chip {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    max-width: calc(100% - 20px);
    background: var(--ann);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .01em;
    padding: 6px 11px;
    border-radius: 999px;
    box-shadow: 0 6px 14px -6px rgba(15, 30, 25, .55);
    pointer-events: none;
}
.cm-ann-chip svg { width: 14px; height: 14px; flex: none; }
.cm-ann-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-ann-chip-more {
    flex: none;
    background: rgba(255, 255, 255, .26);
    border-radius: 999px;
    padding: 1px 7px;
    font-size: 10.5px;
}
