/* Ceremoniemuziek Babs Vol Liefde
   Donkere basis, want de app wordt gebruikt in een schemerige ceremonieruimte.
   Alle raakvlakken zijn minimaal 56 px hoog, bediening met een duim staand voor een zaal. */

:root {
  --grond:        #1c1714;
  --grond-2:      #262019;
  --kaart:        #2f2721;
  --kaart-actief: #3d3128;
  --lijn:         #453a31;
  --accent:       #c39a7e;
  --accent-diep:  #8b6f5e;
  --tekst:        #f4ece5;
  --tekst-zacht:  #b6a596;
  --groen:        #7fb069;
  --rood:         #d98b7a;
  --radius:       16px;
  --veilig-onder: env(safe-area-inset-bottom, 0px);
  --veilig-boven: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Verborgen is verborgen, ook op elementen die zelf een display-regel hebben. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--grond);
  color: var(--tekst);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  overscroll-behavior-y: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(210px + var(--veilig-onder));
}

button { font-family: inherit; font-size: inherit; cursor: pointer; }

/* ---------- Inlogscherm ---------- */

.op-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-bottom: 24px;
}

.login-kaart {
  width: 100%;
  max-width: 380px;
  background: var(--grond-2);
  border: 1px solid var(--lijn);
  border-radius: 22px;
  padding: 36px 28px 28px;
  text-align: center;
}

.login-logo { color: var(--accent); margin-bottom: 10px; }

.login-kaart h1 {
  margin: 0;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.login-sub {
  margin: 4px 0 26px;
  color: var(--accent);
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-kaart label {
  display: block;
  text-align: left;
  font-size: 14px;
  color: var(--tekst-zacht);
  margin: 0 0 6px;
}

.login-kaart input {
  width: 100%;
  height: 54px;
  margin-bottom: 18px;
  padding: 0 16px;
  font-size: 17px;
  color: var(--tekst);
  background: var(--kaart);
  border: 1px solid var(--lijn);
  border-radius: 12px;
  -webkit-appearance: none;
}

.login-kaart input:focus {
  outline: none;
  border-color: var(--accent);
}

.knop-hoofd {
  width: 100%;
  height: 56px;
  margin-top: 6px;
  font-size: 17px;
  font-weight: 600;
  color: #241c16;
  background: var(--accent);
  border: none;
  border-radius: 12px;
}

.knop-hoofd:active { background: var(--accent-diep); }

.login-fout {
  margin: 0 0 16px;
  padding: 12px;
  font-size: 15px;
  color: var(--rood);
  background: rgba(217, 139, 122, 0.12);
  border-radius: 10px;
}

.login-tip { margin: 20px 0 0; font-size: 13px; color: var(--tekst-zacht); }

/* ---------- Kopbalk ---------- */

.balk {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 60px;
  padding: calc(10px + var(--veilig-boven)) 16px 10px;
  background: rgba(28, 23, 20, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--lijn);
}

.balk-terug {
  flex: none;
  width: 44px;
  height: 44px;
  margin-left: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: none;
  border: none;
}

.balk-titel { flex: 1; min-width: 0; }

.balk-titel > span:first-child {
  display: block;
  font-size: 19px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.balk-sub {
  display: block;
  font-size: 13px;
  color: var(--tekst-zacht);
}

.net-status {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--groen);
}

.net-status.offline { background: var(--tekst-zacht); }

/* ---------- Overzicht ceremonies ---------- */

.scherm { padding: 16px; }

.laden { color: var(--tekst-zacht); text-align: center; padding: 40px 0; }

.ceremonie {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 14px;
  padding: 20px;
  color: var(--tekst);
  background: var(--kaart);
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
}

.ceremonie:active { background: var(--kaart-actief); }

.ceremonie-naam { font-size: 20px; font-weight: 600; }

.ceremonie-regel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 14px;
  color: var(--tekst-zacht);
}

.merk-offline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--groen);
  background: rgba(127, 176, 105, 0.14);
  border-radius: 20px;
}

.leeg {
  padding: 40px 20px;
  text-align: center;
  color: var(--tekst-zacht);
}

/* ---------- Setlist ---------- */

.setlist-kop { margin-bottom: 18px; }

.setlist-meta {
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--tekst-zacht);
}

.setlist-acties { display: flex; gap: 10px; }

/* Op een telefoon onder elkaar, zodat beide knoppen vol breed en goed raakbaar zijn. */
@media (max-width: 520px) {
  .setlist-acties { flex-direction: column; }
  .knop-vlak { width: 100%; }
}

.knop-download {
  flex: 1;
  min-height: 52px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: #241c16;
  background: var(--accent);
  border: none;
  border-radius: 12px;
}

.knop-download.klaar {
  color: var(--groen);
  background: rgba(127, 176, 105, 0.14);
  border: 1px solid rgba(127, 176, 105, 0.4);
}

.knop-download:disabled { opacity: 0.7; }

.knop-vlak {
  flex: none;
  min-height: 52px;
  padding: 0 16px;
  font-size: 15px;
  color: var(--tekst);
  background: var(--kaart);
  border: 1px solid var(--lijn);
  border-radius: 12px;
}

.knop-vlak.aan {
  color: #241c16;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.download-balk {
  height: 5px;
  margin-top: 12px;
  background: var(--kaart);
  border-radius: 3px;
  overflow: hidden;
}

#download-voortgang {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.25s ease;
}

/* ---------- Nummers ---------- */

.nummers { list-style: none; margin: 0; padding: 0; }

.nummer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 14px;
  background: var(--kaart);
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
  transition: background 0.15s ease, transform 0.15s ease;
}

.nummer.speelt {
  background: var(--kaart-actief);
  border-color: var(--accent);
}

.nummer.sleept {
  opacity: 0.9;
  transform: scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.nummer-knop {
  flex: none;
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #241c16;
  background: var(--accent);
  border: none;
  border-radius: 50%;
}

.nummer-knop:active { background: var(--accent-diep); }

.nummer.speelt .nummer-knop { background: var(--tekst); }

.nummer-info { flex: 1; min-width: 0; }

.nummer-titel {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.nummer-notitie {
  margin-top: 3px;
  font-size: 14px;
  color: var(--accent);
}

.nummer-regel {
  margin-top: 3px;
  font-size: 13px;
  color: var(--tekst-zacht);
}

.nummer-pos {
  flex: none;
  width: 26px;
  font-size: 15px;
  font-weight: 600;
  color: var(--tekst-zacht);
  text-align: center;
}

/* Herschik-modus */

.nummer-schuif {
  flex: none;
  display: none;
  flex-direction: column;
  gap: 6px;
}

.schuif-knop {
  width: 52px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tekst);
  background: var(--grond-2);
  border: 1px solid var(--lijn);
  border-radius: 10px;
}

.schuif-knop:disabled { opacity: 0.3; }

.nummer-greep {
  flex: none;
  display: none;
  width: 46px;
  height: 56px;
  align-items: center;
  justify-content: center;
  color: var(--tekst-zacht);
  background: none;
  border: none;
  touch-action: none;
}

body.herschikken .nummer-knop { display: none; }
body.herschikken .nummer-schuif { display: flex; }
body.herschikken .nummer-greep { display: flex; }
body.herschikken .nummer { padding: 12px 14px; }
body.herschikken .speler { display: none; }

.voet-tip {
  margin: 22px 4px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--tekst-zacht);
}

/* ---------- Speler ---------- */

.speler {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 14px 18px calc(16px + var(--veilig-onder));
  background: rgba(38, 32, 25, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--lijn);
}

.speler-info { margin-bottom: 10px; }

.speler-titel {
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.speler-notitie {
  font-size: 13px;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.speler-tijdbalk {
  position: relative;
  height: 22px;
  display: flex;
  align-items: center;
}

.speler-tijdbalk::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--lijn);
  border-radius: 3px;
}

#tijdbalk-gevuld {
  position: absolute;
  left: 0;
  width: 0;
  height: 6px;
  background: var(--accent);
  border-radius: 3px;
  pointer-events: none;
}

#zoeker {
  position: relative;
  width: 100%;
  height: 22px;
  margin: 0;
  background: none;
  -webkit-appearance: none;
  appearance: none;
}

#zoeker::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--tekst);
  border: none;
  border-radius: 50%;
}

#zoeker::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--tekst);
  border: none;
  border-radius: 50%;
}

.speler-tijden {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--tekst-zacht);
}

.speler-knoppen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin-top: 10px;
}

.knop-rond {
  position: relative;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tekst);
  background: var(--kaart);
  border: 1px solid var(--lijn);
  border-radius: 50%;
}

.knop-rond:active { background: var(--kaart-actief); }

.knop-rond-cijfer {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  transform: translateY(-40%);
  pointer-events: none;
}

.knop-rond svg { position: absolute; }

.knop-stop { color: var(--tekst); }

.knop-stop:disabled, .knop-rond:disabled { opacity: 0.35; }

.knop-speel {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #241c16;
  background: var(--accent);
  border: none;
  border-radius: 50%;
}

.knop-speel:active { background: var(--accent-diep); }

/* Welk icoon zichtbaar is, stuurt de klasse op de knop. Een hidden-attribuut
   werkt niet betrouwbaar op een SVG-element, want dat is geen HTMLElement. */
.knop-speel #icoon-pauze { display: none; }
.knop-speel.speelt #icoon-speel { display: none; }
.knop-speel.speelt #icoon-pauze { display: block; }

/* ---------- Melding ---------- */

.melding {
  position: fixed;
  left: 50%;
  bottom: calc(240px + var(--veilig-onder));
  z-index: 60;
  max-width: 88vw;
  padding: 13px 20px;
  font-size: 15px;
  text-align: center;
  color: var(--tekst);
  background: #4a3d33;
  border-radius: 12px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
  transform: translateX(-50%);
}

/* ---------- Tablet ---------- */

@media (min-width: 700px) {
  body { font-size: 18px; }
  .scherm { max-width: 760px; margin: 0 auto; padding: 24px; }
  .balk { padding-left: 24px; padding-right: 24px; }
  .speler { padding-left: 24px; padding-right: 24px; }
  .speler-info, .speler-tijdbalk, .speler-tijden, .speler-knoppen {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }
  .nummer-knop { width: 68px; height: 68px; }
  .nummer-titel { font-size: 18px; }
}
