/* MovidB: pannello dei dati (shortcode [movidb]). Nessun carattere o risorsa da servizi di terzi. */
.movidb { --bg: linear-gradient(155deg, #3A414E, #171923); --surface: #232A34; --ink: #E9EDF3; --ink2: #B5BDC8; --muted: #8995AD; --line: #3A4250; --sel: rgba(255,255,255,.07); --pillbd: #B5BDC8; --pillfg: #D5DAE2; --tgbg: #E9EDF3; --tgfg: #171923; --hatch1: #2A313C; --hatch2: #3B4452;
  container-type: inline-size; box-sizing: border-box; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bg); border-radius: 16px; padding: 24px; margin: 24px 0; }
.movidb[data-theme="chiaro"] { --bg: #F2F4F7; --surface: #FFFFFF; --ink: #141922; --ink2: #4A5463; --muted: #6B7686; --line: #E1E5EB; --sel: #EEF1F6; --pillbd: #E8691A; --pillfg: #B34700; --tgbg: #141922; --tgfg: #FFFFFF; --hatch1: #F2F4F7; --hatch2: #E1E5EB; }
.movidb[data-width="piena"] { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); border-radius: 0; padding: 40px max(16px, calc((100vw - 1180px) / 2)); }
/* spostato fuori dalla colonna del tema: la larghezza e' gia' quella del contenitore, niente 100vw */
.movidb[data-width="piena"][data-moved="1"] { width: auto; max-width: none; margin-left: 0; margin-right: 0; padding-left: max(16px, calc((100% - 1180px) / 2)); padding-right: max(16px, calc((100% - 1180px) / 2)); }
.movidb *, .movidb *::before, .movidb *::after { box-sizing: border-box; }
.movidb button { font: inherit; color: inherit; cursor: pointer; }
.movidb button:focus-visible { outline: 2px solid #FF8F3D; outline-offset: 2px; }
.movidb .mv-wrap { display: flex; flex-direction: column; gap: 24px; }
.mv-top { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.mv-date { display: flex; align-items: center; gap: 8px; }
.mv-btn { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; padding: 0; }
.mv-btn[disabled] { opacity: .4; cursor: default; }
.mv-dlabel { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; padding: 0 16px; font-size: 15px; font-weight: 600; text-transform: none; }
.mv-wx { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; gap: 8px; padding: 0 14px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mv-wx svg { flex: none; color: var(--ink2); }
.mv-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.mv-legend { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink2); }
.mv-legend > div { display: flex; gap: 2px; }
.mv-legend i { display: flex; flex-direction: column; align-items: center; gap: 4px; font-style: normal; font-variant-numeric: tabular-nums; font-size: 11px; }
.mv-legend b { display: block; width: 52px; height: 18px; border-radius: 4px; }
.mv-pill { font-size: 13px; font-weight: 600; color: var(--pillfg); border: 1px solid var(--pillbd); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.mv-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; }
.mv-row, .mv-head { display: grid; grid-template-columns: 230px minmax(0, 1fr) 70px 60px; gap: 6px; align-items: center; width: 100%; }
.mv-head { font-size: 12px; font-weight: 600; color: var(--ink2); padding-bottom: 4px; }
.mv-hours, .mv-cells { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.mv-hours span { text-align: center; }
.mv-row { background: transparent; border: 0; border-radius: 10px; padding: 3px 0; text-align: left; margin-top: 6px; }
.mv-row[aria-pressed="true"] { background: var(--sel); }
.mv-row:hover { background: var(--sel); }
.mv-name { font-size: 14px; padding-left: 8px; overflow-wrap: anywhere; font-weight: 500; }
.mv-row[aria-pressed="true"] .mv-name { font-weight: 700; }
.mv-cell { height: 44px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; border-radius: 6px; font-variant-numeric: tabular-nums; }
.mv-cell.na { background: repeating-linear-gradient(135deg, var(--hatch1) 0 5px, var(--hatch2) 5px 6px); color: var(--muted); font-weight: 400; }
.mv-tot { height: 44px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; border-radius: 6px; font-variant-numeric: tabular-nums; border: 2px solid var(--ink); }
.mv-rowhrs { display: none; }
.mv-n { text-align: center; font-size: 13px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.mv-note { font-size: 12px; color: var(--muted); padding-top: 10px; }
.mv-detail { display: flex; gap: 28px; align-items: stretch; }
.mv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.mv-dh { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mv-dh h3 { margin: 0; font-size: 17px; font-weight: 700; color: var(--ink); }
.mv-toggle { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mv-toggle button { border: 0; background: var(--surface); color: var(--ink2); padding: 7px 12px; font-size: 13px; font-weight: 600; }
.mv-toggle button[aria-pressed="true"] { background: var(--tgbg); color: var(--tgfg); }
.mv-plotwrap { margin-left: 34px; margin-right: 150px; }
.mv-plot { position: relative; height: 262px; }
.mv-grid { position: absolute; left: -34px; right: -150px; height: 0; display: flex; align-items: center; gap: 6px; }
.mv-grid span { width: 28px; text-align: right; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mv-grid i { flex: 1; height: 1px; background: var(--line); }
.mv-lim { position: absolute; left: 0; right: -150px; height: 0; display: flex; align-items: center; }
.mv-lim i { flex: 1; height: 0; border-top: 1.5px dashed var(--ink2); }
.mv-lim span { width: 148px; padding-left: 8px; font-size: 11px; color: var(--ink2); line-height: 1; }
.mv-bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); }
.mv-bar { position: relative; }
.mv-bar b { position: absolute; left: 50%; width: 32px; margin-left: -16px; bottom: 0; border-radius: 4px 4px 0 0; }
.mv-bar u { position: absolute; left: 50%; width: 40px; margin-left: -20px; height: 3px; background: var(--ink); border-radius: 2px; }
/* il numero e' il Leq della fascia e sta dentro la barra, in cima: la riga bianca e' il massimo e non lo tocca */
.mv-bar em { position: absolute; left: 0; right: 0; text-align: center; font-size: 12px; font-weight: 700; font-style: normal; font-variant-numeric: tabular-nums; margin-bottom: -20px; pointer-events: none; }
.mv-bar em.out { margin-bottom: 4px; color: var(--ink); }
.mv-xl { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); font-size: 12px; color: var(--ink2); text-align: center; margin-top: 10px; }
.mv-xl span { display: flex; flex-direction: column; gap: 2px; }
.mv-xl b { color: var(--ink); font-weight: 600; }
.mv-xl small { font-size: 11px; }
.mv-key { display: flex; gap: 20px; font-size: 12px; color: var(--ink2); align-items: center; flex-wrap: wrap; }
.mv-key span { display: flex; align-items: center; gap: 6px; }
.mv-key i { display: inline-block; }
.mv-stats { width: 200px; display: flex; flex-direction: column; gap: 14px; border-left: 1px solid var(--line); padding-left: 24px; flex-shrink: 0; }
.mv-stats small { display: block; font-size: 12px; color: var(--ink2); }
.mv-stats strong { display: block; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mv-stats .big { font-size: 44px; letter-spacing: -.02em; line-height: 1.1; }
.mv-stats .big span { font-size: 16px; font-weight: 500; color: var(--ink2); }
.mv-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.movidb .mv-table { table-layout: fixed; max-width: 100%; margin: 0; border: 0 !important; background: transparent; }
.movidb .mv-table th, .movidb .mv-table td { text-align: right; padding: 8px 10px; border: 0 !important; border-bottom: 1px solid var(--line) !important; background: transparent !important; overflow-wrap: anywhere; }
.movidb .mv-table th:first-child, .movidb .mv-table td:first-child { text-align: left; }
.mv-table th { font-size: 12px; color: var(--ink2); font-weight: 600; }
.mv-msg { padding: 28px 8px; text-align: center; color: var(--ink2); }
.mv-foot { font-size: 12px; line-height: 1.5; color: var(--muted); max-width: 980px; }
.mv-foot a { color: var(--ink2); }
.mv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* telefono o colonna stretta: le righe diventano schede */
@container (max-width: 820px) {
  .movidb[data-width="piena"] { padding-left: 16px; padding-right: 16px; }
  .mv-head { display: none; }
  .mv-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name tot" "n tot" "hrs hrs" "cells cells"; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 10px; gap: 8px 12px; }
  .mv-row[aria-pressed="true"] { border: 2px solid #FF8F3D; background: var(--surface); }
  .mv-name { grid-area: name; padding-left: 0; font-size: 15px; font-weight: 600; }
  .mv-n { grid-area: n; text-align: left; font-size: 12px; }
  .mv-tot { grid-area: tot; width: 64px; font-size: 24px; border: 0; }
  .mv-rowhrs { grid-area: hrs; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; font-size: 10px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
  .mv-cells { grid-area: cells; gap: 3px; }
  .mv-cell { height: 24px; font-size: 10px; border-radius: 4px; }
  .mv-card.mv-matrix { padding: 4px 0 0; background: transparent; border: 0; }
  .mv-detail { flex-direction: column; gap: 16px; }
  .mv-stats { width: auto; border-left: 0; border-top: 1px solid var(--line); padding: 16px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .mv-plotwrap { margin-right: 0; }
  .mv-grid, .mv-lim { right: 0; }
  .mv-lim span { display: none; }
  .mv-plot { height: 176px; }
  .mv-bar b { width: 18px; margin-left: -9px; }
  .mv-bar u { width: 22px; margin-left: -11px; }
  .mv-bar em { font-size: 10px; }
  .mv-xl small { display: none; }
  .mv-xl { font-size: 10px; }
  .mv-dh { flex-wrap: wrap; }
  .mv-card { padding: 16px 14px; }
  .movidb .mv-table th, .movidb .mv-table td { padding: 8px 4px; font-size: 13px; }
  .mv-right { width: 100%; }
  .mv-legend { flex-direction: column-reverse; align-items: stretch; gap: 6px; width: 100%; }
  .mv-legend > div { width: 100%; }
  .mv-legend i { flex: 1 1 0; min-width: 0; }
  .mv-legend b { width: 100%; }
  .mv-dh h3 { font-size: 15px; }
  .mv-dlabel { font-size: 14px; flex: 1; justify-content: center; }
  .mv-date { flex: 1 1 100%; }
}
