/* /charts/guitar-chord-chart, /charts/ukulele-chord-chart, /charts/piano-chord-chart.
   Loaded by layouts/_partials/charts/pages/chord-chart.html, after extras.css and chart-print.css.
   Screen: the chord pages are white sheets in black ink (like the worksheets); the other blocks are on the dark page.
   Print: only the .mtp-sheet blocks are printed (chart-print.css). Sizes below are for A4 / Letter with 14 mm margins:
   the chord diagrams are drawn 1 css px = 1 px, so their text (10.67 px = 8 pt) and everything else printed is 7.5 pt or larger. */

/* The bundled Source Sans 3 / Cormorant Garamond files have no sharp, flat or natural sign, so the browser falls back to a system font whose
   signs have wide side bearings and sit at different heights on every machine. VexFlow's Bravura (already used for the staff pictures on other
   charts) has proper ones: the template wraps every visible accidental in <span class="acc"> and this lends Bravura for those three signs only. */
@font-face { font-family: 'MtpAcc'; src: url('/vendor/vexflow/fonts/bravura.woff2') format('woff2'); font-style: normal; font-weight: 400 700; unicode-range: U+266D-266F; font-display: swap; }
.acc { font-family: 'MtpAcc', 'Source Sans 3', sans-serif; font-style: normal; font-weight: 400; font-size: 1.4em; line-height: 0; position: relative; top: -.12em; margin: 0 .03em; }

/* ---- tools row and quick answer ------------------------------------------------ */
.cc-jump { margin: 10px 0 0 !important; font-size: 14px; line-height: 1.8; color: var(--mtp-muted); }
.cc-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 18px; }
.cc-tools[hidden] { display: none; }
.cc-tools .mtp-play { margin-left: 0; padding: 8px 14px; min-height: 40px; box-sizing: border-box; }

/* ---- the white chord pages ------------------------------------------------------ */
.mtp-cc-sheet { padding: 22px 24px 18px; }
.mtp-cc-sheet .mtp-ws-head h2 { font-size: 30px; }
.cc-block { margin: 0 0 4px; }
.mtp-cc-sheet .cc-block-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 12px 0 5px; padding-bottom: 2px; border-bottom: 1.5px solid #111; font-size: 20px; line-height: 1.15; }
.mtp-cc-sheet .cc-count { font-family: "Source Sans 3", -apple-system, "Segoe UI", sans-serif; font-size: 12px; font-weight: 400; color: #333; }
.cc-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px 2px; }
.cc-cols-7 .cc-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cc-cell { margin: 0; text-align: center; break-inside: avoid; min-width: 0; }
.cc-name { display: block; min-height: 16px; font-size: 13px; font-weight: 700; line-height: 1.25; color: #111; white-space: nowrap; }
.cc-cell svg { display: block; margin: 2px auto 0; max-width: 100%; height: auto; overflow: visible; }
.cc-fb text, .cc-kb text { font-family: "Source Sans 3", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; }
.cc-tab { margin: 2px 0 0; font-size: 11.5px; line-height: 1.2; color: #222; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mtp-cc-sheet .cc-legend { margin: 10px 0 0; font-size: 12px; line-height: 1.4; color: #222; }
.mtp-cc-sheet .mtp-play { margin: 0 0 0 5px; padding: 0 6px; min-height: 20px; font-size: 10px; color: #111; border-color: #111; background: #fff; vertical-align: top; }
.cc-cell.is-live { cursor: pointer; }
.cc-cell.is-live:hover .cc-name { text-decoration: underline; }
.cc-cell.is-playing svg { outline: 2px solid #111; outline-offset: 1px; }
.mtp-cc-sheet .mtp-play:hover, .mtp-cc-sheet .mtp-play:focus-visible { background: #eee; color: #111; }
.mtp-cc-sheet .mtp-play.is-playing, .mtp-cc-sheet .cc-cell.is-playing .mtp-play { background: #111; color: #fff; }
.cc-block-head .mtp-play { font-size: 11px; font-family: "Source Sans 3", -apple-system, "Segoe UI", sans-serif; }

/* piano inversions page */
.cc-inv-row { display: flex; flex-wrap: wrap; gap: 0 18px; padding: 2px 0 3px; border-bottom: 1px solid #bbb; break-inside: avoid; }
.cc-inv-row:first-child { padding-top: 0; }
.cc-inv-set { min-width: 0; }
.mtp-cc-sheet .cc-inv-name { margin: 5px 0 1px; font-size: 15px; line-height: 1.15; font-weight: 700; }
.cc-inv-forms { display: flex; flex-wrap: nowrap; gap: 0 4px; }
.cc-inv-cell { flex: 0 0 auto; }
.cc-inv-cell .cc-name { font-size: 11.5px; min-height: 14px; font-weight: 600; }
.cc-inv-cell .cc-tab { font-size: 11px; }
.mtp-cc-sheet .cc-inv-h3 { margin: 10px 0 3px; font-size: 17px; }
.cc-inv-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.mtp-cc-sheet .cc-inv-table th, .mtp-cc-sheet .cc-inv-table td { padding: 1.5px 5px; border-bottom: 1px solid #bbb; text-align: left; white-space: nowrap; }
.mtp-cc-sheet .cc-inv-table thead th { border-bottom: 1.5px solid #111; font-size: 11px; font-weight: 700; }

/* ---- screen blocks on the dark page ---------------------------------------------- */
.mtp-cc-block { margin: 0 0 36px; }
.mtp-cc-block > h2 { margin-top: 0; }
.mtp-cc-block > p { max-width: 76ch; line-height: 1.65; }
.mtp-cc-block h3 { margin: 22px 0 8px; font-size: 1.3rem; }
.cc-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }

.cc-read-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 18px 34px; align-items: start; }
.cc-read-pics { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 22px; padding: 16px 12px 12px; background: #fff; color: #111; border-radius: 2px; }
.cc-legend-fig { margin: 0; text-align: center; font-size: 13px; color: #111; }
.cc-legend-fig svg { display: block; margin: 0 auto 4px; max-width: 100%; height: auto; }
.cc-read-list { margin: 0; padding-left: 1.2em; line-height: 1.6; max-width: 70ch; }
.cc-read-list li { margin: 0 0 7px; }
.cc-read-list code, .cc-move code, .cc-lookup td { font-variant-numeric: tabular-nums; }

.cc-tuning { max-width: 440px; }
.cc-chip { display: inline-block; padding: 2px 9px; border: 1px solid transparent; border-radius: 2px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.5; }
.cc-chip.is-live { border-color: var(--mtp-brass); color: var(--mtp-brass-bright); cursor: pointer; }
.cc-chip.is-live:hover, .cc-chip.is-live:focus-visible { background: rgba(196, 154, 73, .16); color: var(--mtp-paper); outline: none; }
.cc-chip.is-playing { background: var(--mtp-brass); color: #1a1209; }
.cc-nochip { display: inline-block; padding: 2px 9px; color: var(--mtp-muted); }
.cc-chip.cc-seq { white-space: nowrap; font-size: 14px; }

.cc-fam, .cc-progtable, .cc-move, .cc-rootmap, .cc-checks, .cc-lookup { font-variant-numeric: tabular-nums; }
.cc-fam caption { caption-side: top; text-align: left; padding: 0 0 6px; color: var(--mtp-muted); font-size: 13px; }
.cc-fam thead th small { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--mtp-muted); }
.cc-fam td, .cc-progtable td { white-space: nowrap; }
.mtp-chart-page .cc-fam thead th, .mtp-chart-page .cc-progtable thead th { text-transform: none; letter-spacing: 0; font-size: 14px; }
.mtp-chart-page .cc-progtable th, .mtp-chart-page .cc-progtable td { padding: 7px 8px; }
.mtp-chart-page .cc-progtable .cc-chip { padding: 1px 6px; font-size: 13px; }
.cc-rootmap td, .cc-rootmap th { text-align: center; }
.cc-rootmap tbody th { text-align: left; white-space: nowrap; }

.cc-real-box { margin: 0 0 14px; padding: 14px 18px; background: var(--mtp-raised); border: 1px solid var(--mtp-line); border-left: 3px solid var(--mtp-brass); border-radius: 2px; }
.cc-real-answer { margin: 0; max-width: 74ch; font-size: 16px; line-height: 1.6; }
.cc-real-list { max-width: 74ch; margin: 0 0 14px; padding-left: 1.2em; line-height: 1.6; }
.cc-real-list li { margin: 0 0 6px; }
.cc-warn { max-width: 74ch; margin: 12px 0 0; padding: 12px 16px; border: 1px solid var(--mtp-line); border-left: 3px solid #c0803a; border-radius: 2px; font-size: 14.5px; line-height: 1.6; color: var(--mtp-muted); }
.cc-warn strong { color: var(--mtp-paper); }

.cc-rule { max-width: 76ch; padding-left: 1.3em; line-height: 1.6; }
.cc-rule li { margin: 0 0 8px; }
.cc-mit { margin: 8px 0 12px; padding: 0; border: 0; max-width: 76ch; }
.cc-mit pre { margin: 0; padding: 12px 14px; white-space: pre-wrap; word-break: break-word; font-size: 12px; line-height: 1.5; background: var(--mtp-raised); border: 1px solid var(--mtp-line); border-radius: 2px; color: var(--mtp-muted); }
.cc-details summary { cursor: pointer; color: var(--mtp-brass-bright); font-weight: 600; margin: 4px 0 10px; }
.cc-faq h3 { margin: 22px 0 6px; font-size: 1.2rem; color: var(--mtp-brass-bright); }
.cc-faq p { max-width: 74ch; margin: 0 0 6px; line-height: 1.65; }

/* ---- narrow screens ------------------------------------------------------------------ */
@media screen and (max-width: 900px) {
  .cc-read-grid { grid-template-columns: minmax(0, 1fr); }
}
@media screen and (max-width: 720px) {
  .mtp-cc-sheet { padding: 14px 12px 12px; }
  .mtp-cc-sheet .mtp-ws-head h2 { font-size: 24px; }
  .cc-grid, .cc-cols-7 .cc-grid, .cc-cols-6 .cc-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px 4px; }
  .cc-inv-forms { flex-wrap: wrap; }
  .cc-inv-table { display: block; overflow-x: auto; max-width: 100%; }
  .cc-tab { white-space: normal; }
}

/* ---- print ------------------------------------------------------------------------------ */
@media print {
  .mtp-cc-sheet { padding: 0; }
  .mtp-cc-sheet .mtp-ws-head { margin-bottom: 4pt; padding-bottom: 3pt; }
  .mtp-cc-sheet .mtp-ws-head h2 { font-size: 22pt; }
  .cc-block { margin: 0; break-inside: avoid; }
  .mtp-cc-sheet .cc-block-head { margin: 7pt 0 3pt; font-size: 14pt; padding-bottom: 1pt; border-bottom-color: #000; }
  .mtp-cc-sheet .cc-count { font-size: 8pt; }
  .cc-grid { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; gap: 4pt 0; }
  .cc-cols-7 .cc-grid { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; }
  .cc-name { font-size: 8.2pt; min-height: 11pt; }
  .cc-tab { font-size: 8pt; margin-top: 1pt; }
  .mtp-cc-sheet .cc-legend { font-size: 8pt; line-height: 1.3; margin-top: 6pt; }
  .cc-inv-row { gap: 0 12pt; padding: 1pt 0 2pt; }
  .mtp-cc-sheet .cc-inv-name { font-size: 10.5pt; margin: 3pt 0 0; }
  .cc-inv-cell .cc-name { font-size: 8pt; min-height: 10pt; }
  .cc-inv-cell .cc-tab { font-size: 8pt; }
  .cc-inv-table { font-size: 8pt; }
  .mtp-cc-sheet .cc-inv-table th, .mtp-cc-sheet .cc-inv-table td { padding: .5pt 4pt; border-bottom-color: #666; }
  .mtp-cc-sheet .cc-inv-h3 { font-size: 12pt; margin: 8pt 0 2pt; }
  .cc-fb *, .cc-kb * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
