/*
 * calendar_sidebar.css
 *
 * Option 2 "Elevated Cards" calendar redesign.
 * All selectors are scoped under the .CalendarOption2 root class
 * applied to CalendarViewer's html container.
 *
 * Sidebar widgets (CalendarSidebarPanel, CalendarSidebarMiniCal,
 * CalendarSidebarTimeline) build their own DOM and use the
 * .CalendarOption2-* prefix.
 *
 * Body widgets (CalendarViewMonthDatePanel, CalendarViewer, etc)
 * are styled by targeting their auto-applied widget-class names
 * (Panel.create() at panel.js:404 sets className = getType(this)).
 */

/* ============================================================
 * Design tokens - Option 2 palette.
 * Everything in this file references these vars so a single
 * change here re-skins the whole calendar region.
 * ============================================================ */
.CalendarOption2 {
    /* Neutrals */
    --c-border:        #DEE0E3;
    --c-border-light:  #f0f2f5;
    --c-bg-tint:       #FAFBFD;
    --c-bg-hover:      #F8FDFF;
    --c-bg-chip-hint:  #EBF2F8;
    --c-bg-today:      #EBF5FF;

    /* Text */
    --c-navy:          #0B3764;
    --c-slate:         #8C9BB5;
    --c-body:          #484848;
    --c-other-month:   #C0C8D4;
    --c-meta:          #A0AEC0;

    /* Brand */
    --c-brand:         #249EF5;
    --c-brand-hover:   #1A8AE0;
    --c-brand-border:  #ABCEEB;
    --c-brand-halo:    #B3D9FC;

    /* Status colors for dots / chips */
    --c-green:         #34C759;
    --c-green-halo:    #B7EDCA;
    --c-orange:        #FF9500;
    --c-orange-halo:   #FFD9A3;
    --c-red:           #FF3B30;
    --c-red-halo:      #FFB8B3;
    --c-purple:        #AF52DE;
    --c-purple-halo:   #DDB8F0;
    --c-yellow:        #F5C518;
    --c-yellow-halo:   #FCEAAB;
    --c-teal:          #00BCD4;
    --c-teal-halo:     #A6E8F0;
    --c-pink:          #E91E8C;
    --c-pink-halo:     #F8B4D9;

    /* Chip color variants (background + text + accent stripe) */
    --c-ev-blue-bg:    #E3F0FF;
    --c-ev-blue-fg:    #1A6DD4;
    --c-ev-green-bg:   #E6F7EE;
    --c-ev-green-fg:   #1B7A41;
    --c-ev-orange-bg:  #FFF3E0;
    --c-ev-orange-fg:  #B56200;
    --c-ev-red-bg:     #FFEBEE;
    --c-ev-red-fg:     #C62828;
    --c-ev-purple-bg:  #F3E5F5;
    --c-ev-purple-fg:  #7B1FA2;
    --c-ev-yellow-bg:  #FFFDE7;
    --c-ev-yellow-fg:  #9E7B00;
    --c-ev-teal-bg:    #E0F7FA;
    --c-ev-teal-fg:    #00796B;
    --c-ev-pink-bg:    #FCE4EC;
    --c-ev-pink-fg:    #AD1457;

    /* Typography + surfaces */
    --f-family:        Roboto, Arial, sans-serif;
    --s-card:          0 2px 6px rgba(0,0,0,.04);
    --r-card:          8px;
    --r-btn:           6px;
}

/* ============================================================
 * 1.1 Option 1 polish - Connected Header
 * Thin 1px border so the calendar region sits cleanly flush
 * under the page title bar instead of floating on whitespace.
 * ============================================================ */
.CalendarOption2 {
    border-top: 1px solid var(--c-border) !important;
    box-sizing: border-box;
}

/* ============================================================
 * 1.1b Prevent horizontal / vertical content-driven overflow.
 *
 * The framework's TableLayout widget emits <table class="tableLayout">
 * with the default `table-layout: auto`, which lets each TD grow
 * to the intrinsic width of the widest child. Inside the calendar
 * the month grid's event chips are wide enough to inflate their
 * cells well past the panel's declared inline width (300px sidebar
 * + 1556px right column = 1856px, but content was forcing 1952px,
 * overflowing by 96px and triggering a horizontal scrollbar).
 *
 * Forcing `table-layout: fixed` on every TableLayout table under
 * .CalendarOption2 makes the TDs honor their set widths strictly,
 * so the cells inside the month grid get equal 1/7 shares of the
 * available width instead of growing to fit their content. Content
 * that would overflow is clipped by the cell (which is what we
 * want - the chips are already `overflow: hidden` + ellipsis).
 * ============================================================ */
.CalendarOption2 table.tableLayout {
    table-layout: fixed !important;
    /* table-layout:fixed alone is not enough - without an explicit
     * width the browser still sizes the table to its intrinsic
     * content. Pinning to 100% makes the table honor its DIV.
     * TableLayout parent's width exactly, so cells distribute the
     * available space without inflating past the parent. */
    width: 100% !important;
}

/* ============================================================
 * 1.2 Sidebar container
 * ============================================================ */
/* Make the CalendarSidebarPanel widget root fill its TableLayout cell */
.CalendarOption2 .CalendarSidebarPanel,
.CalendarSidebarPanel {
    width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}
.CalendarOption2 td > .CalendarSidebarPanel {
    display: block;
}

.CalendarOption2-sb {
    background: var(--c-bg-tint);
    border-right: 1px solid var(--c-border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    font-family: var(--f-family);
}

/* ============================================================
 * 1.3 Today hero card
 * ============================================================ */
.CalendarOption2-hero {
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--r-card);
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--s-card);
}
.CalendarOption2-hero::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--c-brand);
    border-radius: 4px 0 0 4px;
}
.CalendarOption2-hero-lbl {
    font-size: 11px; font-weight: 600; color: var(--c-slate);
    text-transform: uppercase; letter-spacing: .6px;
    margin-bottom: 4px;
}
.CalendarOption2-hero-date {
    font-size: 32px; font-weight: 300; color: var(--c-navy);
    line-height: 1.1;
}
.CalendarOption2-hero-day {
    font-size: 13px; color: var(--c-brand); font-weight: 500;
    margin-top: 2px;
}

/* ============================================================
 * 1.4 Card container
 * ============================================================ */
.CalendarOption2-card {
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--r-card);
    padding: 16px;
    box-shadow: var(--s-card);
}
.CalendarOption2-card--stretch {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.CalendarOption2-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.CalendarOption2-card-title > span:first-child {
    font-size: 12px; font-weight: 600; color: var(--c-navy);
}
.CalendarOption2-card-title .CalendarOption2-cnt {
    background: var(--c-bg-chip-hint);
    color: var(--c-brand);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ============================================================
 * 1.5 Mini-calendar nav row
 * ============================================================ */
.CalendarOption2-mcnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.CalendarOption2-mcnav-t {
    font-size: 13px; font-weight: 500; color: var(--c-navy);
}
.CalendarOption2-mcnav-btns {
    display: flex;
    gap: 4px;
}
.CalendarOption2-mcnav-b {
    width: 24px; height: 24px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-btn);
    background: #fff;
    cursor: pointer;
    color: var(--c-slate);
    font-size: 11px;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
    font-family: inherit;
}
.CalendarOption2-mcnav-b:hover {
    background: var(--c-bg-chip-hint);
    color: var(--c-brand);
    border-color: var(--c-brand-border);
}

/* ============================================================
 * 1.6 Mini-calendar grid
 * ============================================================ */
.CalendarOption2-mcal {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}
.CalendarOption2-mcal-h {
    text-align: center;
    font-size: 10px; font-weight: 600; color: var(--c-slate);
    padding: 4px 0;
}
.CalendarOption2-mcal-d {
    text-align: center;
    font-size: 12px; color: var(--c-body);
    border-radius: 50%;
    cursor: pointer;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    margin: 1px auto;
    transition: background .12s;
    position: relative;
}
.CalendarOption2-mcal-d:hover { background: var(--c-bg-chip-hint); }
.CalendarOption2-mcal-d.is-other { color: var(--c-other-month); }
.CalendarOption2-mcal-d.is-selected {
    background: var(--c-bg-chip-hint);
    color: var(--c-brand);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px var(--c-brand-border);
}
.CalendarOption2-mcal-d.is-selected:hover { background: #DCE9F3; }
.CalendarOption2-mcal-d.is-today {
    background: var(--c-brand);
    color: #fff;
    font-weight: 600;
    box-shadow: none;
}
.CalendarOption2-mcal-d.is-today:hover { background: var(--c-brand-hover); }
.CalendarOption2-mcal-d.has-dot::after {
    content: '';
    position: absolute;
    bottom: 2px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--c-brand);
}
.CalendarOption2-mcal-d.is-today.has-dot::after { background: #fff; }

/* ============================================================
 * 1.7 Vertical connector timeline
 *
 * The actual .Timeline widget (rings, dots, "Now" marker) lives
 * in stylesheets/core/ui/timeline.css as a generic reusable
 * component. The rules below only handle the calendar-sidebar-
 * specific flex chain so the Panel widget wrapper participates
 * in the card's vertical layout, plus a small Option 2 palette
 * override so the inner Timeline picks up the sidebar's brand
 * colors and not the generic defaults.
 * ============================================================ */
.CalendarOption2 .CalendarOption2-card--stretch .CalendarSidebarTimeline {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.CalendarOption2 .CalendarSidebarTimeline .Timeline {
    --tl-border:        var(--c-border);
    --tl-bg-chip-hint:  var(--c-bg-chip-hint);
    --tl-connector:     var(--c-bg-chip-hint);
    --tl-accent:        var(--c-brand);
    --tl-accent-halo:   var(--c-brand-halo);
    --tl-now:           var(--c-red);

    --tl-navy:          var(--c-navy);
    --tl-slate:         var(--c-slate);
    --tl-meta:          var(--c-meta);
    --tl-family:        var(--f-family);

    --tl-dot-blue:       var(--c-brand);
    --tl-dot-blue-halo:  var(--c-brand-halo);
    --tl-dot-green:      var(--c-green);
    --tl-dot-green-halo: var(--c-green-halo);
    --tl-dot-orange:     var(--c-orange);
    --tl-dot-orange-halo:var(--c-orange-halo);
    --tl-dot-red:        var(--c-red);
    --tl-dot-red-halo:   var(--c-red-halo);
    --tl-dot-purple:     var(--c-purple);
    --tl-dot-purple-halo:var(--c-purple-halo);
}

/* ============================================================
 * 1.8 Top toolbar (CalendarViewToolbar - raw DOM Panel subclass)
 *
 * The toolbar emits its own DOM inside the Panel's m_htmlDiv. The
 * widget root gets the className "CalendarViewToolbar" automatically,
 * we style via the inner .CalendarOption2-tb* namespace.
 * ============================================================ */
.CalendarOption2 .CalendarViewToolbar {
    width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;
    background: #fff !important;
    container-type: inline-size;
    container-name: calTb;
}
.CalendarOption2-tb {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 12px;
    width: 100%;
    height: 100%;
    min-height: 53px;
    padding: 10px 24px;
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    box-sizing: border-box;
    font-family: var(--f-family);
}
.CalendarOption2-tb-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}
.CalendarOption2-tb-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-btn);
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--c-navy);
    padding: 0;
    font-family: inherit;
    line-height: 1;
    transition: all .15s;
}
.CalendarOption2-tb-btn:hover {
    background: var(--c-bg-chip-hint);
    border-color: var(--c-brand-border);
}
.CalendarOption2-tb-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--c-navy);
}
.CalendarOption2-tb-r {
    display: flex;
    gap: 10px;
    align-items: center;
}
.CalendarOption2-today-btn {
    padding: 6px 14px;
    border: 1px solid var(--c-brand-border);
    background: #fff;
    color: var(--c-brand);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--r-btn);
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}
.CalendarOption2-today-btn:hover {
    background: var(--c-brand);
    color: #fff;
    border-color: var(--c-brand);
}
.CalendarOption2-mode-wrap {
    display: flex;
    background: var(--c-bg-chip-hint);
    border-radius: var(--r-btn);
    padding: 2px;
}
.CalendarOption2-mode-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 500;
    color: var(--c-body);
    cursor: pointer;
    border-radius: 4px;
    transition: all .15s;
    font-family: inherit;
}
.CalendarOption2-mode-btn.active {
    background: #fff;
    color: var(--c-brand);
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* ============================================================
 * 1.8b Display-mode pill bar (Calendar / Agenda / Swimlanes /
 * Timeline / Triage). Lives inside .CalendarOption2-tb-nav next to
 * the title. Matches the prototype's .disp-pills block 1:1 with the
 * CalendarOption2- namespace prefix.
 * ============================================================ */
.CalendarOption2-disp-pills {
    display: inline-flex;
    gap: 4px;
    background: var(--c-bg-tint);
    border: 1px solid var(--c-border-light);
    border-radius: 20px;
    padding: 3px;
    margin-left: 12px;
}
.CalendarOption2-disp-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    color: var(--c-body);
    font-family: var(--f-family);
    white-space: nowrap;
}
.CalendarOption2-disp-pill svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}
.CalendarOption2-disp-pill:hover {
    color: var(--c-navy);
}
.CalendarOption2-disp-pill.active {
    background: #fff;
    color: var(--c-brand);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    font-weight: 500;
}

/* ============================================================
 * 1.8c Responsive toolbar tiers (container query on
 * .CalendarViewToolbar via container-name: calTb)
 *
 * Tier 1 (<= 1250px): display pills collapse to icon-only
 * Tier 2 (<= 960px):  mode pill bar swaps to <select> dropdown
 * ============================================================ */

/* Tier 1: pills icon-only below 1220px
   Worst case: Daily "Wednesday, September 30, 2026" needs 1215px full.
   Icon-only pills save 286px -> remaining 929px. */
@container calTb (max-width: 1220px) {
    .CalendarOption2-disp-pill span { display: none; }
    .CalendarOption2-disp-pill { padding: 7px 9px; }
}

/* Tier 2: mode bar -> dropdown below 935px
   After Tier 1, worst case needs 929px. Dropdown saves 163px -> remaining 766px. */
.CalendarOption2-mode-dropdown {
    display: none;
    align-items: center;
}
.CalendarOption2-mode-dropdown select {
    padding: 5px 24px 5px 8px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-btn);
    font-size: 12px;
    font-weight: 500;
    color: var(--c-body);
    background: var(--c-bg-chip-hint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23484848'/%3E%3C/svg%3E") no-repeat right 8px center;
    font-family: var(--f-family);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
/* !important required: the default .CalendarOption2-mode-dropdown { display: none }
   above has equal specificity to the container query rule; !important ensures the
   container query wins regardless of source order. */
@container calTb (max-width: 935px) {
    .CalendarOption2-mode-wrap { display: none !important; }
    .CalendarOption2-mode-dropdown { display: flex !important; }
}

/* Legend toggle button */
.CalendarOption2-legend-btn {
    display: flex;
    align-items: center;
    background: none;
    border: 1px solid var(--c-border);
    border-radius: 6px;
    padding: 5px 7px;
    cursor: pointer;
    font-size: 12px;
    font-family: var(--f-family);
    color: #555;
}
.CalendarOption2-legend-btn:hover {
    background: #f0f4f8;
}
.CalendarOption2-legend-btn.active {
    background: var(--c-ev-blue-bg);
    color: var(--c-brand);
    border-color: var(--c-brand-border);
}
.CalendarOption2-legend-btn svg {
    flex-shrink: 0;
}

/* Collapsible legend strip below toolbar */
.CalendarOption2-legend-strip {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 7px 24px;
    background: #f8f9fb;
    border-bottom: 1px solid var(--c-border);
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    font-family: var(--f-family);
}
.CalendarOption2-legend-strip-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    flex-shrink: 0;
}
.CalendarOption2-legend-strip-items {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.CalendarOption2-legend-strip-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #444;
}
.CalendarOption2-legend-strip-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.08);
}

/* ============================================================
 * 1.8c Shared chip color modifiers for the non-Calendar display
 * modes. The swim/agenda/triage widgets all use the CalendarOption2-
 * ev-- prefix; these variables already exist, we just need the BEM
 * modifier classes.
 *
 * Note: .CalendarOption2-ev--{color} may already exist for the
 * month/week/day grid chips - these rules are additional contexts
 * (agenda row, swim bar, tri card) that pick up the same palette.
 * ============================================================ */

/* ============================================================
 * 1.8d Agenda display mode
 * ============================================================ */
.CalendarOption2 .CalendarOption2-agenda {
    width: 100% !important;
    height: 100% !important;
    overflow: auto !important;
    background: #fff !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    font-family: var(--f-family);
    color: var(--c-body);
}
.CalendarOption2-agenda-wrap {
    max-width: 820px;
    margin: 0 auto;
}
.CalendarOption2-agenda-day {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--c-border-light);
}
.CalendarOption2-agenda-day:last-child { border-bottom: none; }
.CalendarOption2-agenda-date {
    text-align: right;
    padding-top: 2px;
}
.CalendarOption2-agenda-dow {
    font-size: 11px;
    color: var(--c-slate);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.CalendarOption2-agenda-num {
    font-size: 22px;
    font-weight: 600;
    color: var(--c-navy);
    line-height: 1.1;
}
.CalendarOption2-agenda-mon {
    font-size: 11px;
    color: var(--c-meta);
}
.CalendarOption2-agenda-date.is-today .CalendarOption2-agenda-num,
.CalendarOption2-agenda-date.is-today .CalendarOption2-agenda-dow {
    color: var(--c-brand);
}
.CalendarOption2-agenda-events {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.CalendarOption2-agenda-event {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--c-bg-tint);
    border-left: 3px solid var(--c-brand);
    font-size: 13px;
    align-items: center;
    cursor: pointer;
}
.CalendarOption2-agenda-event.CalendarOption2-ev--blue   { border-left-color: var(--c-brand); }
.CalendarOption2-agenda-event.CalendarOption2-ev--green  { border-left-color: var(--c-green); }
.CalendarOption2-agenda-event.CalendarOption2-ev--orange { border-left-color: var(--c-orange); }
.CalendarOption2-agenda-event.CalendarOption2-ev--red    { border-left-color: var(--c-red); }
.CalendarOption2-agenda-event.CalendarOption2-ev--purple { border-left-color: var(--c-purple); }
.CalendarOption2-agenda-event:hover { background: var(--c-bg-hover); }
.CalendarOption2-agenda-time {
    color: var(--c-slate);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}
.CalendarOption2-agenda-mid { min-width: 0; }
.CalendarOption2-agenda-title {
    color: var(--c-navy);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.CalendarOption2-agenda-project {
    color: var(--c-meta);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.CalendarOption2-agenda-assignee {
    display: flex;
    align-items: center;
    gap: 6px;
}
.CalendarOption2-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--c-brand);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}
.CalendarOption2-agenda-empty-day {
    color: var(--c-meta);
    font-size: 12px;
    padding: 8px 12px;
    font-style: italic;
}
.CalendarOption2-agenda-empty {
    text-align: center;
    color: var(--c-meta);
    padding: 40px;
    font-size: 13px;
}

/* ============================================================
 * 1.8e Swimlanes display mode
 * ============================================================ */
.CalendarOption2 .CalendarOption2-swim {
    width: 100% !important;
    height: 100% !important;
    /* Vertical scroll lives on the outer Panel; horizontal scroll
     * lives on the inner .CalendarOption2-swim-wrap to avoid nested
     * horizontal scroll contexts. */
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: #fff !important;
    padding: 18px !important;
    box-sizing: border-box !important;
    font-family: var(--f-family);
    color: var(--c-body);
}
.CalendarOption2-swim-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
}
.CalendarOption2-swim-grid {
    display: grid;
    width: 100%;
    border: 1px solid var(--c-border-light);
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
}
.CalendarOption2-swim-header {
    padding: 10px 8px;
    background: var(--c-bg-tint);
    border-bottom: 1px solid var(--c-border-light);
    font-size: 11px;
    font-weight: 600;
    color: var(--c-slate);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}
.CalendarOption2-swim-header-day {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.CalendarOption2-swim-dow { font-size: 10px; }
.CalendarOption2-swim-num {
    font-size: 16px;
    color: var(--c-navy);
    font-weight: 600;
}
.CalendarOption2-swim-header-day.is-today .CalendarOption2-swim-num {
    color: var(--c-brand);
}
.CalendarOption2-swim-row-label {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-right: 1px solid var(--c-border-light);
    border-bottom: 1px solid var(--c-border-light);
    background: var(--c-bg-tint);
    min-height: 80px;
    /* Keep the group label visible while the user scrolls the
     * hour/day columns horizontally - sticky pins the label against
     * the left edge of the wrap's scroll container. */
    position: sticky;
    left: 0;
    z-index: 2;
}
/* Also pin the "GROUP" header cell (first cell of header row) so
 * it stays aligned over the sticky row labels during horizontal
 * scroll. */
.CalendarOption2-swim-grid > .CalendarOption2-swim-header:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
}
.CalendarOption2-swim-group-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c-brand);
    flex-shrink: 0;
}
.CalendarOption2-swim-group-name-box { min-width: 0; }
.CalendarOption2-swim-group-name {
    font-size: 12px;
    color: var(--c-navy);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.CalendarOption2-swim-group-count {
    font-size: 10px;
    color: var(--c-meta);
}
.CalendarOption2-swim-cell {
    border-right: 1px solid var(--c-border-light);
    border-bottom: 1px solid var(--c-border-light);
    min-height: 80px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
}
.CalendarOption2-swim-cell.is-today   { background: var(--c-bg-today); }
.CalendarOption2-swim-cell.is-weekend { background: var(--c-bg-tint); }
.CalendarOption2-swim-ev {
    font-size: 10px;
    padding: 3px 5px;
    border-radius: 3px;
    border-left: 2px solid;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.CalendarOption2-swim-ev.CalendarOption2-ev--blue   { background: var(--c-ev-blue-bg);   color: var(--c-ev-blue-fg);   border-left-color: var(--c-brand);  --c-span-stroke: var(--c-brand); }
.CalendarOption2-swim-ev.CalendarOption2-ev--green  { background: var(--c-ev-green-bg);  color: var(--c-ev-green-fg);  border-left-color: var(--c-green);  --c-span-stroke: var(--c-green); }
.CalendarOption2-swim-ev.CalendarOption2-ev--orange { background: var(--c-ev-orange-bg); color: var(--c-ev-orange-fg); border-left-color: var(--c-orange); --c-span-stroke: var(--c-orange); }
.CalendarOption2-swim-ev.CalendarOption2-ev--red    { background: var(--c-ev-red-bg);    color: var(--c-ev-red-fg);    border-left-color: var(--c-red);    --c-span-stroke: var(--c-red); }
.CalendarOption2-swim-ev.CalendarOption2-ev--purple { background: var(--c-ev-purple-bg); color: var(--c-ev-purple-fg); border-left-color: var(--c-purple); --c-span-stroke: var(--c-purple); }
.CalendarOption2-swim-ev.CalendarOption2-ev--yellow { background: var(--c-ev-yellow-bg); color: var(--c-ev-yellow-fg); border-left-color: var(--c-yellow); --c-span-stroke: var(--c-yellow); }
.CalendarOption2-swim-ev.CalendarOption2-ev--teal   { background: var(--c-ev-teal-bg);   color: var(--c-ev-teal-fg);   border-left-color: var(--c-teal);   --c-span-stroke: var(--c-teal); }
.CalendarOption2-swim-ev.CalendarOption2-ev--pink   { background: var(--c-ev-pink-bg);   color: var(--c-ev-pink-fg);   border-left-color: var(--c-pink);   --c-span-stroke: var(--c-pink); }
/* Threaded multi-day spans: event rendered in consecutive day/week
 * columns gets dashed continuation borders and a connector stub that
 * crosses the column gutter, so the per-column chips visually read as
 * one continuous event instead of separate items. */
.CalendarOption2-swim-ev.CalendarOption2-swim-ev-span-start {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 2px dashed var(--c-span-stroke);
    margin-right: -2px;
    position: relative;
    z-index: 2;
}
.CalendarOption2-swim-ev.CalendarOption2-swim-ev-span-mid {
    border-radius: 0;
    border-left: 2px dashed var(--c-span-stroke);
    border-right: 2px dashed var(--c-span-stroke);
    margin-left: -2px;
    margin-right: -2px;
    position: relative;
    z-index: 2;
    opacity: 0.88;
    font-style: italic;
}
.CalendarOption2-swim-ev.CalendarOption2-swim-ev-span-end {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 2px dashed var(--c-span-stroke);
    margin-left: -2px;
    position: relative;
    z-index: 2;
    opacity: 0.88;
    font-style: italic;
}
/* Connector stub bridges the column gutter. The cell's border-right
 * (.CalendarOption2-swim-cell border-right: 1px) plus padding leaves
 * an ~8px gap between adjacent chips; the stub is a thin horizontal
 * line flush with the chip's vertical center. */
.CalendarOption2-swim-ev-span-start::after,
.CalendarOption2-swim-ev-span-mid::after {
    content: "";
    position: absolute;
    right: -10px;
    top: 50%;
    width: 10px;
    height: 2px;
    background: var(--c-span-stroke);
    z-index: 3;
}
/* Day-view multi-day swim chip: flips the compact inline-block chip
 * into a vertical flex container (label row on top, footer below)
 * so a progress bar + range row can be attached. The Day-mode
 * dashed-border/chevron classes below are distinct from the
 * Week/Workweek span-* classes above because Day mode has no
 * adjacent chip to connect to - the external connector stub is
 * inappropriate here and would shoot past unrelated chips in the
 * all-day strip. */
.CalendarOption2-swim-ev.CalendarOption2-swim-ev-day-multiday {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    padding: 3px 6px 4px;
    min-width: 120px;
    white-space: normal;
    overflow: visible;
    position: relative;
}
.CalendarOption2-swim-ev-day-multiday .CalendarOption2-swim-ev-day-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
}
.CalendarOption2-swim-ev.CalendarOption2-swim-ev-day-cont-from {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 2px dashed var(--c-span-stroke);
    padding-left: 14px;
}
.CalendarOption2-swim-ev.CalendarOption2-swim-ev-day-cont-from .CalendarOption2-swim-ev-day-label {
    font-style: italic;
}
.CalendarOption2-swim-ev.CalendarOption2-swim-ev-day-cont-to {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 2px dashed var(--c-span-stroke);
    padding-right: 14px;
}
.CalendarOption2-swim-ev.CalendarOption2-swim-ev-day-cont-both {
    border-radius: 0;
    border-left: 2px dashed var(--c-span-stroke);
    border-right: 2px dashed var(--c-span-stroke);
    padding-left: 14px;
    padding-right: 14px;
}
.CalendarOption2-swim-ev.CalendarOption2-swim-ev-day-cont-both .CalendarOption2-swim-ev-day-label {
    font-style: italic;
}
.CalendarOption2-swim-ev-day-cont-from::before,
.CalendarOption2-swim-ev-day-cont-both::before {
    content: "\2039";
    position: absolute;
    left: 3px;
    top: 5px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: var(--c-span-stroke);
}
.CalendarOption2-swim-ev-day-cont-to::after,
.CalendarOption2-swim-ev-day-cont-both::after {
    content: "\203A";
    position: absolute;
    right: 3px;
    top: 5px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: var(--c-span-stroke);
}
.CalendarOption2-swim-ev-day-footer {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 1px;
}
.CalendarOption2-swim-ev-day-progress {
    position: relative;
    height: 3px;
    border-radius: 2px;
    background: var(--c-border-light);
    overflow: hidden;
}
.CalendarOption2-swim-ev-day-progress-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--c-span-stroke);
    opacity: 0.3;
}
.CalendarOption2-swim-ev-day-progress-today {
    position: absolute;
    top: -1px;
    bottom: -1px;
    background: var(--c-span-stroke);
    border-radius: 1px;
}
.CalendarOption2-swim-ev-day-range {
    display: flex;
    justify-content: space-between;
    font-size: 8px;
    color: var(--c-meta);
    font-weight: 600;
}
.CalendarOption2-swim-ev-day-range-today {
    color: var(--c-span-stroke);
}
.CalendarOption2-swim-more {
    font-size: 9px;
    color: var(--c-slate);
    padding: 0 5px;
    cursor: pointer;
}
.CalendarOption2-swim-more:hover {
    color: var(--c-brand);
}
.CalendarOption2-swim-empty {
    width: 100%;
    padding: 60px 24px;
    text-align: center;
    color: var(--c-meta);
    font-size: 13px;
    border: 1px dashed var(--c-border);
    border-radius: 8px;
    background: var(--c-bg-tint);
}
/* All-day strip rendered above the Day-mode Swimlanes hour grid so
 * all-day events have a visible home. Mirrors Calendar+Day's
 * pattern of an all-day header strip above the timed-event table. */
.CalendarOption2-swim-allday-strip {
    border: 1px solid var(--c-border-light);
    border-radius: 6px;
    background: #fff;
    margin-bottom: 8px;
    overflow: hidden;
}
.CalendarOption2-swim-allday-header {
    padding: 6px 12px;
    background: var(--c-bg-tint);
    border-bottom: 1px solid var(--c-border-light);
    font-size: 11px;
    font-weight: 600;
    color: var(--c-slate);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.CalendarOption2-swim-allday-body {
    display: flex;
    flex-direction: column;
}
.CalendarOption2-swim-allday-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    border-bottom: 1px solid var(--c-border-light);
    min-height: 32px;
    align-items: center;
}
.CalendarOption2-swim-allday-row:last-child {
    border-bottom: none;
}
.CalendarOption2-swim-allday-lane {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--c-bg-tint);
    border-right: 1px solid var(--c-border-light);
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
}
.CalendarOption2-swim-allday-lane-name {
    font-size: 12px;
    color: var(--c-navy);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.CalendarOption2-swim-allday-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 8px;
    min-width: 0;
}
.CalendarOption2-swim-allday-chips .CalendarOption2-swim-ev {
    flex: 0 0 auto;
    max-width: 220px;
}

/* ============================================================
 * 1.8f Timeline display mode
 * ============================================================ */
.CalendarOption2 .CalendarOption2-tl {
    width: 100% !important;
    height: 100% !important;
    /* Vertical scroll on the outer Panel; horizontal scroll lives on
     * the inner .CalendarOption2-tl-wrap. */
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: #fff !important;
    padding: 18px !important;
    box-sizing: border-box !important;
    font-family: var(--f-family);
    color: var(--c-body);
}
.CalendarOption2-tl-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    border: 1px solid var(--c-border-light);
    border-radius: 6px;
    background: #fff;
}
.CalendarOption2-tl-head {
    display: grid;
    grid-template-columns: 200px 1fr;
    border-bottom: 1px solid var(--c-border-light);
    width: 100%;
}
.CalendarOption2-tl-head-spacer {
    background: var(--c-bg-tint);
    padding: 6px 12px;
    font-size: 11px;
    color: var(--c-slate);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    /* Pin the header's "ITEM" label to the left edge during
     * horizontal scroll. */
    position: sticky;
    left: 0;
    z-index: 3;
}
.CalendarOption2-tl-head-days {
    display: grid;
    font-size: 10px;
    color: var(--c-slate);
    background: var(--c-bg-tint);
    text-align: center;
}
.CalendarOption2-tl-head-day {
    padding: 6px 0;
    text-align: center;
    border-left: 1px solid var(--c-border-light);
}
.CalendarOption2-tl-head-day.is-weekend { background: #f6f8fb; }
.CalendarOption2-tl-head-day.is-today {
    background: var(--c-bg-today);
    color: var(--c-brand);
    font-weight: 600;
}
.CalendarOption2-tl-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    width: 100%;
    border-bottom: 1px solid var(--c-border-light);
    min-height: 44px;
}
.CalendarOption2-tl-row-label {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--c-bg-tint);
    border-right: 1px solid var(--c-border-light);
    min-width: 0;
    /* Keep the item label visible while scrolling the day/hour
     * tracks horizontally. */
    position: sticky;
    left: 0;
    z-index: 2;
}
.CalendarOption2-tl-row-proj {
    font-size: 10px;
    color: var(--c-slate);
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.CalendarOption2-tl-row-name {
    font-size: 12px;
    color: var(--c-navy);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.CalendarOption2-tl-row-track {
    position: relative;
    display: grid;
}
.CalendarOption2-tl-cell {
    border-left: 1px solid var(--c-border-light);
    min-height: 44px;
}
.CalendarOption2-tl-cell.is-weekend { background: #f6f8fb; }
.CalendarOption2-tl-cell.is-today { background: var(--c-bg-today); }
.CalendarOption2-tl-bar {
    position: absolute;
    top: 10px;
    bottom: 10px;
    border-radius: 4px;
    font-size: 10px;
    padding: 4px 8px;
    color: #fff;
    display: flex;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    white-space: nowrap;
    text-overflow: ellipsis;
}
.CalendarOption2-tl-bar--blue   { background: var(--c-brand); }
.CalendarOption2-tl-bar--green  { background: var(--c-green); }
.CalendarOption2-tl-bar--orange { background: var(--c-orange); }
.CalendarOption2-tl-bar--red    { background: var(--c-red); }
.CalendarOption2-tl-bar--purple { background: var(--c-purple); }
.CalendarOption2-tl-bar--yellow { background: var(--c-yellow); }
.CalendarOption2-tl-bar--teal   { background: var(--c-teal); }
.CalendarOption2-tl-bar--pink   { background: var(--c-pink); }
.CalendarOption2-tl-empty {
    padding: 30px;
    text-align: center;
    color: var(--c-meta);
    font-size: 12px;
}

/* ============================================================
 * 1.8g Triage display mode
 * ============================================================ */
.CalendarOption2 .CalendarOption2-tri {
    width: 100% !important;
    height: 100% !important;
    overflow: auto !important;
    background: #fff !important;
    padding: 18px !important;
    box-sizing: border-box !important;
    font-family: var(--f-family);
    color: var(--c-body);
}
.CalendarOption2-tri-wrap {
    display: grid;
    gap: 12px;
}
.CalendarOption2-tri-col {
    background: var(--c-bg-tint);
    border: 1px solid var(--c-border-light);
    border-radius: 6px;
    padding: 10px;
    min-height: 480px;
    display: flex;
    flex-direction: column;
}
.CalendarOption2-tri-col-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--c-border-light);
    margin-bottom: 10px;
}
.CalendarOption2-tri-col-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--c-navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.CalendarOption2-tri-col.today   .CalendarOption2-tri-col-title { color: var(--c-brand); }
.CalendarOption2-tri-col.overdue .CalendarOption2-tri-col-title { color: var(--c-red); }
.CalendarOption2-tri-col-count {
    font-size: 11px;
    color: var(--c-slate);
    background: #fff;
    padding: 2px 8px;
    border-radius: 10px;
}
.CalendarOption2-tri-col-body {
    overflow-y: auto;
    flex: 1;
}
.CalendarOption2-tri-card {
    background: #fff;
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-left: 3px solid var(--c-brand);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    cursor: pointer;
}
.CalendarOption2-tri-card.CalendarOption2-ev--blue   { border-left-color: var(--c-brand);  --c-span-stroke: var(--c-brand); }
.CalendarOption2-tri-card.CalendarOption2-ev--green  { border-left-color: var(--c-green);  --c-span-stroke: var(--c-green); }
.CalendarOption2-tri-card.CalendarOption2-ev--orange { border-left-color: var(--c-orange); --c-span-stroke: var(--c-orange); }
.CalendarOption2-tri-card.CalendarOption2-ev--red    { border-left-color: var(--c-red);    --c-span-stroke: var(--c-red); }
.CalendarOption2-tri-card.CalendarOption2-ev--purple { border-left-color: var(--c-purple); --c-span-stroke: var(--c-purple); }
/* Threaded multi-day spans: cards in consecutive day/week columns
 * get dashed continuation borders + squared-off corners + italic
 * continuation text so the per-column cards visually read as one
 * event. Triage cannot use an external connector stub like
 * Swimlanes because .CalendarOption2-tri-col-body has overflow-y
 * auto which clips pseudo-elements poking outside the card; the
 * connection is communicated purely through in-card affordances
 * (same Y position, dashed join-side border, squared join-side
 * corners, italic continuation text). */
.CalendarOption2-tri-card.CalendarOption2-tri-card-span-start {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 2px dashed var(--c-span-stroke);
    margin-right: 0;
    position: relative;
}
.CalendarOption2-tri-card.CalendarOption2-tri-card-span-mid {
    border-radius: 0;
    border-left: 2px dashed var(--c-span-stroke);
    border-right: 2px dashed var(--c-span-stroke);
    position: relative;
    opacity: 0.9;
}
.CalendarOption2-tri-card.CalendarOption2-tri-card-span-mid .CalendarOption2-tri-card-n,
.CalendarOption2-tri-card.CalendarOption2-tri-card-span-end .CalendarOption2-tri-card-n {
    font-style: italic;
    font-weight: 500;
}
.CalendarOption2-tri-card.CalendarOption2-tri-card-span-end {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 2px dashed var(--c-span-stroke);
    position: relative;
    opacity: 0.9;
}
/* Small in-card continuation chevron at the right edge for start/mid
 * and left edge for mid/end. Sits inside the card bounds so it is
 * not clipped by the overflow-y: auto on the column body. */
.CalendarOption2-tri-card-span-start::after,
.CalendarOption2-tri-card-span-mid::after {
    content: "\203A"; /* single right-pointing angle quotation mark */
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    line-height: 1;
    color: var(--c-span-stroke);
    font-weight: 700;
}
.CalendarOption2-tri-card-span-mid::before,
.CalendarOption2-tri-card-span-end::before {
    content: "\2039"; /* single left-pointing angle quotation mark */
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    line-height: 1;
    color: var(--c-span-stroke);
    font-weight: 700;
}
.CalendarOption2-tri-card.CalendarOption2-tri-card-span-mid,
.CalendarOption2-tri-card.CalendarOption2-tri-card-span-end {
    padding-left: 18px;
}
.CalendarOption2-tri-card.CalendarOption2-tri-card-span-start,
.CalendarOption2-tri-card.CalendarOption2-tri-card-span-mid {
    padding-right: 16px;
}
/* Day-view multi-day footer: attached to the bottom of a Triage
 * card when the event spans more than today. Pairs with the existing
 * span-start/span-end/span-mid classes above for the dashed border
 * + chevron affordance; this block only adds the footer region with
 * a thin progress bar (full span as the track, today highlighted in
 * the event color) and a 3-column range row (start date / Day X of
 * Y / end date). The label that represents today is highlighted. */
.CalendarOption2-tri-card.CalendarOption2-tri-card-day-multiday {
    padding-bottom: 10px;
}
.CalendarOption2-tri-card-day-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--c-border-light);
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.CalendarOption2-tri-card-day-progress {
    position: relative;
    height: 4px;
    border-radius: 2px;
    background: var(--c-border-light);
    overflow: hidden;
}
.CalendarOption2-tri-card-day-progress-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--c-span-stroke);
    opacity: 0.3;
}
.CalendarOption2-tri-card-day-progress-today {
    position: absolute;
    top: -1px;
    bottom: -1px;
    background: var(--c-span-stroke);
    border-radius: 1px;
}
.CalendarOption2-tri-card-day-range {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--c-meta);
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.CalendarOption2-tri-card-day-range-today {
    color: var(--c-span-stroke);
}
.CalendarOption2-tri-card-t {
    font-size: 11px;
    color: var(--c-slate);
}
.CalendarOption2-tri-card-n {
    font-size: 12px;
    color: var(--c-navy);
    font-weight: 500;
    margin: 2px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.CalendarOption2-tri-card-p {
    font-size: 10px;
    color: var(--c-meta);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.CalendarOption2-tri-more {
    /* Overflow hint rendered at the bottom of a triage column when
     * the matched-event count exceeds the visible card cap. Without
     * this, the count badge and the rendered card list disagree. */
    font-size: 11px;
    color: var(--c-slate);
    text-align: center;
    padding: 6px 4px 2px;
    font-style: italic;
    cursor: pointer;
}
.CalendarOption2-tri-more:hover {
    color: var(--c-brand);
}

/* ============================================================
 * 1.9 Month grid (overrides on CalendarViewMonth + CalendarViewMonthDatePanel)
 *
 * Background colors are written !important to defeat the inline
 * style.backgroundColor set by setBackgroundColor() in
 * CalendarViewMonth.onEventsLoaded().
 * ============================================================ */
.CalendarOption2 .CalendarViewMonth {
    background: #fff !important;
    border: none !important;
    font-family: var(--f-family);
    width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    /* min-width:0 is required so the flex children (row tables)
     * can shrink below their intrinsic content width. Without this
     * the default min-width:auto on flex items lets each row-table
     * grow to the widest cell content (chip text), which pushes the
     * whole calendar ~96px wider than its parent TD and triggers a
     * horizontal scrollbar. */
    min-width: 0 !important;
}
.CalendarOption2 .CalendarViewMonth table {
    border-collapse: collapse;
    /* Force each row-table to the flex container's width and share
     * it equally across 7 cells, instead of asking the browser to
     * auto-size columns from content. Without this, TDs inflate to
     * fit the widest event chip and the grid overflows its parent. */
    table-layout: fixed;
    width: 100% !important;
}
.CalendarOption2 .CalendarViewMonth td {
    border: none !important;
    /* The legacy JS sets td.style.backgroundColor inline (white,
     * #FFFFCC for today, gray for other-month) which would bleed
     * through the gap between the panel and the cell bottom. Force
     * transparent so only the panel's background is visible. */
    background: transparent !important;
    background-color: transparent !important;
    vertical-align: top !important;
    /* TDs default to `box-sizing: content-box`, so any `padding`
     * we add (e.g. 10px 8px on the weekday header TDs) is added
     * to the column's intrinsic width. With 7 columns and 8px of
     * horizontal padding per side, that's 7 * 16 = 112px of extra
     * table width that `table-layout: fixed` + `width: 100%` does
     * NOT absorb - they set the CONTENT width, not the border-box
     * width. Forcing border-box sizing here makes the padding sit
     * INSIDE each column's share of the 100% table width, so the
     * table stays exactly as wide as its flex container and the
     * month view never overflows horizontally. */
    box-sizing: border-box !important;
    /* Clip any child element that insists on being wider than its
     * share of the table width. Notably the legacy Label widget
     * inside weekday header cells writes an inline `width: Npx`
     * from a one-time measurement - stale when the table resizes
     * smaller - which would otherwise leak a few pixels of
     * horizontal scroll out to the ScrollPanel. */
    overflow: hidden !important;
    /* Required so the CalendarViewMonthDatePanel child can resolve
     * its `height: 100%` against the TD's actual rendered height.
     *
     * The `height: 1px` value is a classic CSS trick for this
     * specific situation: table-cell elements assigned a row
     * height via the table layout algorithm are NOT considered
     * "definite" from a percentage-resolution standpoint, so a
     * child's `height: 100%` falls back to `auto` (content height)
     * and other-month cells shrink to their dim day-number row,
     * leaving gray strips of row-table background visible at the
     * bottom of the cell. Setting `height: 1px` on the TD makes
     * its declared height "definite" for percentage resolution
     * while table layout still stretches the cell to the full
     * row height. The child then correctly resolves 100% to the
     * actual stretched height. */
    height: 1px;
}
/* CalendarViewMonth's direct children are sibling <table> elements
 * (one per row of the grid - TableLayout creates a separate table
 * per row). The first table is the weekday header (auto height);
 * the rest distribute the remaining height equally via flex. Hidden
 * rows (display:none from hideRow()) automatically drop out of the
 * flex distribution, so April (5 visible rows) gets thicker rows
 * than e.g. March (6 visible rows). */
.CalendarOption2 .CalendarViewMonth > table {
    flex: 1 1 0;
    /* CRITICAL: min-width: 0 AND min-height: 0 must be set on each
     * flex child individually (not just on the parent). The CSS
     * spec default for flex items is `min-width: auto` and
     * `min-height: auto`, which pin the item to its intrinsic
     * content size. Without these overrides, a row-table with a
     * wide event chip ("8:55 am - Company Gasket") widens to its
     * content, ignoring the `width: 100%` rule above, and the
     * whole month grid overflows horizontally by ~100px.
     * Similarly, without min-height: 0, each row reports its
     * content height instead of `flex: 1 1 0` / (available / N),
     * and the rows together exceed the container vertically. */
    min-width: 0 !important;
    min-height: 0 !important;
    /* Clip any content that would exceed the cell's allocated
     * share (already handled by child chip styles, but we want
     * this as a hard safety net so a single oversized chip can
     * never bubble a scrollbar up to the outer calendar). */
    overflow: hidden;
}
.CalendarOption2 .CalendarViewMonth > table:first-child {
    flex: 0 0 auto;
}
/* The ScrollPanel that wraps ONLY the month view (tagged in JS with
 * the CalendarOption2-MonthScroll className) must fill its
 * TableLayout cell so the inner CalendarViewMonth has a real height
 * to inherit. We can't blanket-style .ScrollPanel because the day
 * and week views use nested ScrollPanels for their hour-row gutter.
 *
 * The month view normally fits its container exactly - CSS flex
 * (see `.CalendarViewMonth > table` above) distributes the
 * available horizontal and vertical space across the week rows,
 * and the `height: 100%` + `min-height: 0` override on the date
 * panel ensures the old stale JS-computed min-heights never pin
 * the rows larger than the container. On small screens where the
 * flex distribution gives each row less space than the content
 * needs (a single chip + day number is ~60px), the natural
 * overflow cascades out to this ScrollPanel and OverlayScrollbars
 * activates.
 *
 * OverlayScrollbars defaults to auto-hide mode, where the scroll
 * track is invisible unless the user hovers or scrolls. For the
 * calendar that's confusing - the user has no indication that
 * content is clipped. Force the scroll track visible whenever the
 * host has the `os-host-overflow` class that OverlayScrollbars
 * itself applies when real content overflow is detected. */
.CalendarOption2 .CalendarOption2-MonthScroll {
    width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;
}
.CalendarOption2 .CalendarOption2-MonthScroll.os-host-overflow-y
    .os-scrollbar-vertical.os-scrollbar-auto-hidden,
.CalendarOption2 .CalendarOption2-MonthScroll.os-host-overflow-x
    .os-scrollbar-horizontal.os-scrollbar-auto-hidden {
    visibility: visible !important;
    opacity: 1 !important;
}
/* Weekday header row. CalendarViewMonth has direct-child <table>
 * siblings (one per row); the first table is the weekday header. */
.CalendarOption2 .CalendarViewMonth > table:first-child > tbody > tr > td {
    background: var(--c-bg-tint) !important;
    border-bottom: 1px solid var(--c-border) !important;
    padding: 10px 8px !important;
    text-align: center;
}
.CalendarOption2 .CalendarViewMonth > table:first-child > tbody > tr > td .Label {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--c-slate) !important;
    text-transform: uppercase;
    letter-spacing: .5px;
    text-align: center;
    font-family: var(--f-family) !important;
}
.CalendarOption2 .CalendarViewMonthDatePanel {
    padding: 0 !important;
    border-right: 1px solid var(--c-border-light) !important;
    border-bottom: 1px solid var(--c-border-light) !important;
    background: #fff !important;
    transition: background .15s;
    box-sizing: border-box;
    font-family: var(--f-family);
    overflow: hidden;
    /* Override the JS-computed inline height / min-height / max-height
     * that stretchPanelsToFill() sets on m_htmlContainer. The inline
     * min-height it writes becomes a hard floor that flex cannot
     * shrink below, so when the container resizes smaller the old
     * min-height pins the panels at their larger size and cascades a
     * vertical overflow scrollbar. By forcing height:100% (fill the
     * TD via flex) and clearing min-/max-height, CSS flex owns the
     * row sizing end-to-end and the grid always fits exactly. */
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
}
.CalendarOption2 .CalendarViewMonthDatePanel > table > tbody > tr:last-child > td {
    vertical-align: top;
}
.CalendarOption2 .CalendarViewMonth > table > tbody > tr > td:nth-child(7n) .CalendarViewMonthDatePanel {
    border-right: none !important;
}
.CalendarOption2 .CalendarViewMonthDatePanel:hover {
    background: var(--c-bg-hover) !important;
}
.CalendarOption2 .CalendarViewMonthDatePanel.is-other-month {
    background: var(--c-bg-tint) !important;
}
.CalendarOption2 .CalendarViewMonthDatePanel.is-other-month .coreTextDarkBlueBold {
    color: var(--c-other-month) !important;
}
.CalendarOption2 .CalendarViewMonthDatePanel.is-today {
    background: var(--c-bg-today) !important;
}
/* Day-number element inside the date panel - existing markup is
 * <div class='coreTextDarkBlueBold' style='display:inline-block;...'>N</div>
 * (see calendar_view_month_date_panel.js:57). We override with a
 * uniform 24x24 inline-flex box so the day number occupies the same
 * vertical space regardless of whether is-today is set. Without this
 * the today circle badge (24x24) inflates the row height and pushes
 * the data cell below it down, causing event chips in today's column
 * to appear several pixels lower than chips in neighboring columns. */
.CalendarOption2 .CalendarViewMonthDatePanel .coreTextDarkBlueBold {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--c-navy) !important;
    padding: 0 !important;
    margin: 8px 0 4px 8px !important;
    width: 24px !important;
    height: 24px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-family: var(--f-family) !important;
    box-sizing: border-box;
}

/* Give the events area inside each month cell a small top gap so the
 * chips don't touch the day-number row above them. */
.CalendarOption2 .CalendarViewMonthDatePanel table table + table,
.CalendarOption2 .CalendarViewMonthDatePanel > div > table > tbody > tr:nth-child(2) > td {
    padding-top: 6px !important;
}
.CalendarOption2 .CalendarViewMonthDatePanel .CalendarOption2-ev-day {
    margin: 2px 4px;
}
.CalendarOption2 .CalendarViewMonthDatePanel.is-today .coreTextDarkBlueBold {
    background: var(--c-brand);
    color: #fff !important;
    border-radius: 50%;
    font-weight: 600 !important;
}

/* Make sure td wrapper backgrounds (set inline by setBackgroundColor on parentNode)
 * don't override the cell color */
.CalendarOption2 .CalendarViewMonth > div > table > tbody > tr > td {
    background: transparent !important;
}

/* ============================================================
 * 1.10 Week grid (overrides on CalendarViewWeek + day panels)
 * ============================================================ */
.CalendarOption2 .CalendarViewWeek {
    background: #fff !important;
    font-family: var(--f-family);
}
.CalendarOption2 .CalendarViewWeek td {
    background: transparent !important;
}
.CalendarOption2 .CalendarViewDayDatePanelHeader {
    text-align: center;
    /* No padding. The inner TableLayout already contributes 4px of
     * top and 4px of bottom breathing room via the m_topBorder /
     * m_bottomBorder rows. Adding padding here would be
     * double-counted by `box-sizing: border-box` (which Panel
     * writes inline), so a row declared at e.g. 42px would have
     * only 18px for the 42px internal layout, cascading a ~25px
     * vertical overflow up to the CalendarViewer outer - the day
     * view would get a stray vertical scrollbar even with no
     * all-day events. Do NOT add horizontal padding here either:
     * the div is content-box sized inside the TD and horizontal
     * padding inflates the cell's intrinsic width, pushing the 7
     * week-view header cells ~112px wider than the daysLayout
     * grid below and misaligning the columns. */
    padding: 0 !important;
    background: var(--c-bg-tint) !important;
    border-right: 1px solid var(--c-border-light) !important;
    border-bottom: 1px solid var(--c-border) !important;
    box-sizing: border-box;
    font-family: var(--f-family);
    color: var(--c-navy);
}
.CalendarOption2 .CalendarViewDayDatePanelHeader.is-today {
    background: var(--c-bg-tint) !important;
}
/* Week view stacked header: "SUN" small label on top, day number
 * (with today circle variant) below. Emitted by
 * CalendarViewDayDatePanelHeader.setDate() when m_shortDay is true. */
.CalendarOption2 .CalendarOption2-wd {
    display: block;
    font-size: 11px;
    color: var(--c-slate);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: .5px;
}
.CalendarOption2 .CalendarOption2-wn {
    display: inline-block;
    font-size: 20px;
    font-weight: 500;
    color: var(--c-navy);
    margin-top: 2px;
}
.CalendarOption2 .CalendarViewDayDatePanelHeader.is-today .CalendarOption2-wn {
    background: var(--c-brand);
    color: #fff;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 500;
}
/* Day view horizontal header bar: "Friday, April 3". Emitted by
 * CalendarViewDayDatePanelHeader.setDate() when m_dayViewMode is true. */
.CalendarOption2 .CalendarOption2-dhdr-text {
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
    color: var(--c-navy);
    padding: 4px 0;
}
.CalendarOption2 .CalendarViewDayDatePanel {
    background: #fff !important;
    font-family: var(--f-family);
}

/* ============================================================
 * 1.11 Day grid (overrides on CalendarViewDay + day panel)
 * ============================================================ */
.CalendarOption2 .CalendarViewDay {
    background: #fff !important;
    font-family: var(--f-family);
}
.CalendarOption2 .CalendarViewDay td {
    background: transparent !important;
}

/* ============================================================
 * 1.12 Event chips
 *
 * Chips are constructed by calendar_view_month_date_panel.js and
 * calendar_view_day_date_panel.js with the classes below. Both
 * files have had their inline chip styling stripped (layout-only
 * inline styles like position/top/left remain), so these CSS rules
 * don't need !important.
 * ============================================================ */

/* Month-view chip (.calEventDiv already set by legacy markup) */
.CalendarOption2 .CalendarOption2-ev-day {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;
    margin: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    border: none;
    border-left: 3px solid var(--c-brand);
    box-shadow: none;
    background: var(--c-ev-blue-bg);
    color: var(--c-ev-blue-fg);
    font-family: var(--f-family);
    box-sizing: border-box;
}
.CalendarOption2 .CalendarOption2-ev-day.CalendarOption2-ev--blue   { background: var(--c-ev-blue-bg);   color: var(--c-ev-blue-fg);   border-left-color: var(--c-brand);  --c-span-stroke: var(--c-brand); }
.CalendarOption2 .CalendarOption2-ev-day.CalendarOption2-ev--green  { background: var(--c-ev-green-bg);  color: var(--c-ev-green-fg);  border-left-color: var(--c-green);  --c-span-stroke: var(--c-green); }
.CalendarOption2 .CalendarOption2-ev-day.CalendarOption2-ev--orange { background: var(--c-ev-orange-bg); color: var(--c-ev-orange-fg); border-left-color: var(--c-orange); --c-span-stroke: var(--c-orange); }
.CalendarOption2 .CalendarOption2-ev-day.CalendarOption2-ev--red    { background: var(--c-ev-red-bg);    color: var(--c-ev-red-fg);    border-left-color: var(--c-red);    --c-span-stroke: var(--c-red); }
.CalendarOption2 .CalendarOption2-ev-day.CalendarOption2-ev--purple { background: var(--c-ev-purple-bg); color: var(--c-ev-purple-fg); border-left-color: var(--c-purple); --c-span-stroke: var(--c-purple); }
.CalendarOption2 .CalendarOption2-ev-day.CalendarOption2-ev--yellow { background: var(--c-ev-yellow-bg); color: var(--c-ev-yellow-fg); border-left-color: var(--c-yellow); --c-span-stroke: var(--c-yellow); }
.CalendarOption2 .CalendarOption2-ev-day.CalendarOption2-ev--teal   { background: var(--c-ev-teal-bg);   color: var(--c-ev-teal-fg);   border-left-color: var(--c-teal);   --c-span-stroke: var(--c-teal); }
.CalendarOption2 .CalendarOption2-ev-day.CalendarOption2-ev--pink   { background: var(--c-ev-pink-bg);   color: var(--c-ev-pink-fg);   border-left-color: var(--c-pink);   --c-span-stroke: var(--c-pink); }

/* ============================================================
 * Calendar display mode multi-day A+C merged decoration
 *
 * Applied to per-day chips in the Month grid
 * (.CalendarOption2-ev-day-multiday) and to per-day chips in the
 * Week / Workweek / Day all-day strip
 * (.CalendarOption2-cal-allday-multiday) when the event spans
 * more than one day. Gives each chip:
 *   - Dashed continuation border + chevron on the side that
 *     continues beyond this cell (start / mid / end variants)
 *   - A footer with a thin progress bar + 3-column range row
 *     showing where THIS cell's day sits in the full span.
 *
 * The footer DOM (.CalendarOption2-cal-day-footer) is built in JS
 * by buildCalendarDaySpanFooter() in calendar_view_event.js and
 * is shared between both paths so the visual is pixel-identical.
 * ============================================================ */

/* ---- Month-grid chip with multi-day footer ---- */
.CalendarOption2 .CalendarOption2-ev-day.CalendarOption2-ev-day-multiday {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    position: relative;
    padding: 6px 10px 8px;
}
.CalendarOption2 .CalendarOption2-ev-day.CalendarOption2-ev-day-multiday .CalendarOption2-ev-day-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.CalendarOption2 .CalendarOption2-ev-day.CalendarOption2-ev-day-span-start {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 2px dashed var(--c-span-stroke);
    padding-right: 16px;
}
.CalendarOption2 .CalendarOption2-ev-day.CalendarOption2-ev-day-span-mid {
    border-radius: 0;
    border-left: 2px dashed var(--c-span-stroke);
    border-right: 2px dashed var(--c-span-stroke);
    padding-left: 18px;
    padding-right: 16px;
}
.CalendarOption2 .CalendarOption2-ev-day.CalendarOption2-ev-day-span-mid .CalendarOption2-ev-day-label,
.CalendarOption2 .CalendarOption2-ev-day.CalendarOption2-ev-day-span-end .CalendarOption2-ev-day-label {
    font-style: italic;
}
.CalendarOption2 .CalendarOption2-ev-day.CalendarOption2-ev-day-span-end {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 2px dashed var(--c-span-stroke);
    padding-left: 18px;
}
.CalendarOption2 .CalendarOption2-ev-day-span-start::after,
.CalendarOption2 .CalendarOption2-ev-day-span-mid::after {
    content: "\203A";
    position: absolute;
    right: 4px;
    top: 8px;
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
    color: var(--c-span-stroke);
}
.CalendarOption2 .CalendarOption2-ev-day-span-mid::before,
.CalendarOption2 .CalendarOption2-ev-day-span-end::before {
    content: "\2039";
    position: absolute;
    left: 4px;
    top: 8px;
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
    color: var(--c-span-stroke);
}

/* ---- All-day strip chip (Week / Workweek / Day) with multi-day footer ----
 * The legacy inline styles on the chip (white-space: nowrap,
 * text-overflow: ellipsis, opacity: .70) would clip the footer and
 * dim it below readability. The rules below override those inline
 * styles via !important - this is the ONE place in the Option 2
 * refresh where !important is needed, because the inline
 * declarations set by setEvents() have the highest normal
 * specificity. The color cascade uses CalendarOption2-ev--<color>
 * which is added alongside the multiday class so --c-span-stroke
 * resolves correctly.
 */
.CalendarOption2 .CalendarOption2-cal-allday-multiday {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    opacity: 1 !important;
    background: var(--c-ev-blue-bg) !important;
    color: var(--c-ev-blue-fg) !important;
    border: 1px solid var(--c-ev-blue-bd, transparent) !important;
    border-left: 3px solid var(--c-brand) !important;
    border-radius: 5px !important;
    padding: 4px 8px 5px !important;
    position: relative;
    --c-span-stroke: var(--c-brand);
    font-size: 11px;
    /* Width is set inline by setEvents() to getAvailableWidth() - 10.
     * Without border-box the 16px horizontal padding + 2px border +
     * 3px left border overflow the chip and push the table wider
     * than its available width, triggering the horizontal scrollbar
     * in the inner ScrollPanel. Border-box folds padding and border
     * back into the declared width so the chip fits exactly. */
    box-sizing: border-box !important;
}
.CalendarOption2 .CalendarOption2-cal-allday-multiday.CalendarOption2-ev--blue   { background: var(--c-ev-blue-bg)   !important; color: var(--c-ev-blue-fg)   !important; border-left-color: var(--c-brand)  !important; --c-span-stroke: var(--c-brand); }
.CalendarOption2 .CalendarOption2-cal-allday-multiday.CalendarOption2-ev--green  { background: var(--c-ev-green-bg)  !important; color: var(--c-ev-green-fg)  !important; border-left-color: var(--c-green)  !important; --c-span-stroke: var(--c-green); }
.CalendarOption2 .CalendarOption2-cal-allday-multiday.CalendarOption2-ev--orange { background: var(--c-ev-orange-bg) !important; color: var(--c-ev-orange-fg) !important; border-left-color: var(--c-orange) !important; --c-span-stroke: var(--c-orange); }
.CalendarOption2 .CalendarOption2-cal-allday-multiday.CalendarOption2-ev--red    { background: var(--c-ev-red-bg)    !important; color: var(--c-ev-red-fg)    !important; border-left-color: var(--c-red)    !important; --c-span-stroke: var(--c-red); }
.CalendarOption2 .CalendarOption2-cal-allday-multiday.CalendarOption2-ev--purple { background: var(--c-ev-purple-bg) !important; color: var(--c-ev-purple-fg) !important; border-left-color: var(--c-purple) !important; --c-span-stroke: var(--c-purple); }
.CalendarOption2 .CalendarOption2-cal-allday-multiday.CalendarOption2-ev--yellow { background: var(--c-ev-yellow-bg) !important; color: var(--c-ev-yellow-fg) !important; border-left-color: var(--c-yellow) !important; --c-span-stroke: var(--c-yellow); }
.CalendarOption2 .CalendarOption2-cal-allday-multiday.CalendarOption2-ev--teal   { background: var(--c-ev-teal-bg)   !important; color: var(--c-ev-teal-fg)   !important; border-left-color: var(--c-teal)   !important; --c-span-stroke: var(--c-teal); }
.CalendarOption2 .CalendarOption2-cal-allday-multiday.CalendarOption2-ev--pink   { background: var(--c-ev-pink-bg)   !important; color: var(--c-ev-pink-fg)   !important; border-left-color: var(--c-pink)   !important; --c-span-stroke: var(--c-pink); }

.CalendarOption2 .CalendarOption2-cal-allday-multiday.CalendarOption2-cal-allday-span-start {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: 2px dashed var(--c-span-stroke) !important;
    padding-right: 14px !important;
}
.CalendarOption2 .CalendarOption2-cal-allday-multiday.CalendarOption2-cal-allday-span-mid {
    border-radius: 0 !important;
    border-left: 2px dashed var(--c-span-stroke) !important;
    border-right: 2px dashed var(--c-span-stroke) !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    font-style: italic;
}
.CalendarOption2 .CalendarOption2-cal-allday-multiday.CalendarOption2-cal-allday-span-end {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-left: 2px dashed var(--c-span-stroke) !important;
    padding-left: 14px !important;
    font-style: italic;
}
.CalendarOption2 .CalendarOption2-cal-allday-span-start::after,
.CalendarOption2 .CalendarOption2-cal-allday-span-mid::after {
    content: "\203A";
    position: absolute;
    right: 3px;
    top: 5px;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    color: var(--c-span-stroke);
}
.CalendarOption2 .CalendarOption2-cal-allday-span-mid::before,
.CalendarOption2 .CalendarOption2-cal-allday-span-end::before {
    content: "\2039";
    position: absolute;
    left: 3px;
    top: 5px;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    color: var(--c-span-stroke);
}

/* ---- Shared footer (progress bar + 3-column range row) ----
 * Built by buildCalendarDaySpanFooter() and shared between the
 * Month chip and the all-day strip chip.
 */
.CalendarOption2 .CalendarOption2-cal-day-footer {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--c-border-light);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.CalendarOption2 .CalendarOption2-cal-day-progress {
    position: relative;
    height: 3px;
    border-radius: 2px;
    background: var(--c-border-light);
    overflow: hidden;
}
.CalendarOption2 .CalendarOption2-cal-day-progress-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--c-span-stroke);
    opacity: 0.3;
}
.CalendarOption2 .CalendarOption2-cal-day-progress-today {
    position: absolute;
    top: -1px;
    bottom: -1px;
    background: var(--c-span-stroke);
    border-radius: 1px;
}
.CalendarOption2 .CalendarOption2-cal-day-range {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--c-meta);
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    font-style: normal;
}
.CalendarOption2 .CalendarOption2-cal-day-range-today {
    color: var(--c-span-stroke);
}
/* Numeric range labels (all-day strip) use a slightly smaller font
 * to fit the compact chip. */
.CalendarOption2 .CalendarOption2-cal-allday-multiday .CalendarOption2-cal-day-range {
    font-size: 8px;
    text-transform: none;
}

/* "No end date" event chip - soft 2px dashed bottom in the
 * Option 2 border color, replacing the legacy 3px black dashed
 * marker that used to be set inline. */
.CalendarOption2 .CalendarOption2-ev-day--noEnd {
    border-bottom: 2px dashed var(--c-border);
}

/* Single-line label inside the chip */
.CalendarOption2-ev-day-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    font-weight: 400;
}
.CalendarOption2-ev-day-more {
    font-size: 10px;
    color: var(--c-slate);
    padding: 2px 5px;
    cursor: pointer;
}
.CalendarOption2-ev-day-more:hover {
    color: var(--c-brand);
}

/* ============================================================
 * "+N more" badge for timed event overflow in week/day hour grid.
 * Appears when overlapping events exceed the visible column cap.
 * ============================================================ */
.CalendarOption2 .CalendarOption2-ev-time-more {
    font-size: 10px;
    font-weight: 600;
    color: var(--c-brand);
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--c-border);
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
.CalendarOption2 .CalendarOption2-ev-time-more:hover {
    background: var(--c-brand-light, #DBEAFE);
    color: #1D4ED8;
}

/* Popover container for overflow events.
 * Appended to document.body (outside .CalendarOption2 scope),
 * so all CSS custom properties need hardcoded fallbacks. */
.CalendarOption2-ev-time-popover {
    background: #fff;
    border: 1px solid #DEE0E3;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
    padding: 10px 12px;
    min-width: 240px;
    max-width: 300px;
    max-height: 320px;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.CalendarOption2-ev-time-popover-title {
    font-size: 12px;
    font-weight: 600;
    color: #1E3A5F;
    padding-bottom: 6px;
    border-bottom: 1px solid #F1F5F9;
    margin-bottom: 6px;
}
.CalendarOption2-ev-time-popover-ev {
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 4px;
    border-left: 3px solid #249EF5;
    background: #EAF4FF;
    color: #1E3A5F;
    margin-bottom: 4px;
    cursor: pointer;
}
.CalendarOption2-ev-time-popover-ev:hover {
    filter: brightness(.96);
}
.CalendarOption2-ev-time-popover-ev.CalendarOption2-ev--blue   { background: #EAF4FF;  color: #1E3A5F;  border-left-color: #249EF5; }
.CalendarOption2-ev-time-popover-ev.CalendarOption2-ev--green  { background: #ECFDF5;  color: #065F46;  border-left-color: #10B981; }
.CalendarOption2-ev-time-popover-ev.CalendarOption2-ev--orange { background: #FFF7ED;  color: #9A3412;  border-left-color: #F59E0B; }
.CalendarOption2-ev-time-popover-ev.CalendarOption2-ev--red    { background: #FEF2F2;  color: #991B1B;  border-left-color: #EF4444; }
.CalendarOption2-ev-time-popover-ev.CalendarOption2-ev--purple { background: #F5F3FF;  color: #5B21B6;  border-left-color: #8B5CF6; }
.CalendarOption2-ev-time-popover-time {
    font-size: 10px;
    font-weight: 600;
}
.CalendarOption2-ev-time-popover-dur {
    font-size: 10px;
    color: var(--c-slate, #94A3B8);
    margin-left: 4px;
}
.CalendarOption2-ev-time-popover-name {
    margin-top: 1px;
}
.CalendarOption2-ev-time-popover-sep {
    border-top: 1px dashed var(--c-border);
    margin: 6px 0;
    padding-top: 6px;
    font-size: 10px;
    color: var(--c-slate, #94A3B8);
    font-weight: 600;
}
