/* Hilfe-Sprechblase unten links (vorlagen/teile/hilfe.html) und ihr Panel (assets/js/hilfe.js, <dialog>), Celina 25.10.2026.
   Knopf: schwarzer Kreis, darin eine Comic-Sprechblase mit weißer Kontur (Celina, 25.10. abends). Er liegt unter Kopf,
   Menü, Suche, Warenkorb und Einwilligungshinweis und blendet sich aus, solange eines davon offen ist oder man nach unten scrollt. */
.hilfe-knopf {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 80;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 26px -12px rgba(20, 20, 20, .6);
  transition: transform .18s ease, opacity .2s ease;
}
.hilfe-knopf svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.hilfe-knopf:hover { transform: translateY(-2px); }
html.runter .hilfe-knopf, html.hilfe-warte .hilfe-knopf, body:has(:is(input, textarea, select):focus) .hilfe-knopf, html.search-layer-open .hilfe-knopf, html.hilfe-offen .hilfe-knopf, body.cart-is-open .hilfe-knopf,
body:has(.site-header.open, .quick-layer:not([hidden]), .bild-zoom:not([hidden]), .filter-panel.open, .analytics-consent.is-visible) .hilfe-knopf {
  opacity: 0;
  visibility: hidden;
  transform: scale(.8);
  transition: transform .18s ease, opacity .2s ease, visibility 0s .2s;   /* sichtbar sofort, damit der Fokus zurückkann */
}
@media (max-width: 820px) {
  .hilfe-knopf { left: max(12px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); width: 48px; height: 48px; }
  .hilfe-knopf svg { width: 27px; height: 27px; }
}

/* Panel: am Computer schwebend unten links, am Handy als Blatt von unten. Das Maskottchen schaut über die Oberkante. */
.hilfe {
  position: fixed;
  inset: auto auto max(22px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  width: min(412px, calc(100vw - 44px));
  max-width: none;
  max-height: min(740px, calc(100dvh - 130px));
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 34px 80px -30px rgba(20, 20, 20, .55);
}
.hilfe[open] { display: flex; flex-direction: column; animation: hilfe-auf .24s cubic-bezier(.22, 1, .36, 1); }
.hilfe::backdrop { background: rgba(20, 20, 20, .2); }
@keyframes hilfe-auf { from { opacity: 0; transform: translateY(16px) scale(.98); } }
html.hilfe-offen { overflow: hidden; }

.hilfe__maskottchen { position: absolute; top: -63px; right: 64px; width: 78px; height: auto; pointer-events: none; }
.hilfe__kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 18px 14px 22px; border-bottom: 1px solid var(--line); }
.hilfe__titel { margin: 0; font: 700 1.3rem/1.2 var(--disp); }
.hilfe__titel:focus { outline: none; }
.hilfe__zu { display: grid; flex: none; place-items: center; width: 40px; height: 40px; min-height: 40px; margin: -4px -4px 0 0; padding: 0;
  border: 0; border-radius: 50%; background: #f1f2f4; color: var(--ink); cursor: pointer; }
.hilfe__zu:hover { background: #e4e6ea; }
.hilfe__zu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.hilfe__inhalt { display: grid; flex: 1 1 auto; align-content: start; gap: 24px; min-height: 0; padding: 18px 22px 24px; overflow-y: auto; overscroll-behavior: contain; }

/* Kontakt zuerst, als hellblaue Karte */
.hilfe__kontakt { display: grid; gap: 10px; padding: 18px; border-radius: 16px; background: #edf2fe; }
.hilfe__frage-zeile { display: flex; align-items: center; gap: 12px; }
.hilfe__produkt-bild { flex: none; width: 46px; height: 57px; border-radius: 10px; background: #fff; object-fit: cover; }
.hilfe__frage { margin: 0; font: 700 1.06rem/1.3 var(--disp); }
.hilfe__text { margin: -4px 0 2px; color: #4b5060; font-size: .88rem; line-height: 1.45; }
.hilfe__form { display: grid; gap: 12px; }
.hilfe__form label { display: grid; gap: 6px; font-size: .86rem; font-weight: 600; }
.hilfe__form input:not([type="hidden"]), .hilfe__form textarea { width: 100%; padding: 12px 14px; border: 1px solid #d3d8e2; border-radius: 12px;
  background: #fff; color: var(--ink); font: 400 16px/1.4 var(--sans); }
.hilfe__form textarea { min-height: 96px; resize: vertical; }
.hilfe__form input:focus, .hilfe__form textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(20, 20, 20, .07); }
.hilfe__pruefung:empty { display: none; }
/* Bilder: Auswahl als ruhige Zeile mit Symbol, darüber die Vorschau der hochgeladenen (höchstens 3) */
.hilfe__bilder { display: grid; gap: 10px; }
.hilfe__vorschau { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hilfe__vorschau:empty { display: none; }
.hilfe__bild { position: relative; width: 64px; height: 64px; border-radius: 10px; background: #dfe5f3; }
.hilfe__bild img { width: 100%; height: 100%; border-radius: 10px; object-fit: cover; }
.hilfe__bild img:not([src]) { visibility: hidden; }
.hilfe__bild.is-laedt img { opacity: .45; }
.hilfe__bild.is-laedt::after { content: ""; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border: 2.5px solid #fff;
  border-top-color: var(--ink); border-radius: 50%; animation: hilfe-dreh .8s linear infinite; }
@keyframes hilfe-dreh { to { transform: rotate(360deg); } }
.hilfe__bild button { position: absolute; top: -7px; right: -7px; display: grid; place-items: center; width: 24px; height: 24px; min-height: 24px;
  padding: 0; border: 2px solid #edf2fe; border-radius: 50%; background: var(--ink); color: #fff; cursor: pointer; }
.hilfe__bild button svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.hilfe__form .hilfe__bild-wahl { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px dashed #b9c3d8; border-radius: 12px;
  background: #fff; cursor: pointer; font-weight: 400; }
.hilfe__bild-wahl:hover { border-color: var(--ink); }
.hilfe__bild-wahl:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.hilfe__bild-wahl svg { flex: none; width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hilfe__bild-wahl span { display: grid; gap: 1px; }
.hilfe__bild-wahl strong { font-size: .88rem; font-weight: 600; }
.hilfe__bild-wahl small { color: #4b5060; font-size: .78rem; }
.hilfe__senden { justify-self: start; margin: 0; padding: 12px 24px; }
.hilfe__form .form-status { margin: 0; }
.hilfe__form .form-status:empty { display: none; }
.hilfe__hinweis { margin: 0; color: #4b5060; font-size: .8rem; line-height: 1.45; }
.hilfe__hinweis a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.hilfe__wechsel { justify-self: start; min-height: 0; padding: 2px 0; border: 0; background: none; color: var(--ink); font: 600 .86rem/1.4 var(--sans);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.hilfe__danke { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 12px; background: #fff; color: #176b55; }
.hilfe__danke:focus { outline: none; }
.hilfe__danke svg { flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hilfe__danke p { margin: 0; color: var(--ink); font-size: .92rem; line-height: 1.5; }

/* Häufige Fragen mit Suchfeld */
.hilfe__faq h3 { margin: 0 0 10px; font: 700 1.06rem/1.3 var(--disp); }
.hilfe__suche { width: 100%; padding: 11px 14px 11px 40px; border: 1px solid #d3d8e2; border-radius: 999px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E") no-repeat 14px center / 18px;
  color: var(--ink); font: 400 16px/1.4 var(--sans); }
.hilfe__suche:focus { outline: none; border-color: var(--ink); }
.hilfe__gruppe { margin-top: 16px; }
.hilfe__gruppe h4 { margin: 0 0 6px; color: var(--ink); font-size: .98rem; font-weight: 600; }
.hilfe .faq__item { margin-top: 6px; border-radius: 12px; }
.hilfe .faq__item summary { padding: 12px 40px 12px 14px; font-size: .92rem; line-height: 1.4; }
.hilfe .faq__item summary::after { right: 14px; }
.hilfe .faq__item p { padding: 0 14px 14px; font-size: .9rem; line-height: 1.5; }
.hilfe__laden, .hilfe__leer { margin: 12px 0 0; color: var(--muted); font-size: .9rem; }
.hilfe__alle { display: inline-block; margin-top: 18px; }

@media (max-width: 640px) {
  .hilfe { inset: auto 0 0 0; width: 100%; max-height: calc(100dvh - 84px); border-width: 1px 0 0; border-radius: 22px 22px 0 0; }
  .hilfe[open] { animation-name: hilfe-hoch; }
  .hilfe__inhalt { padding: 16px 16px max(24px, env(safe-area-inset-bottom)); }
  .hilfe__kontakt { padding: 16px; }
  .hilfe__kopf { padding: 18px 14px 12px 18px; }
  .hilfe__maskottchen { right: 58px; }
}
@keyframes hilfe-hoch { from { transform: translateY(30%); opacity: .4; } }
@media (prefers-reduced-motion: reduce) {
  .hilfe-knopf, .hilfe[open], .hilfe__bild.is-laedt::after { transition: none; animation: none; }
}

/* FAQ im Panel klappt weich auf und zu (Celina 25.10.2026), wie die Akkordeons der Produktseite; Schließen über main.js (is-zu) */
.hilfe .faq__item::details-content { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .42s cubic-bezier(.25, .8, .25, 1), content-visibility .42s allow-discrete; }
.hilfe .faq__item[open]::details-content { grid-template-rows: 1fr; }
.hilfe .faq__item.is-zu::details-content { grid-template-rows: 0fr; }
.hilfe .faq__body { min-height: 0; overflow: hidden; }
.hilfe .faq__item[open] .faq__body > p { animation: lb-auf .42s ease both; }
.hilfe .faq__item.is-zu .faq__body > p { animation: lb-zu .3s ease both; }
@media (prefers-reduced-motion: reduce) { .hilfe .faq__item::details-content { transition: none; } .hilfe .faq__body > p { animation: none !important; } }
