/*
 * Letzte Cleaning Prüfung: 02.10.2026
 * Letztes Cleaning: -
 * Werbeleiste ganz oben (AL-20261001-25), erzeugt von assets/js/werbeleiste.js.
 * confacAI-Markenfarbe, etwas dunkler als der
 * Akzent #ff2347, damit weiße Schrift lesbar bleibt.
 */

:root {
  --werbeleiste-hoehe: 0px;
  --werbeleiste-grund: #ff5a00;
  --werbeleiste-grund-hell: #ffa21f;
  --werbeleiste-schrift: #ffffff;
}

.werbeleiste {
  position: relative;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 48px;
  box-sizing: border-box;
  width: 100%;
  background: linear-gradient(90deg, var(--werbeleiste-grund), var(--werbeleiste-grund-hell));
  color: var(--werbeleiste-schrift);
  font: 400 20px/1 "Bebas Neue", "DM Sans", system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.werbeleiste-inhalt {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  min-width: 0;
  text-align: center;
}

.werbeleiste-symbol {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Jedes Stück des Satzes (Wort, Logo, Preise) ist ein Flex-Teil und sitzt dadurch auf derselben Mittellinie
   (WL28-42, Betreiber 28.10.2026: vorher standen Logo, Preis und Text unterschiedlich hoch). */
.werbeleiste-text {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-width: 0;
}

.werbeleiste-wort,
.werbeleiste-preis,
.werbeleiste-altpreis {
  line-height: 1;
  /* Bebas Neue hat keine Unterlängen: etwas Platz unten gleicht die Großbuchstaben optisch auf die Mitte aus. */
  padding-top: 2px;
}

/* Satzzeichen am Anfang eines Stücks (z. B. "?" hinter dem Logo) rückt an das Vorgängerteil heran. */
.werbeleiste-wort-an {
  margin-left: -2px;
  margin-right: 4px;
}

.werbeleiste-logo-marke {
  display: flex;
  align-items: center;
}

.werbeleiste-logo {
  display: block;
  height: 16px;
  width: auto;
}

/* Beträge: Angebotspreis als helle Glasmarke mit weißem Rand, Altpreis gedämpft und durchgestrichen. */
.werbeleiste-preis {
  box-sizing: border-box;
  height: 30px;
  padding: 3px 14px 0;
  display: inline-flex;
  align-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 1.25em;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.werbeleiste-altpreis {
  opacity: 0.75;
  text-decoration-thickness: 2px;
}

.werbeleiste-knopf {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 2px 16px 0;
  box-sizing: border-box;
  border-radius: 999px;
  background: #fff0b8;
  color: #e0102f;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.05em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(90, 26, 0, 0.3);
}

.werbeleiste-knopf:hover,
.werbeleiste-knopf:focus-visible {
  background: #ffffff;
  color: #b80c26;
}

.werbeleiste-knopf[hidden] {
  display: none;
}

.werbeleiste-schliessen {
  position: absolute;
  top: 50%;
  right: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.werbeleiste-schliessen svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.werbeleiste-schliessen:hover,
.werbeleiste-schliessen:focus-visible {
  background: rgba(0, 0, 0, 0.15);
}

.werbeleiste a:focus-visible,
.werbeleiste button:focus-visible {
  outline: 2px solid #1a0c00;
  outline-offset: 2px;
}

/* Studio (WL28-42, Betreiber 28.10.2026): Der Balken steht ganz oben, und die komplette Studio-Seite rückt um seine Höhe
   nach unten, damit Logo, Credits und Profil sichtbar bleiben. Dafür wird der Body zu einem festen Kasten unter dem Balken
   (transform macht ihn zum Bezugsrahmen aller fest positionierten Teile: Seitenleiste, Arbeitsfenster, Hinweise). Die Höhe
   meldet das Skript als --werbeleiste-hoehe; der Balken selbst sitzt direkt unter <html>, außerhalb des Kastens. */
/* Über dem offenen Abo-Fenster keine Leiste: dort stünde sonst ein zweites
   Angebot über dem Fenster (Betreiber 02.10.2026, AL-20261001-73). Die Höhe
   meldet der ResizeObserver dann als 0, alles rückt wieder hoch. */
:root:has(body.factory-upgrade-focus) > .werbeleiste {
  display: none;
}

html > .werbeleiste {
  position: fixed;
  z-index: 60;
  top: 0;
  right: 0;
  left: 0;
}

body.hat-werbeleiste-fest {
  position: fixed;
  inset: var(--werbeleiste-hoehe) 0 0 0;
  overflow: hidden;
  transform: translateZ(0);
}

body.hat-werbeleiste-fest .factory-shell,
body.hat-werbeleiste-fest .factory-main {
  height: calc(100dvh - var(--werbeleiste-hoehe));
  min-height: 0;
}

@media (max-width: 640px) {
  .werbeleiste {
    padding: 6px 42px 6px 12px;
    font-size: 17px;
  }

  .werbeleiste-symbol {
    display: none;
  }

  .werbeleiste-schliessen {
    right: 6px;
  }
}

@media print {
  .werbeleiste {
    display: none;
  }
}
