/* Topbar Pro (pichler_topbar_pro)
   Aufbau: 1. Leiste  2. Links  3. Mitte (Botschaften, Aktion)  4. Flaggen  5. Handy  6. Info-Banner
   Farben und Höhe setzt das Plugin als Variablen am Element (--ptb-bg, --ptb-ink, --ptb-msg, --ptb-hover, --ptb-h),
   den Abstand zum Kopf am :root (--ptb-space).
   Schrift kommt vom Theme. Links mit eigenen Farben und drei Klassen im Selektor, damit Theme-Regeln wie
   "header a:not(.btn)" (0,2,2) nicht greifen. */

/* ------------------------------------------------------------ 1. Leiste */
.ptb {
  --ptb-gap: 22px;
  background: var(--ptb-bg, #1b232b);
  color: var(--ptb-ink, #c5ccd3);
  font-size: 13px;
  line-height: 1.2;
}
.ptb *,
.ptb *::before,
.ptb *::after { box-sizing: border-box; }
/* Seiten so breit wie nötig, die Mitte bekommt den Rest. Ist genug Platz, sind beide Seiten gleich breit und die
   Botschaft steht genau mittig. */
.ptb-in {
  display: grid;
  grid-template-columns: 1fr minmax(0, auto) 1fr;
  align-items: center;
  gap: 24px;
  min-height: var(--ptb-h, 34px);
}
.ptb-in--full { padding-right: 24px; padding-left: 24px; }
.ptb-side { display: flex; align-items: center; gap: var(--ptb-gap); min-width: 0; }
.ptb-right { justify-content: flex-end; }
/* Abstand zum Shop-Kopf (--ptb-space setzt topbar.tpl am :root): als Innenabstand der NOVA-Logozeile, damit er weiß wie
   der Kopf bleibt (der Body ist grau). Die Zeile blendet NOVA beim Scrollen aus, der sticky Kopf wird also nicht höher. */
@media (min-width: 992px) {
  #jtl-nav-wrapper > .hide-navbar { padding-top: var(--ptb-space, 0px); }
}

/* ------------------------------------------------------------- 2. Links */
.ptb-links { display: flex; align-items: center; gap: var(--ptb-gap); }
.ptb .ptb-side a.ptb-link,
.ptb .ptb-side a.ptb-link:visited {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ptb-ink, #c5ccd3);
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease;
}
.ptb .ptb-side a.ptb-link:hover,
.ptb .ptb-side a.ptb-link:focus-visible { color: var(--ptb-hover, #fff); text-decoration: none; }
.ptb .ptb-ico { display: block; flex: none; }
.ptb a:focus-visible { outline: 2px solid var(--ptb-hover, #fff); outline-offset: 2px; }

/* --------------------------------------------------------------- 3. Mitte */
/* Alle Botschaften liegen im selben Grid-Feld übereinander: die Mitte ist so breit wie die längste, nichts springt */
.ptb-center { display: grid; justify-items: center; min-width: 0; text-align: center; }
.ptb .ptb-center .ptb-msg,
.ptb .ptb-center a.ptb-msg:visited,
.ptb .ptb-center a.ptb-msg:hover {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  color: var(--ptb-msg, #fff);
  font-weight: 600;
  text-decoration: none;
}
.ptb .ptb-msg {
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s;
}
.ptb .ptb-msg.is-on { opacity: 1; visibility: visible; transition-delay: 0s; }
.ptb--slide .ptb-msg { transform: translateY(6px); }
.ptb--slide .ptb-msg.is-on { transform: none; }
.ptb-msg-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptb--upper .ptb-msg-text { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.ptb a.ptb-msg:hover .ptb-msg-text { text-decoration: underline; text-underline-offset: 3px; }
/* Aktion: eigene Schriftfarbe, optional ein Kennzeichen davor */
.ptb .ptb-center .ptb-msg--special,
.ptb .ptb-center a.ptb-msg--special:visited,
.ptb .ptb-center a.ptb-msg--special:hover { color: var(--ptb-special, #ffc61a); }
.ptb-badge {
  flex: none;
  padding: 2px 7px;
  border-radius: 2px;
  background: var(--ptb-badge, #c8102e);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------ 4. Flaggen */
.ptb-flags { display: flex; align-items: center; gap: 8px; }
.ptb .ptb-flags a.ptb-lang,
.ptb .ptb-flags a.ptb-lang:visited {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ptb-ink, #c5ccd3);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  opacity: .5;
  transition: opacity .15s ease;
}
.ptb .ptb-flags a.ptb-lang.is-active,
.ptb .ptb-flags a.ptb-lang:hover,
.ptb .ptb-flags a.ptb-lang:focus-visible { color: var(--ptb-hover, #fff); opacity: 1; }
.ptb .ptb-flag { display: block; border-radius: 1px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); }

/* ------------------------------------------- 5. Handy und Tablet (unter NOVA lg) */
@media (max-width: 991.98px) {
  .ptb-in { grid-template-columns: minmax(0, 1fr); gap: 12px; min-height: max(28px, calc(var(--ptb-h, 34px) - 2px)); }
  .ptb-in--full { padding-right: 12px; padding-left: 12px; }
  .ptb-left,
  .ptb-right { display: none; }
  .ptb--upper .ptb-msg-text { letter-spacing: .12em; }
  .ptb--m-messageFlags .ptb-in { grid-template-columns: minmax(0, 1fr) auto; }
  .ptb--m-messageFlags .ptb-right { display: flex; }
  .ptb--m-messageFlags .ptb-links { display: none; }
  .ptb--m-off { display: none; }
}

/* -------------------------------------------------------- 6. Info-Banner */
.ptb-info {
  --ptb-info-bg: #e7f1fb;
  --ptb-info-ink: #0b3d6b;
  background: var(--ptb-info-bg);
  color: var(--ptb-info-ink);
  font-size: 14px;
  line-height: 1.45;
}
.ptb-info--notice { --ptb-info-bg: #fff3d6; --ptb-info-ink: #5c4300; }
.ptb-info--alert { --ptb-info-bg: #fde8eb; --ptb-info-ink: #8a0d1f; }
.ptb-info--success { --ptb-info-bg: #e5f5ea; --ptb-info-ink: #14532d; }
.ptb-info--dark { --ptb-info-bg: #2b3640; --ptb-info-ink: #ffffff; }
.ptb-info[hidden] { display: none; }
.ptb-info-in {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.ptb-info-ico { display: flex; flex: none; }
.ptb-info-ico .ptb-ico { width: 18px; height: 18px; }
.ptb-info-text { margin: 0; text-align: center; }
.ptb-info .ptb-info-text a.ptb-info-link,
.ptb-info .ptb-info-text a.ptb-info-link:visited,
.ptb-info .ptb-info-text a.ptb-info-link:hover {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.ptb-info-close {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  opacity: .7;
  cursor: pointer;
}
.ptb-info-close:hover { background: rgba(0, 0, 0, .07); opacity: 1; }
.ptb-info-close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; opacity: 1; }
@media (max-width: 991.98px) {
  .ptb-info { font-size: 13px; }
  .ptb-info--desktop { display: none; }
  .ptb-info-in { justify-content: flex-start; }
  .ptb-info-text { flex: 1 1 auto; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .ptb .ptb-msg { transition: none; }
  .ptb--slide .ptb-msg { transform: none; }
  .ptb a.ptb-link,
  .ptb a.ptb-lang { transition: none; }
}
