/* sm-calendar.css (next wave, 2026-11-07): styles for js/sm-calendar.js, the
   shared calendar in the approved Teamworks-style layout. Tokens fall back to
   the Direction C ones (css/console-c.css) and then to plain dark values, so
   the parent pages can use it without the console CSS. Set --brand on the
   page (CUI.applyBrand does). Nothing under 15px. */
.smc {
  --smc-bg: var(--c-bg, #0A0A0C); --smc-surface: var(--c-surface, #141519); --smc-raised: var(--c-raised, #1D1E23); --smc-hover: var(--c-hover, #1A1B20);
  --smc-line: var(--c-line, rgba(255,255,255,.08)); --smc-line2: var(--c-line2, rgba(255,255,255,.14));
  --smc-ink: var(--c-ink, #F5F6F8); --smc-ink2: var(--c-ink2, #CDD1D7); --smc-ink3: var(--c-ink3, #9CA1A9);
  --smc-brand: var(--brand, #C4D824); --smc-on-brand: var(--on-brand, #0B0B0C); --smc-brand-band: var(--brand-band, rgba(196,216,36,.2)); --smc-brand-ink: var(--brand-ink, var(--brand, #C4D824));
  --smc-need: var(--c-need, #F5A524); --smc-need-ink: var(--c-need-ink, #FFC772); --smc-need-band: var(--c-need-band, rgba(245,165,36,.15));
  --smc-done-ink: var(--c-done-ink, #72E4AE); --smc-done-band: var(--c-done-band, rgba(63,207,142,.13));
  --smc-money-ink: var(--c-money-ink, #8DC5FF); --smc-money-band: var(--c-money-band, rgba(77,163,255,.15));
  --smc-gray-band: var(--c-gray-band, rgba(255,255,255,.055));
  --smc-tint: .2; --smc-tint-x: .32;
  color: var(--smc-ink); font-size: 16px; display: block; position: relative;
}
:root[data-theme="light"] .smc { --smc-tint: .14; --smc-tint-x: .22; }
.smc button { font: inherit; color: inherit; cursor: pointer; }
.smc svg { display: block; flex: none; }

/* Toolbar: joined previous, Today, next; the range in words; the view switch. */
.smc-tb { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; flex-wrap: wrap; }
.smc-seg { display: inline-flex; border: 1px solid var(--smc-line2); border-radius: 11px; overflow: hidden; height: 44px; background: transparent; }
.smc-seg button { display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; min-height: 0 !important; height: 100% !important; border: 0 !important; border-left: 1px solid var(--smc-line2) !important; border-radius: 0 !important; background: transparent !important; font-size: 16px !important; font-weight: 650 !important; color: var(--smc-ink2) !important; box-shadow: none !important; }
.smc-seg button:first-child { border-left: 0 !important; }
.smc-seg button:hover { background: var(--smc-hover) !important; color: var(--smc-ink) !important; }
.smc-seg.smc-nav button { padding: 0 13px; }
.smc-views button.on { background: #fff !important; color: #16131C !important; }
:root[data-theme="light"] .smc-views button.on { background: #15161A !important; color: #fff !important; }
.smc-range { margin: 0 4px !important; font-size: 23px !important; line-height: 1.2 !important; font-weight: 780 !important; letter-spacing: -.01em; color: var(--smc-ink); }
.smc-grow { flex: 1; }

.smc-wrap { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 16px; align-items: start; }
.smc.smc-norail .smc-wrap { grid-template-columns: minmax(0,1fr); }
.smc-main { position: relative; min-width: 0; }
.smc-cal { position: relative; border: 1px solid var(--smc-line); border-radius: 16px; background: var(--smc-surface); overflow: hidden; }
.smc-cal.smc-has-aside { display: grid; grid-template-columns: minmax(0,1fr) 320px; }
.smc-aside { border-left: 1px solid var(--smc-line); padding: 18px 20px; min-width: 0; }

/* Week and day grid */
.smc-heads, .smc-allday, .smc-body { display: grid; }
.smc-h { text-align: center; padding: 10px 0 8px; border-left: 1px solid var(--smc-line); }
.smc-h small { display: block; font-size: 15px; font-weight: 700; color: var(--smc-ink3); letter-spacing: .05em; }
.smc-hd { display: inline-grid !important; place-items: center; width: 42px; height: 42px; min-height: 0 !important; padding: 0 !important; margin-top: 2px; border-radius: 99px !important; border: 0 !important; background: transparent !important; font-size: 23px !important; font-weight: 780 !important; color: var(--smc-ink) !important; }
.smc-hd:hover { background: var(--smc-hover) !important; }
.smc-h.today .smc-hd { background: var(--smc-brand) !important; color: var(--smc-on-brand) !important; }
.smc-allday { position: relative; border-top: 1px solid var(--smc-line); border-bottom: 1px solid var(--smc-line2); }
.smc-allday > div { border-left: 1px solid var(--smc-line); }
.smc-allday > .smc-lab { border-left: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: var(--smc-ink3); text-align: center; line-height: 1.1; }
.smc-span { position: absolute; height: 30px; min-height: 0 !important; padding: 0 10px !important; display: flex !important; align-items: center; gap: 8px; border: 0 !important; border-left: 4px solid rgb(var(--ev)) !important; border-radius: 7px !important; background: rgba(var(--ev), var(--smc-tint-x)) !important; color: var(--smc-ink) !important; font-size: 15px !important; font-weight: 700 !important; white-space: nowrap; overflow: hidden; text-align: left; }
.smc-span span { overflow: hidden; text-overflow: ellipsis; }
.smc-span svg { color: rgb(var(--ev)); }
.smc-scroll { max-height: max(460px, calc(100vh - 380px)); overflow-y: auto; overscroll-behavior: contain; }
.smc-body { position: relative; }
.smc-times > div { position: relative; }
.smc-times span { position: absolute; right: 8px; top: -10px; font-size: 15px; color: var(--smc-ink3); white-space: nowrap; }
.smc-col { position: relative; border-left: 1px solid var(--smc-line); background-image: linear-gradient(var(--smc-line) 1px, transparent 1px); cursor: default; }
.smc-col.today { background-color: rgba(var(--brand-rgb, 196,216,36), .06); }
.smc-ev { position: absolute; display: block !important; min-height: 0 !important; padding: 5px 8px !important; border: 0 !important; border-left: 4px solid rgb(var(--ev)) !important; border-radius: 8px !important; background: rgba(var(--ev), var(--smc-tint)) !important; text-align: left; overflow: hidden; line-height: 1.22; box-shadow: none !important; z-index: 1; }
.smc-ev:hover { background: rgba(var(--ev), var(--smc-tint-x)) !important; z-index: 9 !important; }
.smc-ev[style*="z-index"] { box-shadow: -2px 0 0 var(--smc-surface) !important; }
.smc-ev { background-color: var(--smc-surface) !important; background-image: linear-gradient(rgba(var(--ev), var(--smc-tint)), rgba(var(--ev), var(--smc-tint))) !important; }
.smc-ev:hover { background-image: linear-gradient(rgba(var(--ev), var(--smc-tint-x)), rgba(var(--ev), var(--smc-tint-x))) !important; }
.smc-ev b { display: block; font-size: 15.5px; font-weight: 720; color: var(--smc-ink); overflow: hidden; }
.smc-ev span { display: block; font-size: 15px; color: var(--smc-ink2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smc-ev.smc-short { padding-top: 2px !important; }
.smc-ev.smc-short b { white-space: nowrap; text-overflow: ellipsis; }
.smc-ev.smc-sel { box-shadow: 0 0 0 2px var(--smc-ink) !important; z-index: 10 !important; }
.smc-flag { position: absolute; top: 5px; right: 5px; width: 12px; height: 12px; border-radius: 99px; background: var(--smc-need); box-shadow: 0 0 0 2px var(--smc-surface); }
.smc-ev .smc-flag + b { padding-right: 14px; }
.smc-x b, .smc-x span:not(.smc-chip) { text-decoration: line-through; opacity: .75; }
.smc-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--smc-brand-ink); z-index: 4; pointer-events: none; }
.smc-now::before { content: ""; position: absolute; left: -6px; top: -5px; width: 12px; height: 12px; border-radius: 99px; background: var(--smc-brand-ink); }
.smc-overlay { position: absolute; left: 62px; right: 0; top: 46%; text-align: center; font-size: 17px; color: var(--smc-ink2); pointer-events: none; }
.smc-month .smc-overlay { left: 0; }
.smc-loading { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--smc-brand), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: smc-load 1s linear infinite; }
@keyframes smc-load { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) { .smc-loading { animation: none; background: var(--smc-brand); opacity: .4; } }

/* Month */
.smc-mheads { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); border-bottom: 1px solid var(--smc-line2); }
.smc-mheads div { text-align: center; padding: 10px 0; font-size: 15px; font-weight: 700; color: var(--smc-ink3); letter-spacing: .05em; }
.smc-mrow { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); border-top: 1px solid var(--smc-line); }
.smc-mrow:first-of-type { border-top: 0; }
.smc-mcell { min-height: 128px; padding: 4px 4px 6px; border-left: 1px solid var(--smc-line); min-width: 0; }
.smc-mcell:first-child { border-left: 0; }
.smc-mcell.dim { background: rgba(0,0,0,.12); }
.smc-mcell.dim .smc-mnum { color: var(--smc-ink3) !important; }
.smc-mnum { display: inline-grid !important; place-items: center; min-width: 32px; height: 32px; min-height: 0 !important; padding: 0 6px !important; border: 0 !important; border-radius: 99px !important; background: transparent !important; font-size: 16px !important; font-weight: 700 !important; color: var(--smc-ink) !important; }
.smc-mcell.today .smc-mnum { background: var(--smc-brand) !important; color: var(--smc-on-brand) !important; }
.smc-mlist { display: grid; gap: 3px; }
.smc-mchip { display: flex !important; align-items: center; gap: 6px; height: 28px; min-height: 0 !important; padding: 0 6px !important; border: 0 !important; border-left: 4px solid rgb(var(--ev)) !important; border-radius: 6px !important; background: rgba(var(--ev), var(--smc-tint)) !important; font-size: 15px !important; font-weight: 600 !important; text-align: left; overflow: hidden; white-space: nowrap; }
.smc-mchip i { font-style: normal; color: var(--smc-ink2); font-weight: 650; flex: none; }
.smc-mchip span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.smc-mchip .smc-dot { width: 9px; height: 9px; border-radius: 99px; background: var(--smc-need); flex: none; margin-left: auto; }
.smc-more { min-height: 0 !important; height: 26px; padding: 0 6px !important; border: 0 !important; background: transparent !important; color: var(--smc-brand-ink) !important; font-size: 15px !important; font-weight: 650 !important; text-align: left; }
.smc-mbar { position: absolute; height: 24px; min-height: 0 !important; padding: 0 8px !important; display: flex !important; align-items: center; border: 0 !important; border-left: 4px solid rgb(var(--ev)) !important; border-radius: 6px !important; background: rgba(var(--ev), var(--smc-tint-x)) !important; font-size: 15px !important; font-weight: 700 !important; white-space: nowrap; overflow: hidden; z-index: 1; }
.smc-mbar span { overflow: hidden; text-overflow: ellipsis; }

/* List (agenda) */
.smc-list { display: block; }
.smc-lday { padding: 11px 20px; background: var(--smc-gray-band); font-size: 16px; font-weight: 750; color: var(--smc-ink2); border-top: 1px solid var(--smc-line); }
.smc-lday:first-child { border-top: 0; }
.smc-lday.today { background: var(--smc-brand); color: var(--smc-on-brand); }
.smc-lrow { display: flex !important; align-items: center; gap: 16px; width: 100%; min-height: 70px !important; height: auto !important; padding: 12px 20px !important; border: 0 !important; border-top: 1px solid var(--smc-line) !important; border-radius: 0 !important; background: transparent !important; text-align: left; font-weight: 400 !important; }
.smc-lday + .smc-lrow { border-top: 0 !important; }
.smc-lrow:hover { background: var(--smc-hover) !important; }
.smc-lt { width: 96px; flex: none; }
.smc-lt b { display: block; font-size: 16.5px; font-weight: 720; }
.smc-lt small { display: block; font-size: 15px; color: var(--smc-ink3); margin-top: 2px; }
.smc-lstripe { width: 5px; align-self: stretch; border-radius: 4px; background: rgb(var(--ev)); flex: none; }
.smc-lm { min-width: 0; flex: 1; }
.smc-lm b { display: block; font-size: 17px; font-weight: 700; }
.smc-lm small { display: block; font-size: 15.5px; color: var(--smc-ink3); margin-top: 2px; }
.smc-lc { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.smc-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 15px; font-weight: 700; white-space: nowrap; background: var(--smc-gray-band); color: var(--smc-ink2); }
.smc-chip.need { background: var(--smc-need-band); color: var(--smc-need-ink); }
.smc-chip.done { background: var(--smc-done-band); color: var(--smc-done-ink); }
.smc-chip.money { background: var(--smc-money-band); color: var(--smc-money-ink); }
.smc-empty { padding: 34px 22px; font-size: 17px; color: var(--smc-ink2); }
.smc-link { min-height: 0 !important; height: auto !important; padding: 0 !important; border: 0 !important; background: none !important; color: var(--smc-brand-ink) !important; font-weight: 650 !important; font-size: 16px !important; }
.smc-link:hover { text-decoration: underline; }

/* Phone week strip */
.smc-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 10px 8px; border-bottom: 1px solid var(--smc-line2); }
.smc-strip button { display: grid !important; justify-items: center; gap: 2px; min-height: 0 !important; height: auto !important; padding: 6px 0 !important; border: 0 !important; border-radius: 10px !important; background: transparent !important; }
.smc-strip small { font-size: 15px; color: var(--smc-ink3); font-weight: 700; }
.smc-strip b { font-size: 18px; font-weight: 780; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 99px; }
.smc-strip .today b { background: var(--smc-brand); color: var(--smc-on-brand); }
.smc-strip i { width: 6px; height: 6px; border-radius: 99px; background: var(--smc-ink2); }

/* Right rail */
.smc-rail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.smc-box { border: 1px solid var(--smc-line); border-radius: 16px; background: var(--smc-surface); padding: 14px 16px; }
.smc-box h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px !important; font-size: 17px !important; line-height: 1.3 !important; font-weight: 750 !important; color: var(--smc-ink); }
.smc-box h3 > :last-child:not(:first-child) { margin-left: auto; }
.smc-mnav { display: flex; gap: 4px; }
.smc-mnav button { width: 32px; height: 32px; min-height: 0 !important; padding: 0 !important; display: grid !important; place-items: center; border: 0 !important; border-radius: 8px !important; background: transparent !important; color: var(--smc-ink2) !important; }
.smc-mnav button:hover { background: var(--smc-hover) !important; }
.smc-mini { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; row-gap: 2px; }
.smc-mini i { font-style: normal; font-size: 15px; font-weight: 700; color: var(--smc-ink3); height: 26px; line-height: 26px; }
.smc-mini button { height: 30px; min-height: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 99px !important; background: transparent !important; font-size: 15px !important; font-weight: 500 !important; color: var(--smc-ink2) !important; }
.smc-mini button:hover { background: var(--smc-hover) !important; }
.smc-mini button.wk { background: var(--smc-brand-band) !important; color: var(--smc-ink) !important; border-radius: 0 !important; }
.smc-mini button.d0 { border-radius: 99px 0 0 99px !important; }
.smc-mini button.d6 { border-radius: 0 99px 99px 0 !important; }
.smc-mini button.d0.d6 { border-radius: 99px !important; }
.smc-mini button.td { background: var(--smc-brand) !important; color: var(--smc-on-brand) !important; font-weight: 800 !important; }
.smc-mini button.dim { color: var(--smc-ink3) !important; opacity: .7; }
.smc-chk { display: flex !important; align-items: center; gap: 11px; min-height: 34px; font-size: 16px !important; color: var(--smc-ink2) !important; cursor: pointer; position: relative; padding: 0 !important; margin: 0 !important; font-weight: 500 !important; }
.smc-chk input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.smc-b { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; flex: none; border: 2px solid var(--smc-line2); color: transparent; }
.smc-chk input:checked + .smc-b { background: var(--c); border-color: var(--c); color: #0A0A0C; }
.smc-chk input:focus-visible + .smc-b { outline: 2px solid var(--smc-brand-ink); outline-offset: 2px; }
.smc-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smc-chk em { margin-left: auto; font-style: normal; font-size: 15px; color: var(--smc-ink3); }

/* Detail card: floats next to the block that was clicked. */
.smc-card { position: absolute; z-index: 30; background: var(--smc-raised); border: 1px solid var(--smc-line2); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.55); overflow: hidden; max-height: calc(100% - 16px); display: flex; flex-direction: column; }
:root[data-theme="light"] .smc-card { background: #fff; box-shadow: 0 24px 60px rgba(16,16,22,.22); }
.smc-card-h { padding: 16px 20px 14px; border-bottom: 1px solid var(--smc-line); }
.smc-card-row { display: flex; align-items: center; gap: 8px; }
.smc-tchip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 15px; font-weight: 700; background: rgba(var(--ev), .22); color: var(--smc-ink); border-left: 4px solid rgb(var(--ev)); }
.smc-x-btn { margin-left: auto; width: 36px; height: 36px; min-height: 0 !important; padding: 0 !important; display: grid !important; place-items: center; border: 0 !important; border-radius: 99px !important; background: transparent !important; color: var(--smc-ink3) !important; }
.smc-x-btn:hover { background: var(--smc-hover) !important; color: var(--smc-ink) !important; }
.smc-card h3 { margin: 10px 0 0 !important; font-size: 22px !important; line-height: 1.22 !important; font-weight: 780 !important; color: var(--smc-ink); }
.smc-card-h p { margin: 6px 0 0; font-size: 16px; line-height: 1.45; color: var(--smc-ink2); }
.smc-card-b { overflow-y: auto; }
.smc-card-wait { height: 48px; }
/* Pieces hosts use inside the card body. */
.smc-sec { padding: 12px 20px; border-bottom: 1px solid var(--smc-line); }
.smc-sec h4 { margin: 0 0 7px !important; font-size: 15px !important; font-weight: 750 !important; letter-spacing: .05em; text-transform: uppercase !important; color: var(--smc-ink3); }
.smc-tl { display: grid; grid-template-columns: 64px 1fr; row-gap: 4px; font-size: 16px; }
.smc-tl b { font-weight: 750; color: var(--smc-ink); }
.smc-tl span { color: var(--smc-ink2); }
.smc-tl .me { color: var(--smc-brand-ink); font-weight: 750; }
.smc-who { display: flex; gap: 8px; flex-wrap: wrap; }
.smc-line { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; color: var(--smc-ink2); margin: 8px 0 0; line-height: 1.4; }
.smc-line svg { color: var(--smc-brand-ink); margin-top: 2px; }
.smc-names { font-size: 15.5px; color: var(--smc-ink2); margin-top: 8px; line-height: 1.45; }
.smc-ft { display: flex; gap: 10px; padding: 14px 20px; align-items: center; flex-wrap: wrap; }

@media (max-width: 1180px) {
  .smc-wrap { grid-template-columns: minmax(0,1fr); }
  .smc-rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .smc-cal.smc-has-aside { grid-template-columns: minmax(0,1fr); }
  .smc-aside { border-left: 0; border-top: 1px solid var(--smc-line); }
}
.smc.smc-phone .smc-rail { display: none; }
.smc.smc-phone .smc-range { font-size: 20px !important; }
.smc.smc-phone .smc-lt { width: 78px; }
.smc.smc-phone .smc-lrow { flex-wrap: wrap; padding: 12px 14px !important; gap: 12px; }
.smc.smc-phone .smc-lc { width: 100%; justify-content: flex-start; padding-left: 95px; }
.smc.smc-phone .smc-lc:empty { display: none; }
.smc.smc-phone .smc-card { position: fixed; left: 8px !important; right: 8px; top: auto !important; bottom: 8px; width: auto !important; max-height: 80vh; }
