/* My Schedule & Attendance Case — inherits the parent theme's --sss-* tokens when present, neutral fallbacks otherwise. */
.msc-layout, .msc-side, .msc-bar, .msc-case, .msc-star, .msc-doc { --msc-void: var(--sss-void, #0b0c10); --msc-deck: var(--sss-deck, #12141a); --msc-panel: var(--sss-panel, #1a1d26); --msc-line: var(--sss-line, #262a35); --msc-line-2: var(--sss-line-2, #333846); --msc-ink: var(--sss-ink, #f0f1f4); --msc-ink-2: var(--sss-ink-2, #c5c9d2); --msc-mut: var(--sss-mut, #8f95a3); --msc-red: var(--sss-red, #e0402f); --msc-red-surface: var(--sss-red-surface, #db2e23); --msc-red-2: var(--sss-red-2, #c7361f); --msc-white: var(--sss-white, #fff); --msc-mono: var(--sss-mono, ui-monospace, monospace); --msc-display: var(--sss-display, inherit); --msc-nav-h: var(--sss-nav-h, 96px); }
.msc-layout *, .msc-side *, .msc-bar *, .msc-case * { box-sizing: border-box; }
/* .msc-btn declares `display:inline-flex`, which has the same specificity as the browser's UA rule for [hidden]
   and wins because it comes later. Force [hidden] to work on plugin elements — required for the CTA to disappear
   when no sessions are starred. */
.msc-btn[hidden], .msc-side [hidden], .msc-bar [hidden], .msc-case [hidden] { display: none !important; }

/* Layout: agenda block + sidebar */
.msc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.msc-layout__main { min-width: 0; }
.msc-side { position: sticky; top: calc(var(--msc-nav-h) + 24px); }
.msc-panel { border: 1px solid var(--msc-line); background: var(--msc-void); padding: 24px 24px 20px; }
.msc-panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.msc-kicker { font-family: var(--msc-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--msc-red); }
.msc-count { display: inline-block; min-width: 22px; padding: 0 6px; margin-left: 4px; text-align: center; border: 1px solid var(--msc-red); color: var(--msc-red); }
.msc-close { display: none; background: none; border: 0; color: var(--msc-ink); font-size: 26px; line-height: 1; cursor: pointer; width: 44px; height: 44px; margin: -10px -12px -10px 0; }
.msc-list { list-style: none; margin: 0 0 18px; padding: 0; max-height: 50vh; overflow: auto; }
.msc-list[hidden] { display: none; }
.msc-day { font-family: var(--msc-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--msc-mut); padding: 12px 0 4px; }
.msc-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) 32px; gap: 8px; align-items: start; padding: 8px 0; border-top: 1px solid var(--msc-line); font-size: 14px; color: var(--msc-ink); }
.msc-item__time { font-family: var(--msc-mono); font-size: 12px; color: var(--msc-mut); padding-top: 2px; }
.msc-item__title { line-height: 1.3; }
.msc-item__title a { color: inherit; text-decoration: none; }
.msc-item__title a:hover { color: var(--msc-red); }
.msc-item__room { display: block; font-size: 12px; color: var(--msc-mut); margin-top: 2px; }
.msc-item__remove { background: none; border: 1px solid var(--msc-line-2); color: var(--msc-mut); width: 32px; height: 32px; cursor: pointer; font-size: 16px; line-height: 1; }
.msc-item__remove:hover { border-color: var(--msc-ink); color: var(--msc-ink); }
.msc-empty { color: var(--msc-mut); font-size: 15px; margin: 0 0 18px; }
.msc-empty[hidden] { display: none; }
.msc-panel__foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.msc-link { background: none; border: 0; padding: 8px 0; color: var(--msc-mut); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.msc-link:hover { color: var(--msc-red); }

/* Inline "copy by hand" field shown after a copy action */
.msc-reveal { margin-top: 10px; }
.msc-reveal label { display: block; font-family: var(--msc-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--msc-mut); margin-bottom: 4px; }
.msc-reveal input { width: 100%; font: inherit; font-size: 13px; background: var(--msc-deck); border: 1px solid var(--msc-line-2); color: var(--msc-ink); padding: 8px 10px; border-radius: 0; }
.msc-panel__foot { flex-wrap: wrap; }
.msc-panel__foot .msc-reveal { flex-basis: 100%; }

/* Buttons (match the theme's primary/ghost) */
.msc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 44px; padding: 12px 22px; background: var(--msc-red-surface); color: var(--msc-white); font-family: var(--msc-display); font-weight: 600; font-size: 15px; line-height: 1.4; border: 0; cursor: pointer; text-decoration: none; transition: background .15s; }
.msc-btn:hover { background: var(--msc-red-2); color: var(--msc-white); }
.msc-btn--ghost { background: transparent; border: 1px solid var(--msc-line-2); color: var(--msc-ink); }
.msc-btn--ghost:hover { background: transparent; border-color: var(--msc-ink); color: var(--msc-ink); }
.msc-btn--sm { width: auto; min-height: 40px; padding: 8px 16px; font-size: 14px; }
.msc-btn:focus-visible, .msc-star:focus-visible, .msc-link:focus-visible { outline: 2px solid var(--msc-red); outline-offset: 2px; }

/* Star button: top-right corner of every regular session card */
.satnews-agenda-card.msc-has-star { position: relative; }
.msc-star { position: absolute; top: 20px; right: 24px; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px; background: var(--msc-void); border: 1px solid var(--msc-line-2); color: var(--msc-ink-2); font-family: var(--msc-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: border-color .15s, color .15s, background .15s; z-index: 1; }
.msc-star:hover { border-color: var(--msc-ink); color: var(--msc-ink); }
.msc-star__icon { font-size: 15px; line-height: 1; }
.msc-star[aria-pressed="true"] { border-color: var(--msc-red); color: var(--msc-red); background: var(--msc-panel); }
/* Keep card content clear of the absolutely-positioned star at top-right.
   Applies on ALL screen widths — some parent themes (e.g. SVSW) don't have the sponsor column that would
   otherwise absorb the button's space, so the star used to overlap the title/time on desktop. */
.msc-has-star .satnews-agenda-card__title,
.msc-has-star .satnews-agenda-card__time { padding-right: 200px; }
.msc-has-star .satnews-agenda-card__sponsor { padding-top: 52px; }
/* swimlane (Stages view): compact icon-only star */
.satnews-agenda-card--swimlane .msc-star { top: 10px; right: 10px; min-height: 32px; padding: 4px 8px; }
.satnews-agenda-card--swimlane .msc-star__label { display: none; }

/* Mobile bar + drawer */
.msc-bar { display: none; }
@media (max-width: 1100px) {
	.msc-layout { grid-template-columns: 1fr; gap: 0; }
	.msc-side { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60; transform: translateY(100%); transition: transform .2s ease; }
	.msc-side.is-open { transform: none; }
	.msc-side .msc-panel { border-left: 0; border-right: 0; border-bottom: 0; max-height: 75vh; overflow: auto; background: var(--msc-deck); padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
	.msc-close { display: block; }
	.msc-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px calc(10px + env(safe-area-inset-bottom)); background: var(--msc-deck); border-top: 1px solid var(--msc-line-2); }
	.msc-bar[hidden] { display: none; }
	.msc-bar__toggle { background: none; border: 0; color: var(--msc-ink); font-family: var(--msc-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; min-height: 44px; padding: 0; cursor: pointer; }
	.msc-bar__toggle [data-msc-count] { color: var(--msc-red); }
	body.msc-bar-visible { padding-bottom: 72px; }
	.msc-star { top: 14px; right: 16px; min-height: 40px; }
	.msc-has-star .satnews-agenda-card__title,
	.msc-has-star .satnews-agenda-card__time { padding-right: 200px; }
}

/* Case page */
.msc-case { max-width: 1320px; margin: 0 auto; padding: 72px var(--sss-gutter, 40px) 96px; }
.msc-case__head { margin-bottom: 48px; }
.msc-case__title { font-family: var(--msc-display); font-size: clamp(48px, 6vw, 96px); font-weight: 800; font-stretch: 72%; text-transform: uppercase; line-height: .9; margin: 14px 0 20px; color: var(--msc-ink); }
.msc-lede { font-size: 19px; color: var(--msc-ink-2); margin: 0; max-width: 760px; }
.msc-case__grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 48px; align-items: start; }
.msc-form { position: sticky; top: calc(var(--msc-nav-h) + 24px); border: 1px solid var(--msc-line); background: var(--msc-void); padding: 28px; }
.msc-field { margin-bottom: 14px; }
.msc-field label { display: block; font-size: 14px; color: var(--msc-mut); margin-bottom: 6px; }
.msc-field input, .msc-field select, .msc-field textarea { width: 100%; font: inherit; font-size: 16px; background: var(--msc-void); border: 1px solid var(--msc-line-2); color: var(--msc-ink); padding: 12px 14px; border-radius: 0; }
.msc-field input:focus, .msc-field select:focus, .msc-field textarea:focus { outline: none; border-color: var(--msc-red); }
.msc-actions { display: grid; gap: 10px; margin-top: 22px; }
.msc-form__note { min-height: 1.4em; font-size: 14px; color: var(--msc-mut); margin: 12px 0 0; }
.msc-form__links { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0 0; font-size: 14px; }
.msc-form__links a { color: var(--msc-mut); text-decoration: none; }
.msc-form__links a:hover { color: var(--msc-red); }

/* The letter: a light sheet, printed as-is */
.msc-doc { --doc-ink: #111; --doc-mut: #555; --doc-line: #d9dce3; background: #fff; color: var(--doc-ink); padding: 56px 64px; font-family: var(--msc-display); font-size: 15px; line-height: 1.55; min-height: 600px; }
.msc-doc a { color: inherit; }
.msc-doc__loading, .msc-doc__none { color: var(--doc-mut); }
.msc-doc__meta { display: flex; justify-content: space-between; gap: 24px; font-family: var(--msc-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--doc-mut); border-bottom: 1px solid var(--doc-line); padding-bottom: 14px; margin-bottom: 28px; }
.msc-doc h1 { font-family: var(--msc-display); font-size: 44px; font-weight: 800; font-stretch: 72%; text-transform: uppercase; line-height: .92; letter-spacing: -.005em; margin: 0 0 24px; color: var(--doc-ink); }
.msc-doc h2 { font-family: var(--msc-display); font-size: 22px; font-weight: 700; font-stretch: 75%; text-transform: uppercase; line-height: 1; margin: 32px 0 12px; color: var(--doc-ink); }
.msc-doc p { margin: 0 0 12px; }
.msc-doc__reasons { margin: 0; padding: 0; list-style: none; }
.msc-doc__reasons li { position: relative; padding: 9px 0 9px 22px; border-top: 1px solid var(--doc-line); }
.msc-doc__reasons li::before { content: "+"; position: absolute; left: 0; top: 8px; font-family: var(--msc-mono); color: var(--msc-red); }
.msc-doc__intro { color: var(--doc-mut); font-size: 13px; }
.msc-doc__sessions { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0 8px; }
.msc-doc__sessions th, .msc-doc__sessions td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--doc-line); }
.msc-doc__sessions th { font-family: var(--msc-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 400; color: var(--doc-mut); }
.msc-doc__when { white-space: nowrap; font-family: var(--msc-mono); font-size: 12px; color: var(--doc-mut); width: 130px; }
.msc-doc__when b { display: block; color: var(--doc-ink); font-weight: 500; }
.msc-doc__s-title { font-weight: 600; }
.msc-doc__s-meta { display: block; color: var(--doc-mut); font-size: 12px; margin-top: 2px; }
.msc-doc__s-desc { display: block; font-size: 13px; margin-top: 4px; }
.msc-doc__notes { border-left: 2px solid var(--msc-red); padding-left: 14px; margin: 16px 0; }
.msc-doc__foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--doc-line); font-family: var(--msc-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--doc-mut); }

@media (max-width: 560px) {
	.msc-star { width: 44px; height: 44px; min-height: 0; padding: 0; justify-content: center; top: 12px; right: 12px; }
	.msc-star__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.msc-star__icon { font-size: 18px; }
	.msc-has-star .satnews-agenda-card__title,
	.msc-has-star .satnews-agenda-card__time { padding-right: 56px; }
}

@media (max-width: 900px) {
	.msc-case { padding: 48px 20px 80px; }
	.msc-case__grid { grid-template-columns: 1fr; gap: 28px; }
	.msc-form { position: static; }
	.msc-doc { padding: 32px 22px; }
	.msc-doc h1 { font-size: 34px; }
	.msc-doc__when { width: 90px; }
}

/* Light-scheme override: paper panels, dark text — for sites with a white/light background. */
/* The letter (.msc-doc) already uses its own paper tokens (--doc-*), so it looks the same in both schemes. */
body.msc-scheme-light .msc-layout,
body.msc-scheme-light .msc-side,
body.msc-scheme-light .msc-bar,
body.msc-scheme-light .msc-case,
body.msc-scheme-light .msc-star,
body.msc-scheme-light .msc-doc {
	--msc-void: #ffffff;
	--msc-deck: #f6f7f9;
	--msc-panel: #eef0f3;
	--msc-line: #dde0e6;
	--msc-line-2: #c4c8d1;
	--msc-ink: #111318;
	--msc-ink-2: #3a3f4a;
	--msc-mut: #6a6f7a;
	--msc-red: var(--sss-red, #d02f22);
	--msc-red-surface: var(--sss-red-surface, #d02f22);
	--msc-red-2: var(--sss-red-2, #a92417);
	--msc-white: #ffffff;
}
/* On light sites the "form" panel wants a subtle border against the page, and the star sits on a light card. */
body.msc-scheme-light .msc-panel,
body.msc-scheme-light .msc-form { background: var(--msc-void); border-color: var(--msc-line-2); }
body.msc-scheme-light .msc-star { background: var(--msc-void); }
body.msc-scheme-light .msc-star[aria-pressed="true"] { background: #fff5f4; }

/* Print: the letter only, on white */
@media print {
	@page { margin: 16mm 18mm; }
	body { background: #fff !important; }
	body > *:not(.wp-site-blocks), .sss-tel, .sss-nav, .sss-cta, .sss-foot, .msc-case__head, .msc-form, .msc-bar, .msc-side, .wp-block-template-part { display: none !important; }
	.msc-case { padding: 0; max-width: none; }
	.msc-case__grid { display: block; }
	.msc-doc { padding: 0; min-height: 0; font-size: 12pt; }
	.msc-doc h1 { font-size: 28pt; }
	.msc-doc h2 { font-size: 15pt; page-break-after: avoid; }
	.msc-doc__sessions tr { page-break-inside: avoid; }
	.msc-doc__sessions th, .msc-doc__sessions td { font-size: 10.5pt; }
	a[href]::after { content: none !important; }
}
