/* BandMan – Oberflaeche */

:root {
  --leiste-hoehe: 0px;          /* wird zur Laufzeit gesetzt */
  --luft-oben: 24px;            /* Abstand des aktiven Abschnitts zur Leiste */
}

body {
  background: #000; color: #fff; font-family: Arial, sans-serif; margin: 0;
  overflow: hidden; display: flex; flex-direction: column; height: 100vh;
}

/* ---------- Bedienleiste ---------- */
#controls {
  background: #222; padding: 10px; z-index: 100; display: flex; align-items: center;
  justify-content: center; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid #444;
  width: 100%; box-sizing: border-box; flex: 0 0 auto;
}
.control-group { display: flex; align-items: center; gap: 4px; }
select, button, input { font-size: clamp(0.8rem, 2vw, 1.1rem); padding: 8px 12px; border-radius: 5px; cursor: pointer; }
select { background: #333; color: white; border: 1px solid #555; max-width: 180px; min-width: 120px; }
.nav-btn { background: #555; color: white; border: none; font-weight: bold; }
button { background: #4CAF50; color: white; border: none; font-weight: bold; }
button.stop { background: #f44336; }
button.edit { background: #2196F3; }
button.setlist-btn { background: #9C27B0; }
button.song-btn { background: #2196F3; }
button.print-btn { background: #607D8B; }
button:disabled { opacity: .4; cursor: not-allowed; }

button.start-big, button.manual-btn {
  background: #4CAF50; color: white; border: none; font-weight: bold;
  font-size: clamp(2.5rem, 6vw, 4rem); padding: 25px 70px; border-radius: 14px;
}
button.manual-btn { background: #FF9800; }
button.manual-btn.active { background: #f44336; }
.btn-mode.hidden { display: none !important; }

/* ---------- Steuerungsanzeige ---------- */
#leader-bar {
  background: #14181f; color: #9aa2c8; border-bottom: 1px solid #333;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 6px 10px; font-size: .95rem; flex: 0 0 auto;
}
#leader-bar.fuehrend { background: #14301c; color: #9be7a8; }
#leader-name { font-weight: bold; color: #ff9800; }
#uebernehmen-btn { padding: 4px 12px; font-size: .9rem; background: #2196F3; }
#zeit-korrektur { display: none; gap: 6px; align-items: center; }
#zeit-korrektur.sichtbar { display: flex; }
#zeit-korrektur button { padding: 4px 10px; font-size: .9rem; background: #555; }
#uhr-status { font-family: monospace; font-size: .8rem; color: #666; }

/* ---------- Textbereich ---------- */
#lyrics-container { flex: 1 1 auto; position: relative; overflow: hidden; width: 100%; }
#lyrics-container.manual-mode { overflow: auto; }
#lyrics {
  position: absolute; width: 100%;
  transition: transform 0.15s linear;
  padding-top: var(--luft-oben);
  padding-bottom: 60vh;
}
#lyrics-container.manual-mode #lyrics { position: relative; }
#lyrics-container.manual-mode .section { color: #ff9800; }

.section {
  padding: 0 10px 30px 10px; text-align: center; color: #555;
  transition: color 0.5s; white-space: pre-wrap; line-height: 1.4;
  font-size: clamp(1rem, 3vw, 2.2rem);
}
.section.active {
  color: #ff9800;
  font-size: clamp(1.2rem, 4.5vw, 2.5rem);
  text-shadow: 0 0 10px rgba(255, 152, 0, 0.4);
}
.chord { color: #ffeb3b; font-weight: bold; }
.heading { color: #ff5252; font-weight: bold; text-transform: uppercase; font-size: 0.6em; display: block; margin-bottom: -10px; }
.yellow-text { color: #ffeb3b; font-weight: bold; }

/* ---------- Dialoge ---------- */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 200; padding: 15px; overflow-y: auto; box-sizing: border-box; }
.editor-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; background: #222; padding: 10px; border-radius: 5px; }
.ed-time { width: 80px; font-size: 1.2rem; text-align: center; background: #111; color: #fff; border: 1px solid #555; }
.ed-text { flex: 1; min-width: 200px; height: 80px; font-size: 1rem; background: #111; color: #fff; border: 1px solid #555; resize: vertical; }
.ed-controls { display: flex; flex-direction: column; gap: 4px; width: 40px; }
.ed-controls button { padding: 5px; flex: 1; font-size: 1.2rem; }
.feld-zeile { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-bottom: 15px; }
.feld { display: flex; flex-direction: column; gap: 4px; }
.feld label { font-size: .8rem; color: #aaa; }
.feld input { background: #111; color: #fff; border: 1px solid #555; font-size: 1.1rem; }
.sl-container { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 20px; }
.sl-col { flex: 1; min-width: 250px; background: #222; padding: 15px; border-radius: 5px; }
.sl-item { padding: 10px; background: #111; margin-bottom: 5px; border-radius: 4px; border: 1px solid #444; font-size: 1.2rem; display: flex; justify-content: space-between; align-items: center; }
.sl-item:hover { background: #1a1a1a; }
.sl-item span { cursor: pointer; flex: 1; }
.sl-item.remove span { color: #ff5252; }
.sl-item.add span { color: #4CAF50; }
.pw-feld { position: relative; width: 100%; }
.pw-auge {
  position: absolute; left: 2px; top: 50%; transform: translateY(-50%);
  background: #333; border: 1px solid #666; border-radius: 3px; cursor: pointer;
  color: #ccc; font-size: 0.9rem; padding: 4px 6px; z-index: 1; line-height: 1;
}
.pw-feld input { padding-left: 40px; }

/* ---------- Rollen ---------- */
body.role-editor #admin-btn { display: none !important; }
body.role-viewer .auth-create-song,
body.role-viewer .auth-create-setlist,
body.role-viewer .auth-edit,
body.role-viewer #admin-btn { display: none !important; }

/* ---------- Druck ---------- */
@media print {
  body { background: #fff !important; color: #000 !important; overflow: auto !important; height: auto !important; display: block !important; }
  #controls, .modal, #leader-bar { display: none !important; }
  #lyrics-container { height: auto !important; overflow: visible !important; display: block !important; margin-top: 0 !important; }
  #lyrics { position: static !important; transform: none !important; padding: 0 !important; }
  .section { font-size: 14pt !important; color: #000 !important; padding: 15px 0 !important; text-align: left !important; page-break-inside: avoid !important; }
  .section.active { font-size: 14pt !important; color: #000 !important; text-shadow: none !important; }
  .chord { color: #555 !important; }
  .heading { color: #000 !important; font-size: 10pt !important; text-decoration: underline; margin-bottom: 0; }
  .yellow-text { color: #000 !important; border: 1px solid #000; padding: 2px 5px; display: inline-block; margin-top: 5px; }
}
