/* Meeting recording player for city meeting cards (meeting-video-v1): owner-approved Nov 12, 2026.
   The city's own Granicus player, opened in place on each past-meeting card, with an agenda-item jump
   list and a mini-player that follows the reader. Mounted by meeting-video.js on a page whose record
   supplies #meeting-video-data. */
#meetings .mv,
.mv-dialog .mv {
  --mv-navy: #082f49;
  --mv-ink: #122f3f;
  --mv-muted: #5e717a;
  --mv-line: #d5dedd;
  --mv-paper: #fbf8ef;
  --mv-gold: #876019;
  --mv-gold-soft: rgba(224, 189, 104, 0.18);
  --mv-teal: #16766f;
  --mv-teal-ink: #0d625d;
  --mv-brick: #9a4f3c;
  --mv-comment: #2f6f68;
  --mv-screen: #0b1d2a;
  position: relative;
  color: var(--mv-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: left;
}
.mv *, .mv *::before, .mv *::after { box-sizing: border-box; }
.mv-grid { display: grid; gap: 12px 18px; }
.mv-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Screen: a 16:9 box that keeps its place on the page; the stage inside it can float. */
.mv-box { grid-area: box; position: relative; aspect-ratio: 16 / 9; min-width: 0; background: var(--mv-screen); overflow: hidden; }
.mv-stage { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--mv-screen); }
.mv-screen { position: relative; flex: 1; overflow: hidden; }
.mv-screen iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; background: #000; transform-origin: 0 0; }
.mv-dockbar { display: none; }
.mv-away { position: absolute; inset: 0; display: none; place-content: center; justify-items: center; gap: 10px; padding: 12px; color: #d9e6ec; font-size: 13px; line-height: 1.4; text-align: center; }
.mv-box.is-away .mv-away { display: grid; }
.mv-away button { appearance: none; border: 1px solid rgba(255, 255, 255, 0.5); background: transparent; color: #fff; font: 800 11px/1.2 Inter, sans-serif; letter-spacing: 0.04em; text-transform: uppercase; padding: 8px 12px; cursor: pointer; }
.mv-away button:hover { background: rgba(255, 255, 255, 0.12); }

.mv-poster { appearance: none; position: absolute; inset: 0; display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: var(--mv-screen); cursor: pointer; }
.mv-poster img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0.9; transition: opacity 0.15s; }
.mv-poster:hover img { opacity: 1; }
.mv-poster:focus-visible { outline: 3px solid #e0bd68; outline-offset: -3px; }
.mv-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 68px; height: 68px; transform: translate(-50%, -50%); border: 2px solid rgba(255, 255, 255, 0.9); border-radius: 50%; background: rgba(8, 47, 73, 0.88); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); transition: background 0.15s; }
.mv-play svg { width: 26px; height: 26px; margin-left: 4px; fill: #fff; }
.mv-poster:hover .mv-play { background: var(--mv-teal); }
.mv-dur, .mv-src { position: absolute; bottom: 8px; padding: 4px 6px; background: rgba(5, 18, 28, 0.84); font: 800 11px/1 Inter, sans-serif; }
.mv-dur { right: 8px; color: #fff; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.mv-src { left: 8px; color: #e0bd68; font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 6px; }

/* Text */
.mv-info { grid-area: info; min-width: 0; align-self: end; }
.mv-eyebrow { margin: 0 0 4px; color: var(--mv-gold); font-size: 11px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.mv-title { margin: 0; color: var(--mv-navy); font: 500 22px/1.2 Georgia, "Times New Roman", serif; }
.mv-meta { margin: 4px 0 0; color: var(--mv-muted); font-size: 13px; line-height: 1.45; }
.mv-status { display: none; margin: 4px 0 0; color: var(--mv-teal-ink); font-size: 13px; font-weight: 700; line-height: 1.45; }
.mv.is-playing .mv-status { display: block; }
.mv-chips { grid-area: chips; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; align-self: start; }
.mv-chip { appearance: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid rgba(8, 47, 73, 0.2); background: #fff; color: var(--mv-navy); font: 700 11.5px/1.2 Inter, sans-serif; cursor: pointer; text-align: left; }
.mv-chip b { color: var(--mv-teal-ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.mv-chip:hover { border-color: var(--mv-teal); background: #f1f8f6; }

/* Buttons */
.mv-tools { grid-area: tools; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.mv-btn { appearance: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid rgba(22, 118, 111, 0.32); border-radius: 0; background: #fff; color: var(--mv-teal-ink); font: 800 11px/1.2 Inter, sans-serif; letter-spacing: 0.03em; text-transform: uppercase; text-decoration: none; white-space: nowrap; cursor: pointer; }
.mv-btn:hover { border-color: var(--mv-teal); background: #f1f8f6; }
.mv-btn-primary { border-color: var(--mv-navy); background: var(--mv-navy); color: #fff; }
.mv-btn-primary:hover { border-color: var(--mv-teal); background: var(--mv-teal); }
.mv-btn svg { width: 12px; height: 12px; fill: currentColor; flex: none; }
.mv-lang { display: inline-flex; border: 1px solid rgba(8, 47, 73, 0.22); }
.mv-lang button { appearance: none; padding: 7px 10px; border: 0; background: #fff; color: var(--mv-ink); font: 700 11.5px/1.2 Inter, sans-serif; cursor: pointer; }
.mv-lang button[aria-pressed="true"] { background: var(--mv-navy); color: #fff; }
.mv button:focus-visible, .mv a:focus-visible { outline: 2px solid var(--mv-gold); outline-offset: 2px; }

/* Agenda-item list */
.mv-side { grid-area: side; display: none; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid var(--mv-line); background: #fff; contain: size; }
.mv-side-head { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 9px 12px; border-bottom: 1px solid var(--mv-line); background: var(--mv-paper); color: var(--mv-muted); font-size: 11.5px; line-height: 1.35; }
.mv-side-head strong { color: var(--mv-navy); font-size: 13px; }
.mv-list { flex: 1; min-height: 0; margin: 0; padding: 0; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.mv-row { appearance: none; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; width: 100%; padding: 9px 12px 9px 9px; border: 0; border-bottom: 1px solid #edf0ee; border-left: 3px solid transparent; background: #fff; color: var(--mv-ink); font: inherit; text-align: left; cursor: pointer; }
.mv-row:hover { background: #f4f7f5; }
.mv-row.is-active { border-left-color: var(--mv-gold); background: var(--mv-gold-soft); }
.mv-row-time { color: var(--mv-teal-ink); font: 800 12px/1.35 Inter, sans-serif; font-variant-numeric: tabular-nums; }
.mv-row-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 7px; }
.mv-row-code { color: var(--mv-navy); font-size: 11px; font-weight: 800; }
.mv-row-kind { font-size: 9.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.mv-row-now { display: none; color: var(--mv-gold); font-size: 9.5px; font-weight: 900; letter-spacing: 0.07em; text-transform: uppercase; }
.mv-row.is-active .mv-row-now { display: inline; }
.mv-row-title { display: -webkit-box; margin-top: 2px; overflow: hidden; font-size: 12.5px; line-height: 1.38; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.k-comment { color: var(--mv-comment); }
.k-comms, .k-presentation { color: var(--mv-brick); }
.k-discussion, .k-hearing, .k-consent { color: var(--mv-navy); }
.k-closed, .k-other { color: var(--mv-muted); }
.mv-note { grid-area: note; display: none; margin: 0; color: var(--mv-muted); font-size: 12px; line-height: 1.45; }

/* Which controls show in which state */
.mv.is-compact [data-when="open"],
.mv.is-open [data-when="compact"],
.mv:not(.mv-s2) [data-when="s2"],
.mv.mv-s2 [data-when="not-s2"],
.mv:not(.has-es) .mv-lang,
.mv:not(.has-chapters) .mv-side,
.mv:not(.has-chapters) .mv-chips { display: none !important; }

/* Compact recording bar (styles 1 and 3) */
.mv-s1, .mv-s3 { margin: 18px 24px 0; padding: 14px 16px; border: 1px solid var(--mv-line); border-left: 4px solid var(--mv-gold); background: linear-gradient(135deg, rgba(224, 189, 104, 0.12), rgba(255, 255, 255, 0) 60%), #fff; }
.mv.is-compact .mv-grid { grid-template-columns: 208px minmax(0, 1fr) auto; grid-template-areas: "box info tools" "box chips tools"; align-items: center; }
.mv.is-compact .mv-play { width: 44px; height: 44px; }
.mv.is-compact .mv-play svg { width: 17px; height: 17px; margin-left: 3px; }
.mv.is-compact .mv-src { display: none; }

/* Open player with agenda list (style 1 open, style 2 expanded, pop-out window) */
.mv.is-open .mv-grid { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "info tools" "box side" "note note"; align-items: start; }
.mv.is-open .mv-side { display: flex; align-self: stretch; }
.mv.is-open .mv-note { display: block; }
.mv.is-open .mv-tools { align-self: end; }

/* Narrow containers (set by script from the player's own width) */
.mv-narrow.is-compact .mv-grid { grid-template-columns: 132px minmax(0, 1fr); grid-template-areas: "box info" "chips chips" "tools tools"; }
.mv-narrow.is-compact .mv-play { width: 36px; height: 36px; }
.mv-narrow.is-compact .mv-play svg { width: 14px; height: 14px; }
.mv-narrow.is-compact .mv-title { font-size: 18px; }
.mv-narrow.is-compact .mv-meta { font-size: 12px; }
.mv-narrow .mv-tools { justify-content: flex-start; }
.mv-narrow.is-open .mv-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "info" "tools" "box" "side" "note"; }
.mv-narrow.is-open .mv-side { height: 300px; }
.mv-meta-short { display: none; }
.mv-narrow .mv-wide-only { display: none; }
.mv-narrow.is-compact .mv-meta-long, .mv-s2.is-compact .mv-meta-long { display: none; }
.mv-narrow.is-compact .mv-meta-short, .mv-s2.is-compact .mv-meta-short { display: inline; }
.mv-narrow.is-compact:not(.mv-s2) .mv-eyebrow { display: none; }
@media (max-width: 640px) {
  .mv-s1, .mv-s3 { margin: 16px 14px 0; padding: 12px; }
  .mv-narrow.is-open .mv-ext span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mv-narrow.is-open .mv-ext svg { width: 14px; height: 14px; }
}

/* Style 2: small player in the card header */
.meeting-report.mv-host-s2 .meeting-report-header { grid-template-columns: minmax(0, 1fr) minmax(300px, 420px) !important; align-items: start; }
.meeting-report.mv-host-s2:not(.mv-host-open) .meeting-date-badge { display: none !important; }
.meeting-report.mv-host-s2.mv-host-open .meeting-report-header { grid-template-columns: minmax(0, 1fr) auto !important; }
.meeting-report.mv-host-s2.mv-host-open .mv { grid-column: 1 / -1; }
.mv-s2 { margin: 0; }
.mv-s2 .mv-chips { display: none !important; }
.mv-s2 .mv-eyebrow, .mv-s2 .mv-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mv-s2.is-compact .mv-grid { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "box box" "info tools"; gap: 8px 10px; align-items: center; }
.mv-s2.is-compact .mv-info { align-self: center; }
.mv-s2.is-compact .mv-meta, .mv-s2.is-compact .mv-status { margin: 0; font-size: 12px; }
.mv-s2.is-compact.is-playing .mv-meta { display: none; }
.mv-s2.is-compact .mv-src { display: none; }
.mv-s2.is-compact .mv-play { width: 56px; height: 56px; }
.mv-s2.is-compact .mv-play svg { width: 21px; height: 21px; }
.mv-s2.is-open { margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--mv-line); }
@media (max-width: 960px) {
  .meeting-report.mv-host-s2 .meeting-report-header { grid-template-columns: minmax(0, 1fr) auto !important; }
  .meeting-report.mv-host-s2 .meeting-date-badge { display: block !important; }
  .meeting-report.mv-host-s2 .mv { grid-column: 1 / -1; }
}

/* Mini-player while scrolling */
.mv-stage.is-docked { position: fixed; inset: auto 16px calc(var(--mv-bar-h, 0px) + 16px) auto; z-index: 2500; width: 400px; border: 1px solid rgba(224, 189, 104, 0.65); box-shadow: 0 18px 44px rgba(5, 22, 34, 0.45); }
.mv-stage.is-docked .mv-dockbar { display: flex; }
.mv-stage.is-docked .mv-screen { flex: none; aspect-ratio: 16 / 9; }
.mv-dockbar { align-items: center; gap: 4px; height: 34px; padding: 0 4px 0 10px; background: var(--mv-navy); color: #fff; font: 700 12px/1.2 Inter, sans-serif; }
.mv-dock-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-dockbar button { appearance: none; display: grid; place-items: center; width: 30px; height: 28px; border: 0; background: transparent; color: #fff; font-size: 15px; cursor: pointer; }
.mv-dockbar button:hover { background: rgba(255, 255, 255, 0.14); }
.mv-dockbar svg { width: 14px; height: 14px; fill: currentColor; }
@media (max-width: 640px) {
  .mv-stage.is-docked { right: 10px; width: min(66vw, 300px); }
}

/* Recording links in the Meetings cards that now play on the page */
#meetings a.mv-plays-here .ptp-external-link-icon { font-size: 0.85em; }

/* Pop-out window */
.mv-dialog { width: min(1180px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; border-top: 5px solid #876019; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); overflow: auto; }
.mv-dialog::backdrop { background: rgba(5, 18, 28, 0.74); }
.mv-dialog .mv { padding: 18px 20px 20px; }
html:has(.mv-dialog[open]) { overflow: hidden; }
@media (max-width: 640px) {
  .mv-dialog { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-top-width: 4px; }
  .mv-dialog .mv { padding: 14px 16px 18px; }
}

/* A past-meeting card that has a recording but no recap yet: the card's own note sits under the player.
   (Same look as the note on office pages, assets/countywide-office-design.css.) */
#meetings .meeting-report .meeting-empty-note { margin: 16px 24px 0; padding: 14px 18px; border-left: 4px solid #cba24d; background: #faf5e9; color: #304c5c; font-size: 14px; line-height: 1.55; }
#meetings .meeting-report .meeting-empty-note + .meeting-public-comments { margin-top: 18px; }
@media (max-width: 640px) {
  #meetings .meeting-report .meeting-empty-note { margin: 14px 14px 0; padding: 12px 14px; }
}
