/* Meshor-Demoleiste + Shell-Layout. Gilt für alle Demo-Routen. */
@font-face {
  font-family: 'Archivo Meshor';
  src: url('fonts/archivo-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --mdb-bg: #0b0f14;
  --mdb-raise: #111720;
  --mdb-line: #263241;
  --mdb-text: #f8fafc;
  --mdb-mute: #94a3b8;
  --mdb-blue: #2563eb;
  --mdb-blue-hover: #3b82f6;
  --mdb-h: 64px;
  color-scheme: dark;
}

html, body { margin: 0; background: var(--mdb-bg); }
.mdb-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
/* Die Demo liegt unter der Leiste und scrollt selbst: die Leiste bleibt sichtbar und verdeckt nichts. */
.mdb-frame { flex: 1 1 auto; width: 100%; min-height: 0; border: 0; display: block; background: #fff; }
meshor-demobar { display: block; flex: none; position: relative; z-index: 2; }
/* Portal-Seiten (Start, Branchen): normal scrollende Seite, Leiste bleibt oben stehen */
.mdb-page meshor-demobar { position: sticky; top: 0; z-index: 20; }

.mdb {
  box-sizing: border-box;
  height: var(--mdb-h);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: 'brand seg cta';
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: var(--mdb-bg);
  border-bottom: 1px solid var(--mdb-line);
  color: var(--mdb-text);
  font: 500 14px/1.2 'Archivo Meshor', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.mdb *, .mdb *::before, .mdb *::after { box-sizing: border-box; }
.mdb a { color: inherit; text-decoration: none; }
.mdb :focus-visible { outline: 2px solid #7cc4ff; outline-offset: 2px; }
.mdb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* links: Logo + Badge, daneben die Branchenauswahl */
.mdb-left { grid-area: brand; display: flex; align-items: center; gap: 14px; min-width: 0; }
.mdb-brand { display: inline-flex; align-items: center; gap: 10px; flex: none; min-height: 44px; border-radius: 8px; }
.mdb-mark { flex: none; }
.mdb-word { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; font-stretch: 104%; }
.mdb-word span { color: var(--mdb-blue-hover); }
.mdb-badge {
  border: 1px solid var(--mdb-line); border-radius: 999px; padding: 4px 9px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mdb-mute);
}

.mdb-branche { position: relative; min-width: 0; display: block; }
.mdb-branche::after {
  content: ''; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -5px;
  border: solid var(--mdb-mute); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); pointer-events: none;
}
.mdb-branche select {
  appearance: none; -webkit-appearance: none;
  height: 40px; max-width: 220px; width: 100%; padding: 0 36px 0 16px;
  background: var(--mdb-raise); color: var(--mdb-text);
  border: 1px solid var(--mdb-line); border-radius: 999px;
  font: inherit; font-size: 14px; cursor: pointer; text-overflow: ellipsis;
}
.mdb-branche select:hover { border-color: #3a4a5e; }
.mdb-branche option { background: var(--mdb-raise); color: var(--mdb-text); }

/* Mitte: Paketumschalter */
.mdb-seg {
  grid-area: seg; justify-self: center;
  display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr));
  padding: 4px; border: 1px solid var(--mdb-line); border-radius: 999px; background: var(--mdb-raise);
}
.mdb-opt {
  display: flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 28px; border-radius: 999px;
  font-size: 13px; font-weight: 650; letter-spacing: 0.06em; white-space: nowrap;
  color: var(--mdb-mute); transition: color .2s, background-color .2s;
}
a.mdb-opt:hover { color: var(--mdb-text); }
a.mdb-opt.is-active { background: var(--mdb-text); color: var(--mdb-bg); box-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.mdb-opt.is-off { opacity: .35; cursor: not-allowed; }

/* rechts: Paket (nur Smartphone) und Anfrage */
.mdb-right { grid-area: cta; justify-self: end; display: flex; align-items: center; gap: 8px; min-width: 0; }
.mdb-fold { display: none; }
.mdb-cta {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 6px 0 20px;
  border-radius: 999px; background: var(--mdb-blue); color: #fff !important;
  font-size: 14px; font-weight: 600; white-space: nowrap; transition: background-color .2s;
}
.mdb-cta:hover { background: var(--mdb-blue-hover); }
.mdb-cta-i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: rgba(255, 255, 255, .15); transition: transform .2s; }
.mdb-cta:hover .mdb-cta-i { transform: translateX(2px); }
.mdb-cta-short { display: none; }

/* Bereichsleiste: Website und Demo-Bereiche der Branche (gleiche Gestaltung wie zuvor in der Fitnessstudio-Demo) */
.mdb-areas {
  box-sizing: border-box; min-height: 40px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch;
  padding: 0 12px; background: #11161d; border-bottom: 1px solid rgb(56 189 248 / .22);
  font: 600 13px/1 'Archivo Meshor', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.mdb-area-list { grid-column: 2; display: flex; justify-content: center; gap: 2px; }
.mdb-area {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px;
  border: 0; border-bottom: 2px solid transparent; background: transparent; color: #a3b1c2;
  font: inherit; white-space: nowrap; cursor: pointer; text-decoration: none; transition: color .2s;
}
.mdb-area:hover { color: #f8fafc; }
.mdb-area[aria-current='page'] { color: #f8fafc; border-bottom-color: #3b82f6; }
.mdb-area.is-locked, .mdb-area.is-soon { color: #6b7a8c; }
.mdb-area.is-locked:hover, .mdb-area.is-soon:hover { color: #a3b1c2; }
.mdb-lock { opacity: .8; }
.mdb-soon { padding: 2px 6px; border: 1px solid #263241; border-radius: 999px; font-size: 10px; letter-spacing: .04em; color: #94a3b8; }
.mdb-areas :focus-visible { outline: 2px solid #7cc4ff; outline-offset: -2px; }
.mdb-actions { grid-column: 3; display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.mdb-actions:empty { display: none; }
.mdb-action {
  height: 28px; padding: 0 12px; border: 1px solid #263241; border-radius: 999px; background: transparent;
  color: #a3b1c2; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.mdb-action:hover { color: #f8fafc; border-color: #3a4a5e; }

/* „Alle Demos“: zurück zur Übersicht */
.mdb-all { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: var(--mdb-mute) !important; font-size: 14px; white-space: nowrap; transition: color .2s; }
.mdb-all:hover { color: var(--mdb-text) !important; }

/* Persönliche Demo: Banner auf der eigenen Demo bzw. „Zurück zu Ihrer Demo“ – dunkel, als Teil der Meshor-Leiste */
.mdb-mine {
  box-sizing: border-box; display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 8px 18px; min-height: 44px; padding: 6px 16px; background: #111720; color: #f8fafc;
  border-bottom: 1px solid #263241;
  font: 400 13.5px/1.35 'Archivo Meshor', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.mdb-mine p { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; }
.mdb-mine strong { font-weight: 650; letter-spacing: -0.005em; }
.mdb-mine span { color: #94a3b8; }
.mdb-mine-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border-radius: 999px;
  border: 1px solid #263241; color: #f8fafc; font-weight: 600; font-size: 13px; text-decoration: none; white-space: nowrap;
  transition: border-color .2s, background-color .2s;
}
.mdb-mine-btn:hover { border-color: #3b82f6; }
.mdb-mine-btn.is-primary { background: #2563eb; border-color: #2563eb; }
.mdb-mine-btn.is-primary:hover { background: #3b82f6; }
.mdb-mine-btn span { color: inherit; }
.mdb-mine :focus-visible { outline: 2px solid #7cc4ff; outline-offset: 2px; }

/* Hinweis bei Schloss, „Demnächst“ und Rückfall zur Website */
.mdb-note {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  box-sizing: border-box; width: min(520px, calc(100vw - 24px));
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 44px 12px 16px;
  background: #0b0f14; color: #f8fafc; border: 1px solid #263241; border-radius: 14px;
  box-shadow: 0 18px 50px rgb(0 0 0 / .35);
  font: 500 14px/1.45 'Archivo Meshor', ui-sans-serif, system-ui, sans-serif;
}
.mdb-note[hidden] { display: none; }
.mdb-note p { margin: 0; flex: 1 1 240px; }
.mdb-note-btn { flex: none; padding: 8px 14px; border-radius: 999px; background: #2563eb; color: #fff; text-decoration: none; font-weight: 600; font-size: 13px; }
.mdb-note-btn:hover { background: #3b82f6; }
.mdb-note-x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; background: none; color: #94a3b8; font-size: 20px; cursor: pointer; border-radius: 8px; }
.mdb-note-x:hover { color: #f8fafc; }

@media (max-width: 1180px) {
  .mdb-opt { padding: 0 18px; }
  .mdb-cta-text { display: none; }
  .mdb-cta-short { display: inline; }
}
@media (max-width: 960px) {
  .mdb-word { display: none; }
}
/* schmaler: Logo führt ebenfalls zu allen Demos */
@media (max-width: 860px) {
  .mdb-all { display: none; }
}

/* Smartphone: zwei kompakte Zeilen, nichts läuft seitlich über */
@media (max-width: 720px) {
  :root { --mdb-h: auto; }
  .mdb {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'brand cta' 'seg seg';
    gap: 8px 10px; padding: 8px 12px;
  }
  .mdb-left { gap: 10px; }
  .mdb-badge { padding: 3px 7px; font-size: 9.5px; }
  .mdb-branche select { height: 40px; max-width: none; padding-left: 12px; font-size: 14px; }
  .mdb-seg { justify-self: stretch; padding: 3px; }
  .mdb-opt { height: 32px; padding: 0 6px; font-size: 12px; letter-spacing: 0.04em; }
  .mdb-cta { height: 40px; padding: 0 4px 0 12px; gap: 6px; font-size: 13px; }
  .mdb-cta-i { width: 32px; height: 32px; }

  /* Pakete und Bereiche hinter einem Knopf mit der aktuellen Stufe; aufgeklappt wie bisher */
  .mdb-fold {
    display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px;
    border: 1px solid var(--mdb-line); border-radius: 999px; background: var(--mdb-raise); color: var(--mdb-text);
    font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
  }
  .mdb-fold svg { transition: transform .2s; }
  meshor-demobar.is-open .mdb-fold svg { transform: rotate(180deg); }
  meshor-demobar:has(.mdb-fold):not(.is-open) .mdb-seg,
  meshor-demobar:has(.mdb-fold):not(.is-open) .mdb-areas { display: none; }
  /* Übersichtsseiten: die Stufen stehen groß auf der Seite */
  .mdb-page .mdb-seg { display: none; }
}
/* Smartphone: alle Bereiche sichtbar, bei Bedarf in zwei Zeilen statt seitlich abgeschnitten */
@media (max-width: 760px) {
  .mdb-areas { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 2px; padding: 4px 6px; }
  .mdb-area-list { flex-wrap: wrap; justify-content: center; gap: 0 2px; }
  .mdb-area { height: 32px; padding: 0 10px; }
  .mdb-actions { width: 100%; justify-content: center; padding: 2px 0 2px; }
  .mdb-mine { justify-content: space-between; gap: 6px 12px; padding: 8px 12px; font-size: 13px; }
  .mdb-mine p { flex-direction: column; gap: 0; }
  .mdb-mine p span { display: none; } /* „Vorbereitet von Meshor GmbH“ nur ab Tablet */
  .mdb-mine-btn { padding: 6px 12px; font-size: 12.5px; white-space: nowrap; }
}
@media (max-width: 420px) {
  .mdb-badge { display: none; }
}
@media (max-width: 380px) {
  .mdb-cta-short { display: none; }
  .mdb-cta { padding: 0 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .mdb *, .mdb-opt, .mdb-cta, .mdb-cta-i, .mdb-fold svg { transition: none; }
}
