/* ====== ZÁKLAD ====== */
body {
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 0;
  padding: 0;
}

header {
  background-color: #4da6ff;
  color: white;
  padding: 1em;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.5em 1em;
}
nav a { color: white; text-decoration: none; margin: 0.5em; }
nav select { font-size: 1em; }

/* Hlavní container stránky (stejný rytmus jako grid) */
#main {
  padding: 2em 0;
  max-width: 1400px;
  margin: 0 auto;
}

/* Popis nahoře – zarovnaný se sloupci */
.description-text{
  max-width: 1400px;
  margin: 0 auto 1rem auto;
  padding: 0 1rem;
  color: #444;
  line-height: 1.5;
  font-size: 1.05em;

  /* ↓ přidané */
  text-align: justify;        /* zarovnání do bloku */
  text-justify: inter-word;   /* lepší rozložení mezer */
  text-indent: 2rem;          /* „tabulátor“ – odsazení 1. řádku */
  hyphens: auto;              /* dělení slov dle lang="cs" */
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

/* ====== GRID: KOLO + DIAGRAM ====== */
.studio-grid {
  max-width: 1400px;
  margin: 1rem auto 2rem;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr 1.5fr; /* pravý sloupec širší */
  gap: 2rem;
}
@media (max-width: 980px) {
  .studio-grid { grid-template-columns: 1fr; }
}

/* ====== KOLO ====== */
#wheel {
  width: 420px;
  height: 420px;
  margin: 0 auto;
  border: 4px solid rgba(100, 100, 100, 0.4);
  border-radius: 50%;
  position: relative;
  background-color: rgba(200, 200, 200, 0.05);
  z-index: 1;              /* + kolo pod notami */
}

.note {
  position: absolute;
  width: 80px;
  text-align: center;
  transform-origin: 50% 250px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  z-index: 2;              /* + noty nad kolem i nad ostatními vrstvami */
}

.tonic { color: red; font-size: 1.6em !important; text-decoration: underline; }
.subdominant { color: green; }
.dominant { color: blue; }
.label { font-size: 0.8em; display: block; }

/* Ovládání pod kolem */
#controls, #mode-select { margin-top: 1em; }
select, label { font-size: 1em; margin: 0.5em; }
button {
  font-size: 1em;
  margin: 0.5em;
  padding: 0.3em 0.6em;
  background-color: #eee;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}
button:hover { background-color: #ddd; }

/* Separator – přes celou šířku containeru, pod oběma sloupci */
#separator {
  width: calc(100% - 2rem);   /* 2× padding 1rem z .studio-grid */
  max-width: 1400px;
  height: 3px;
  background-color: #999;
  margin: 2em auto;
}

/* ====== LEGENDA ====== */
#legend-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1em;
  margin-top: 2em;
}
#legend {
  font-size: 0.95em;
  background-color: #f9f9f9;
  padding: 1em 2em;
  border: 1px solid #ccc;
  border-radius: 5px;
  min-width: 280px;
  max-width: 100%;
  box-sizing: border-box;
  text-align: left;
  white-space: nowrap;
}
#legend span {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.3em;
  vertical-align: middle;
}
.legend-tonic { background-color: red; }
.legend-subdominant { background-color: green; }
.legend-dominant { background-color: blue; }

#toggleSound {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 9999 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* ====== BPMN DIAGRAM (vpravo) ====== */
.bpmn-canvas{
  width:100%;
  /* dynamická, ale menší výška => méně prázdna */
  height: clamp(320px, 48vh, 520px);
  border:1px solid #ccc;
  background:#fff;
  border-radius:6px;
  box-shadow:0 1px 4px rgba(0,0,0,.06);
  box-sizing: border-box;
}

/* zvětšit popisky v boxech i naše „podboxové“ labely */
.djs-shape .djs-visual text,
.djs-label,
.bpmn-label{
  font-size: 21px !important;
  font-weight: 600;
  fill: #111 !important;
}

/* volitelně o trochu větší lane popisky (nechceš-li, smaž) */
.djs-lane .djs-visual text {
  font-size: 13px !important;
  font-weight: 600;
}

/* Červený ukazatel – puntík doprostřed boxu */
.bpmn-marker{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 6px rgba(239,68,68,.25), 0 10px 22px rgba(0,0,0,.35);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Barevné swimlany (Tercie modrá, Kvinta fialovo-červená, Septima okrová) */
.djs-shape[data-element-id="Lane_Thirds"]   .djs-visual > rect:first-child { fill:#cfe8ff !important; fill-opacity:.85; }
.djs-shape[data-element-id="Lane_Fifths"]   .djs-visual > rect:first-child { fill:#e7c8f1 !important; fill-opacity:.85; }
.djs-shape[data-element-id="Lane_Sevenths"] .djs-visual > rect:first-child { fill:#ffe3a6 !important; fill-opacity:.9; }
/* Nápis mezi sekcemi */
.djs-container text[data-element-id="Label_ChurchMode"] { font-size: 15px !important; font-weight: bold; fill: #333 !important; text-anchor: start;}

/* Spodní lane (Ionian, Dorian…) */
/*.djs-container [data-element-id="Lane_Mode"] rect { fill: #e8fbe8 !important;stroke: #a8d5a2;} */

/* Zvýraznění 3./5./7. boxu v horní „Stupnici“ */
.djs-shape[data-element-id="S_2"] .djs-visual > rect:first-child { fill:#cfe8ff !important; }
.djs-shape[data-element-id="S_4"] .djs-visual > rect:first-child { fill:#e7c8f1 !important; }
.djs-shape[data-element-id="S_6"] .djs-visual > rect:first-child { fill:#ffe3a6 !important; }

/* Tečkované svislé association linky */
.djs-connection[data-element-id^="Assoc_"] .djs-visual path { stroke-dasharray:5 4; }

/* Popisek akordu pod boxem */
.bpmn-label{ font-size:12px; color:#333; white-space:nowrap; pointer-events:none; }

/* „Půltón / Semitone“ – pilulka uprostřed šipky */
.semitone-pill{
  position: relative;
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  color: #064e3b;
  background: #a7f3d0;
  border: 1px solid #34d399;
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
  transform: translateX(-50%);
  pointer-events: none;
  white-space: nowrap;
}
/* Zelená tečka pro půltón (overlay na šipkách v horní lane) */
.semi-dot{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981; /* emerald-500 */
  box-shadow: 0 0 0 6px rgba(16,185,129,.25), 0 8px 18px rgba(0,0,0,.25);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
/* Zelená tečka + popisek nad ní (půltón / semitone) */
.semi-wrap { position: relative; }
.semi-dot{
  width:10px; height:10px; border-radius:9999px;
  background:#10b981;                      /* emerald-500 */
  box-shadow:0 0 0 4px rgba(16,185,129,.25), 0 8px 16px rgba(0,0,0,.25);
}
/* malý „pill“ štítek nad tečkou */
.semi-label{
  position:absolute; bottom:100%; left:50%;
  transform: translate(-50%, -6px);
  padding: 2px 10px; font-size:12px; font-weight:700; line-height:1.4;
  color:#064e3b; background:#a7f3d0; border:1px solid #34d399; border-radius:9999px;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
  white-space: nowrap; pointer-events:none;
}



/* ====== VÝPIS AKORDŮ / HMATNÍK ====== */
#chord-display { margin-top: 1em; font-size: 1.2em; }

#fretboard {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1em;
  margin: 2em auto;
}
.fretboard td {
  width: 40px;
  height: 40px;
  border: 1px solid #ccc;
  text-align: center;
  vertical-align: middle;
  font-weight: bold;
}
.fretboard .in-chord { background-color: #cceeff; }
.fretboard .root { background-color: #4da6ff; color: white; }

.chord-diagram-wrapper {
  display: inline-block;
  text-align: center;
  margin: 0 10px;
}

/* Poznámka pod Hmatníkem */
.fretboard-note {
  max-width: 800px;
  margin: 0.5em auto 2em;
  padding: 0 1em;
  color: #555;
  line-height: 1.5;
  font-size: 0.98em;
}

/* ====== FOOTER & COOKIES ====== */
footer {
  background-color: #4da6ff;
  color: white;
  padding: 1em;
  text-align: center;
  font-size: 0.9em;
}
.site-footer {
  margin-top: 3em;
  font-size: 0.9em;
  background-color: #4da6ff;
  color: #fff;
  text-align: center;
  padding: 1em;
}

.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #333;
  color: #fff;
  padding: 1em;
  font-size: 0.9em;
  text-align: center;
  z-index: 9999;
}
.cookie-button {
  margin-left: 1em;
  padding: 0.3em 0.7em;
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

/* ====== RESPONSIVE ====== */
@media screen and (max-width: 980px) {
  #wheel { width: 360px; height: 360px; }
}
/* číslo stupně v kole */
.note .deg-badge{
  display:inline-block;
  margin-left:6px;
  padding:2px 6px;
  border-radius:999px;
  font-size:.75em;
  background:#eef2ff;
  color:#1f2937;
  vertical-align:middle;
}
.note .deg-badge .deg-word{
  margin-left:4px;
  opacity:.75;
  font-size:.85em;
}

@media screen and (max-width: 600px) {
  .note { font-size: 1em; width: 60px; }
  #legend {
    white-space: normal;
    min-width: auto;
    width: 100%;
    max-width: 90vw;
    text-align: center;
  }
  #legend-container { flex-direction: column; align-items: center; }
  .fretboard-note { font-size: 0.95em; }
}

/* pravý vysouvací panel */
.drawer{
  position: fixed;
  top: 0; right: 0;
  width: min(560px, 92vw);
  height: 100dvh;
  background: #fff;
  box-shadow: -18px 0 40px rgba(0,0,0,.18);
  transform: translateX(100%);
  transition: transform .28s ease;
  z-index: 4000;
  display: flex;                 /* ⬅ header + iframe pod sebou */
  flex-direction: column;
}
.drawer.open, .drawer.is-open { transform: translateX(0); }

/* horní lišta v draweru */
.drawer-bar{
  flex: 0 0 44px;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: #fff;
  border-left: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}
.drawer-title{ font-weight: 600; }

/* tlačítko close už není absolutní – sedí v liště vpravo */
.drawer-close{
  position: static;
  margin-left: auto;
  width: 32px; height: 32px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-size: 20px; line-height: 28px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

/* iframe zabere zbytek výšky */
.drawer-iframe{
  flex: 1 1 auto;                /* ⬅ místo pevné height:100% */
  min-height: 0;                 /* fix pro overflow ve flex kontejnerech */
  width: 100%;
  border: 0;
}



