/* Produktberater: dezenter Knopf unten rechts, Chatfenster. Farben folgen dem Shop (--pb-accent). */
.pb-root {
  --pb-accent: #333;
  --pb-on-accent: #fff;
  --pb-bg: #fff;
  --pb-text: #1d1d1f;
  --pb-muted: #6b6b70;
  --pb-line: #e3e3e6;
  --pb-soft: #f5f5f7;
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10040; /* unter dem Suchfenster der Livesuche (10050) und JTL-Dialogen */
  font-size: 15px;
  line-height: 1.45;
  color: var(--pb-text);
}
/* NOVA "nach oben" ueber den Knopf setzen */
.smoothscroll-top { bottom: 80px !important; }

.pb-launcher {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 0;
  border-radius: 3px;
  background: var(--pb-accent);
  color: var(--pb-on-accent);
  font: inherit;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  cursor: pointer;
}
.pb-launcher svg { width: 20px; height: 20px; fill: currentColor; }
.pb-launcher:focus-visible { outline: 3px solid var(--pb-text); outline-offset: 2px; }
.pb-root--open .pb-launcher { display: none; }

.pb-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 400px;
  max-width: calc(100vw - 24px);
  height: min(640px, calc(100vh - 36px));
  display: flex;
  flex-direction: column;
  background: var(--pb-bg);
  border: 1px solid var(--pb-line);
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .22);
  overflow: hidden;
}
.pb-panel[hidden] { display: none; }
.pb-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--pb-accent);
  color: var(--pb-on-accent);
}
.pb-title { flex: 1; font-weight: 700; }
.pb-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: 1px;
}
.pb-head button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 2px 6px;
}
.pb-new { font-size: 13px; text-decoration: underline; }
.pb-new[hidden] { display: none; }
.pb-close { font-size: 18px; line-height: 1; }

.pb-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pb-start, .pb-offline { padding: 18px 16px; overflow-y: auto; }
.pb-start p { margin: 0 0 12px; }
.pb-start a { color: inherit; text-decoration: underline; }
.pb-learn { padding: 8px 10px; background: var(--pb-soft); border-left: 3px solid var(--pb-accent); border-radius: 0; font-size: 14px; }
.pb-beta[hidden] { display: none; }
.pb-ok {
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 3px;
  background: var(--pb-accent);
  color: var(--pb-on-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.pb-offline { color: var(--pb-muted); }

.pb-list { flex: 1; overflow-y: auto; padding: 12px; background: var(--pb-soft); }
.pb-msg {
  max-width: 88%;
  margin: 0 0 10px;
  padding: 9px 12px;
  border-radius: 4px;
  word-wrap: break-word;
}
.pb-msg p { margin: 0 0 6px; }
.pb-msg p:last-child { margin-bottom: 0; }
.pb-msg ul { margin: 4px 0 6px; padding-left: 18px; }
.pb-msg a { color: inherit; text-decoration: underline; }
.pb-msg--me { margin-left: auto; background: var(--pb-accent); color: var(--pb-on-accent); white-space: pre-wrap; }
.pb-msg--bot { background: var(--pb-bg); border: 1px solid var(--pb-line); }

.pb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pb-chip {
  padding: 6px 10px;
  border: 1px solid var(--pb-accent);
  border-radius: 3px;
  background: var(--pb-bg);
  color: var(--pb-text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.pb-chip:hover { background: var(--pb-soft); }

/* Knopf unter einer Antwort, z. B. zum Kontaktformular des Kundenservice (neuer Tab, Chat bleibt offen) */
.pb-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pb-msg .pb-action {          /* .pb-msg a (Links im Text) wuerde sonst Farbe und Unterstrich ueberschreiben */
  display: inline-block;
  padding: 7px 12px;
  border-radius: 3px;
  background: var(--pb-accent);
  color: var(--pb-on-accent);
  font-size: 14px;
  text-decoration: none;
}
.pb-msg .pb-action:hover, .pb-msg .pb-action:focus-visible { color: var(--pb-on-accent); text-decoration: underline; }
.pb-msg .pb-action:focus-visible { outline: 3px solid var(--pb-text); outline-offset: 2px; }

.pb-cards { display: flex; gap: 8px; overflow-x: auto; margin: 10px -4px 2px; padding: 0 4px 4px; }
.pb-card {
  flex: 0 0 132px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--pb-line);
  border-radius: 3px;
  background: var(--pb-bg);
  color: var(--pb-text) !important;
  text-decoration: none !important;
  font-size: 13px;
}
.pb-card:hover { border-color: var(--pb-accent); }
.pb-card img, .pb-card__noimg { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; margin-bottom: 4px; }
.pb-card__name { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.pb-card__price { font-weight: 700; }
.pb-card__base, .pb-card__stock { color: var(--pb-muted); font-size: 12px; }
.pb-card__stock { color: #2e7d32; }
.pb-card__stock--no { color: #b3261e; }

.pb-rate { margin: 4px 0 10px; color: var(--pb-muted); font-size: 13px; }
.pb-rate button { border: 0; background: transparent; font-size: 17px; cursor: pointer; padding: 0 4px; }

.pb-typing { display: inline-flex; gap: 4px; }
.pb-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--pb-muted); animation: pb-dot 1s infinite ease-in-out; }
.pb-typing i:nth-child(2) { animation-delay: .15s; }
.pb-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pb-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pb-typing i { animation: none; opacity: .6; } }

.pb-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--pb-line); background: var(--pb-bg); }
.pb-form textarea {
  flex: 1;
  resize: none;
  min-height: 40px;
  max-height: 120px;
  padding: 9px 10px;
  border: 1px solid var(--pb-line);
  border-radius: 3px;
  font: inherit;
  font-size: 16px; /* iOS zoomt bei kleinerer Schrift in die Seite */
  color: var(--pb-text);
}
.pb-form button {
  width: 44px;
  border: 0;
  border-radius: 3px;
  background: var(--pb-accent);
  color: var(--pb-on-accent);
  font-size: 17px;
  cursor: pointer;
}
.pb-form button:disabled { opacity: .5; cursor: default; }

/* Benutzerbild (Avatar) */
.pb-launcher__avatar { width: 30px; height: 30px; border-radius: 50%; margin: -4px 0 -4px -6px; background: #fff; }
.pb-head__img { width: 32px; height: 32px; border-radius: 50%; display: block; background: #fff; }
.pb-head__avatar:empty { display: none; }
.pb-row { display: flex; align-items: flex-start; gap: 8px; }
.pb-row .pb-msg--bot { max-width: calc(88% - 36px); }
.pb-row__avatar { width: 28px; height: 28px; border-radius: 50%; flex: 0 0 28px; margin-top: 2px; background: #fff; }

/* Haeufige Fragen auf Produktseiten (ausserhalb des Fensters, Farben der Seite) */
.pb-faq { margin: 2rem 0 1rem; }
.pb-faq__title { font-size: 1.25rem; margin: 0 0 .75rem; }
.pb-faq__item { border-top: 1px solid #e3e3e6; padding: .6rem 0; }
.pb-faq__item:last-of-type { border-bottom: 1px solid #e3e3e6; }
.pb-faq__item summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
.pb-faq__item p { margin: .5rem 0 0; }
.pb-faq__note { margin: .5rem 0 0; font-size: .8rem; color: #6b6b70; }

/* Einstieg im Suchfenster der Livesuche */
.pb-ls-entry {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 9px 12px;
  border: 1px dashed var(--pb-line, #ccc);
  border-radius: 3px;
  background: #fafafa;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  grid-column: 1 / -1;
}
.pb-ls-entry:hover { background: #f0f0f0; }

@media (max-width: 575px) {
  .pb-root { right: 12px; bottom: 12px; }
  .pb-launcher span { display: none; }
  .pb-launcher { padding: 11px; }
  .pb-panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
}

/* Einstiege im Shop (02.11.2026): Produktseite, Haeufige Fragen, Kategorie, Startseite, Suche ohne Treffer */
.pb-entry { font-size: 14px; line-height: 1.4; }
.pb-entry__btn {
  padding: 7px 14px;
  border: 0;
  border-radius: 3px;
  background: var(--pb-accent, #333);
  color: var(--pb-on-accent, #fff);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.pb-entry__btn:hover, .pb-entry__btn:focus-visible { text-decoration: underline; }
.pb-entry__link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.pb-entry--produkt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 14px 0 6px; }
.pb-entry--faq { margin: .75rem 0 0; }
/* Startseite (1.6.1): als Karte wie der Kategorie-Hinweis statt nackter Textzeile; die Kacheln
   darueber bringen ihren Abstand selbst mit, die Bereiche darunter haben keinen eigenen. */
.pb-entry--start, .pb-entry--kategorie {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin: 0 0 16px; padding: 12px 16px; border: 1px solid #e3e3e6; border-left: 4px solid var(--pb-accent, #333);
  border-radius: 4px; background: #fff;
}
.pb-entry--start .pb-entry__text strong, .pb-entry--kategorie .pb-entry__text strong { margin-right: 4px; }
/* Abstand nach dem Raster der Startseite (1.6.2): Dampfbar-Kacheln ohne eigenen Abstand, Raster 12 px
   (.dg-service bringt oben 12 px mit); Guru-Kacheln mit 14 px unten, Bereiche darunter ohne. */
.dg-finder + .pb-entry--start { margin: 12px 0 0; }
.g27-home-bedarf + .pb-entry--start { margin: 0 0 14px; }
.pb-entry--suche { margin: 8px 0 12px; }

/* Einmaliger Hinweis am Knopf */
.pb-bubble {
  position: absolute; right: 0; bottom: calc(100% + 10px);
  display: flex; align-items: flex-start; gap: 6px;
  width: max-content; max-width: 260px; padding: 10px 10px 10px 14px;
  border: 1px solid var(--pb-line); border-radius: 8px; background: var(--pb-bg);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .14); animation: pb-bubble-in .25s ease-out;
}
.pb-bubble__text { padding: 0; border: 0; background: none; color: var(--pb-text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.pb-bubble__close { padding: 0 2px; border: 0; background: none; color: var(--pb-muted); font-size: 12px; cursor: pointer; }
@keyframes pb-bubble-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pb-bubble { animation: none; } }

.pb-start__age { font-weight: 600; }
.pb-list .pb-start { padding: 2px 4px 10px; margin-bottom: 10px; border-bottom: 1px solid var(--pb-line); font-size: 13px; color: var(--pb-muted); overflow: visible; }
.pb-list .pb-start strong, .pb-list .pb-start__age { color: var(--pb-text); }
