/* Verlässliches Ausblenden – das hidden-Attribut allein genügt nicht,
   sobald irgendeine Regel display setzt (im Blockeditor die Regel). */
.mmx-up .mmx-aus,
.mmx-block-verwaltung .mmx-aus { display: none !important; }

/* Meldo Mixer – Upload-Bereich
   Farben: #3D7C85 Petrol, #E8924F Grün, #FAF8F3 Hell, #111416 Dunkel */

.mmx-up {
  font-family: 'Akko', system-ui, sans-serif;
  color: #111416;
  max-width: 980px;
}
.mmx-up h2 {
  font-family: 'Akko', sans-serif; font-weight: 700;
  font-size: 1.6rem; margin: 0 0 8px;
}
.mmx-up h3 {
  font-family: 'Akko', sans-serif; font-weight: 600;
  font-size: 1.1rem; margin: 0 0 12px;
}
.mmx-lead { color: #6b7075; line-height: 1.6; margin: 0 0 24px; max-width: 68ch; }
.mmx-lead code {
  background: rgba(61,124,133,.08); color: #3D7C85;
  padding: 2px 7px; border-radius: 6px; font-size: .9em;
}
.mmx-hinweis {
  background: #FAF8F3; border-left: 4px solid #3D7C85;
  padding: 16px 20px; border-radius: 0 12px 12px 0;
  font-family: 'Akko', sans-serif;
}

/* ---------- Songwahl ---------- */
.mmx-up-zeile {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px;
}
.mmx-up-zeile label {
  font-family: 'Akko', sans-serif; font-weight: 600; font-size: .95rem;
}
.mmx-up optgroup {
  font-family: 'Akko', sans-serif; font-weight: 700;
  color: #3D7C85; font-style: normal;
}
.mmx-up option { color: #111416; font-weight: 400; }
.mmx-up select {
  font-family: 'Akko', sans-serif; font-size: .95rem;
  padding: 10px 14px; border: 1.5px solid rgba(17,20,22,.15);
  border-radius: 12px; background: #fff; min-width: 320px; max-width: 100%;
}
.mmx-up select:focus { outline: none; border-color: #3D7C85; }
.mmx-status { font-size: .86rem; color: #6b7075; }

/* ---------- Ablagefläche ---------- */

/* Das native Dateifeld zuverlässig verbergen. Das hidden-Attribut allein
   genügt nicht: Themes setzen für Formularfelder eigene Anzeigeregeln. */
.mmx-up input[type="file"] {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0 !important;
}

.mmx-drop {
  cursor: pointer;
  border: 2px dashed rgba(61,124,133,.35); border-radius: 20px;
  background: #FAF8F3; padding: 38px 20px; text-align: center;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
  margin-bottom: 20px;
}
.mmx-drop:hover { border-color: rgba(61,124,133,.6); background: #fff; }
.mmx-drop.is-over {
  border-color: #E8924F; background: rgba(232,146,79,.08); transform: scale(1.01);
}
.mmx-drop.is-busy { opacity: .6; pointer-events: none; }
.mmx-drop-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mmx-drop svg { width: 44px; height: 44px; color: #3D7C85; margin-bottom: 4px; }
.mmx-drop strong { font-family: 'Akko', sans-serif; font-size: 1.05rem; }
.mmx-drop span { color: #6b7075; font-size: .92rem; }
.mmx-drop small { color: #8a8f94; font-size: .8rem; margin-top: 4px; }
.mmx-link {
  background: none; border: none; padding: 0; cursor: pointer;
  color: #3D7C85; font: inherit; text-decoration: underline;
}

/* ---------- Fortschritt ---------- */
.mmx-fortschritt { margin: 0 0 20px; }
.mmx-balken {
  height: 8px; border-radius: 999px; background: rgba(17,20,22,.08); overflow: hidden;
}
.mmx-balken span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg,#E8924F,#3D7C85);
  transition: width .3s ease;
}
.mmx-fort-text { font-size: .86rem; color: #6b7075; margin-top: 8px; }

/* ---------- Prüfergebnis ---------- */
.mmx-pruefung { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.mmx-block { border-radius: 14px; padding: 16px 20px; font-size: .92rem; line-height: 1.55; }
.mmx-block strong { font-family: 'Akko', sans-serif; display: block; margin-bottom: 4px; }
.mmx-block p { margin: 0 0 8px; }
.mmx-block ul { margin: 6px 0 0 18px; }
.mmx-block li { margin: 3px 0; }
.mmx-fehler  { background: #fdf2f2; border-left: 4px solid #b32d2e; color: #7d2225; }
.mmx-warnung { background: #fdf8ec; border-left: 4px solid #b8860b; color: #6b5209; }
.mmx-ok      { background: rgba(232,146,79,.12); border-left: 4px solid #E8924F; color: #995411; }

/* ---------- Spurenliste ---------- */
.mmx-liste table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.mmx-liste thead th {
  text-align: left; font-family: 'Akko', sans-serif; font-weight: 600;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .05em;
  color: #8a8f94; padding: 0 10px 8px; border-bottom: 1px solid rgba(17,20,22,.08);
}
.mmx-liste tbody td {
  padding: 10px; border-bottom: 1px solid rgba(17,20,22,.06); vertical-align: middle;
}
.mmx-liste tbody tr:hover { background: rgba(61,124,133,.03); }
.mmx-num { font-variant-numeric: tabular-nums; color: #6b7075; white-space: nowrap; }
.mmx-liste input[type=text],
.mmx-liste input[type=number],
.mmx-liste select {
  font-family: 'Akko', sans-serif; font-size: .9rem;
  padding: 7px 10px; border: 1.5px solid rgba(17,20,22,.12);
  border-radius: 9px; background: #fff; width: 100%;
}
.mmx-liste input:focus, .mmx-liste select:focus { outline: none; border-color: #3D7C85; }
.mmx-pos { width: 62px !important; text-align: center; }
.mmx-dateiname { display: block; color: #a3a8ad; font-size: .74rem; margin-top: 3px; }
.mmx-del,
.mmx-del:hover, .mmx-del:focus, .mmx-del:active {
  /* Feste Masse und Flexbox: Themes setzen für Buttons sonst eigene
     Innenabstände, wodurch der Kreis oval wird. */
  appearance: none !important; -webkit-appearance: none !important;
  background: none !important; background-image: none !important;
  border: 1.5px solid rgba(179,45,46,.28) !important;
  color: #b32d2e !important;
  width: 34px !important; height: 34px !important;
  min-width: 34px !important; min-height: 34px !important;
  max-width: 34px !important; max-height: 34px !important;
  padding: 0 !important; margin: 0 !important; line-height: 0 !important;
  border-radius: 50% !important; box-shadow: none !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  cursor: pointer; flex: 0 0 auto; transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.mmx-del svg { width: 15px; height: 15px; display: block; }
.mmx-del:hover { background: #b32d2e !important; color: #fff !important; border-color: #b32d2e !important; }

/* Sammellöschung */
.mmx-fuss-spacer { flex: 1; }
.mmx-btn-gefahr,
.mmx-btn-gefahr:hover, .mmx-btn-gefahr:focus {
  appearance: none !important; -webkit-appearance: none !important;
  font-family: 'Akko', sans-serif; font-weight: 600; font-size: .88rem;
  background: #fff !important; color: #b32d2e !important;
  border: 1.5px solid rgba(179,45,46,.3) !important;
  padding: 10px 20px !important; border-radius: 999px !important;
  cursor: pointer; box-shadow: none !important; transition: all .2s ease;
}
.mmx-btn-gefahr:hover { background: #b32d2e !important; color: #fff !important; border-color: #b32d2e !important; }
.mmx-btn-gefahr:disabled { opacity: .5; cursor: default; }
.mmx-papierkorb-hinweis { font-size: .8rem; color: #8a8f94; margin: 10px 0 0; line-height: 1.5; }
/* Bedienelemente über der Liste – bei vielen Spuren wären sie unten
   ausserhalb des Sichtbereichs */
.mmx-liste-kopf {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(17,20,22,.08);
}
.mmx-liste-kopf h3 { margin: 0; }
.mmx-liste-fuss { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.mmx-btn {
  font-family: 'Akko', sans-serif; font-weight: 600; font-size: .92rem;
  background: #3D7C85; color: #fff; border: none;
  padding: 11px 24px; border-radius: 999px; cursor: pointer; transition: background .2s ease;
}
.mmx-btn:hover { background: #E8924F; }

@media (max-width: 782px) {
  .mmx-liste-kopf { gap: 8px; }
  .mmx-liste-kopf h3 { width: 100%; }
  .mmx-fuss-spacer { display: none; }
  .mmx-up select { min-width: 0; width: 100%; }
  .mmx-liste { overflow-x: auto; }
  .mmx-liste table { min-width: 640px; }
  .mmx-drop { padding: 26px 16px; }
}


/* ---------- Startschalter ---------- */
.mmx-startzelle { text-align: center; }
.mmx-schalter-klein { display: inline-flex; align-items: center; cursor: pointer; }
.mmx-schalter-klein input { position: absolute; opacity: 0; width: 0; height: 0; }
.mmx-schalter-klein span {
  position: relative; display: block; width: 40px; height: 22px;
  background: rgba(17,20,22,.16); border-radius: 999px; transition: background .2s ease;
}
.mmx-schalter-klein span::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.mmx-schalter-klein input:checked + span { background: #3D7C85; }
.mmx-schalter-klein input:checked + span::after { transform: translateX(18px); }
.mmx-schalter-klein input:focus-visible + span { outline: 2px solid #E8924F; outline-offset: 2px; }

.mmx-startwahl { font-size: .8rem; color: #6b7075; display: inline-flex; align-items: center; gap: 6px; }
.mmx-startwahl button {
  appearance: none !important; background: #fff !important;
  border: 1.5px solid rgba(17,20,22,.14) !important; color: #6b7075 !important;
  border-radius: 999px !important; padding: 5px 12px !important;
  font-family: 'Akko', sans-serif; font-size: .78rem; cursor: pointer;
}
.mmx-startwahl button:hover { border-color: #3D7C85 !important; color: #3D7C85 !important; }


/* ---------- Reihenfolge ändern ---------- */
.mmx-liste tbody tr { transition: background .15s ease, opacity .15s ease; }
.mmx-liste tbody tr.is-zieht { opacity: .4; }
.mmx-liste tbody tr.is-ziel { background: rgba(61,124,133,.07); }
.mmx-liste tbody tr.is-bewegt { background: rgba(232,146,79,.14); }

.mmx-griffzelle { white-space: nowrap; }
.mmx-griff {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 26px; color: #b6bbc0; cursor: grab; vertical-align: middle;
}
.mmx-griff:active { cursor: grabbing; }
.mmx-griff svg { width: 18px; height: 18px; }
.mmx-liste tbody tr:hover .mmx-griff { color: #3D7C85; }

.mmx-nr {
  display: inline-block; min-width: 22px; text-align: center;
  font-variant-numeric: tabular-nums; color: #6b7075; font-size: .86rem; vertical-align: middle;
}

.mmx-pfeile { display: inline-flex; flex-direction: column; gap: 2px; vertical-align: middle; margin-right: 2px; }
.mmx-pfeile button,
.mmx-pfeile button:hover, .mmx-pfeile button:focus {
  appearance: none !important; background: none !important; border: none !important;
  color: #b6bbc0 !important; cursor: pointer; padding: 0 !important; margin: 0 !important;
  width: 18px !important; height: 13px !important; min-height: 0 !important;
  font-size: 9px !important; line-height: 1 !important; box-shadow: none !important;
}
.mmx-pfeile button:hover { color: #3D7C85 !important; }

/* Nicht gespeicherte Änderungen sichtbar machen */
.mmx-btn.is-offen {
  box-shadow: 0 0 0 3px rgba(232,146,79,.35);
}

@media (max-width: 782px) {
  /* Auf dem Handy funktioniert Ziehen unzuverlässig – die Pfeile sind dort führend */
  .mmx-griff { display: none; }
  .mmx-pfeile button { width: 26px !important; height: 20px !important; font-size: 11px !important; }
}


/* ---------- Block im Editor ---------- */
.mmx-block-edit {
  border: 1px solid rgba(61,124,133,.25); border-radius: 14px;
  padding: 16px; background: #fff;
}
.mmx-block-kopf {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: 'Akko', sans-serif;
}
.mmx-block-marke {
  background: rgba(61,124,133,.10); color: #3D7C85;
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px;
}
.mmx-block-zahl { color: #8a8f94; font-size: .82rem; }
.mmx-block-hinweis { color: #6b7075; font-size: .86rem; margin: 12px 0 0; }
.mmx-block-verwaltung { margin-top: 16px; border-top: 1px solid rgba(17,20,22,.08); padding-top: 16px; }
.mmx-block-verwaltung .mmx-up-kopf { display: none; }
.mmx-block-verwaltung .mmx-up-zeile { display: none; }
.mmx-block-verwaltung .mmx-up { max-width: none; }
.mmx-block-verwaltung .mmx-drop { padding: 24px 16px; }
/* Im Editor ist der Platz knapper – Tabelle waagrecht scrollbar halten */
.mmx-block-verwaltung .mmx-liste { overflow-x: auto; }
.mmx-block-verwaltung .mmx-liste table { min-width: 620px; }


/* ---------- Abschnitte ---------- */
.mmx-marken-block {
  margin-top: 26px; padding-top: 20px; border-top: 1px solid rgba(17,20,22,.08);
}
.mmx-marken-lead { color: #6b7075; font-size: .88rem; line-height: 1.55; margin: 0 0 14px; max-width: 68ch; }
.mmx-marken-tabelle {
  width: 100%; max-width: 560px; border-collapse: collapse; font-size: .9rem;
  table-layout: fixed;
}
/* Feste Spaltenbreiten: Die Zeit ist der wichtigste Wert und braucht Platz,
   die Farbwahl kommt mit wenig aus. */
.mmx-marken-tabelle col.mmx-sp-zeit  { width: 110px; }
.mmx-marken-tabelle col.mmx-sp-name  { width: auto; }
.mmx-marken-tabelle col.mmx-sp-farbe { width: 132px; }
.mmx-marken-tabelle col.mmx-sp-weg   { width: 48px; }
.mmx-marken-tabelle th {
  text-align: left; font-family: 'Akko', sans-serif; font-size: .74rem;
  text-transform: uppercase; letter-spacing: .05em; color: #8a8f94;
  padding: 0 10px 6px; font-weight: 600;
}
.mmx-marken-tabelle td { padding: 5px 10px 5px 0; }
.mmx-marken-tabelle input {
  font-family: 'Akko', sans-serif; font-size: .9rem;
  padding: 7px 10px; border: 1.5px solid rgba(17,20,22,.12);
  border-radius: 9px; background: #fff; width: 100%;
}
.mmx-marken-tabelle input:focus { outline: none; border-color: #3D7C85; }
.mmx-marken-tabelle .mmx-marke-zeit {
  width: 100%; font-variant-numeric: tabular-nums; text-align: center;
  padding-left: 6px; padding-right: 6px;
}
.mmx-marken-leer td { color: #a3a8ad; font-style: italic; padding: 10px 0; }
.mmx-marken-fuss { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.mmx-btn-leicht {
  appearance: none !important; background: #fff !important; color: #3D7C85 !important;
  border: 1.5px solid rgba(61,124,133,.25) !important; border-radius: 999px !important;
  padding: 9px 18px !important; font-family: 'Akko', sans-serif; font-weight: 600;
  font-size: .86rem; cursor: pointer; box-shadow: none !important;
}
.mmx-btn-leicht:hover { background: #3D7C85 !important; color: #fff !important; }


/* Hinweis auf eine Begrenzung durch den Server */
.mmx-serverlimit {
  display: block; margin-top: 6px; max-width: 46ch;
  color: #b8860b; font-size: .78rem; line-height: 1.45;
}


/* ---------- Abschnittsfarben ---------- */
.mmx-farbzelle { display: flex; align-items: center; gap: 8px; }
.mmx-farbtupfer {
  width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
/* Nur der Farbtupfer und ein schmales Feld – die Namen der Töne sind kurz */
.mmx-marken-tabelle .mmx-marke-farbe {
  width: 100%; min-width: 0; padding-left: 6px; padding-right: 22px;
  font-size: .84rem;
}
.mmx-farbzelle { gap: 6px; }


@media (max-width: 782px) {
  /* Auf dem Handy zählt jede Spalte: Farbe nur noch als Tupfer mit
     schmalem Auswahlfeld, die Zeit behält ihren Platz. */
  .mmx-marken-tabelle col.mmx-sp-zeit  { width: 96px; }
  .mmx-marken-tabelle col.mmx-sp-farbe { width: 104px; }
  .mmx-marken-tabelle col.mmx-sp-weg   { width: 42px; }
  .mmx-marken-tabelle .mmx-marke-farbe { font-size: .8rem; padding-right: 18px; }
  .mmx-farbtupfer { width: 13px; height: 13px; }
}
