/* Fragen & Antworten: mitlaufender Knopf und Fenster (faq.js). */

/* Knopf am Desktop */
.faq-button {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 24;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px 0 18px;
  border-radius: 40px;
  background: var(--ink);
  color: var(--cream);
  font-size: 15px;
  letter-spacing: -.01em;
  cursor: pointer;
  box-shadow: 0 3px 20px #0002;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), background-color .25s ease;
  animation: faq-button-in .6s cubic-bezier(.2, .7, .2, 1) .5s both;
}
.faq-button:hover { transform: translateY(-3px); background: var(--green); }
.faq-button:focus-visible, .faq-dock-item:focus-visible, .faq-dialog-close:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.faq-button svg { flex-shrink: 0; }
@keyframes faq-button-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Fenster: am Desktop von rechts */
.faq-dialog {
  border: 0;
  padding: 0;
  margin: 0 0 0 auto;
  width: min(540px, 94vw);
  height: 100dvh;
  max-height: none;
  background: var(--cream);
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
}
.faq-dialog[open] { animation: faq-sheet-right .45s cubic-bezier(.2, .7, .2, 1) both; }
.faq-dialog::backdrop { background: #26291f80; backdrop-filter: blur(5px); animation: faq-fade .3s ease both; }
@keyframes faq-sheet-right { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes faq-sheet-up { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes faq-fade { from { opacity: 0; } to { opacity: 1; } }
.faq-dialog-inner { position: relative; padding: 78px 44px 50px; }
.faq-dialog-close {
  position: absolute;
  right: 22px;
  top: 20px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 29px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}
.faq-dialog h2 { font-size: clamp(44px, 5vw, 62px); font-weight: 400; letter-spacing: -.065em; line-height: 1.02; }
.faq-dialog h2 span { color: #89917d; }
.faq-dialog-intro { margin: 20px 0 38px; color: var(--muted); font-size: 16px; line-height: 1.55; }
.faq-dialog .faq-list summary { padding: 22px 0; font-size: 19px; }
.faq-dialog .faq-answer { padding-right: 20px; }

/* Handy: Knopf sitzt als vierter Punkt in der Leiste, Fenster kommt von unten */
.faq-dock-item { cursor: pointer; }
@media (max-width: 767px) {
  .faq-button { display: none; }
  .mobile-dock.has-faq > * { padding-left: 3px; padding-right: 3px; }
  .faq-dialog {
    margin: auto 0 0;
    width: 100vw;
    max-width: none;
    height: auto;
    max-height: 88dvh;
    border-radius: 22px 22px 0 0;
  }
  .faq-dialog[open] { animation-name: faq-sheet-up; }
  .faq-dialog-inner { padding: 64px 22px 36px; }
  .faq-dialog-close { right: 14px; top: 14px; }
  .faq-dialog h2 { font-size: 44px; }
  .faq-dialog-intro { margin-bottom: 26px; }
  .faq-dialog .faq-list summary { padding: 20px 0; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .faq-button, .faq-dialog[open], .faq-dialog::backdrop { animation: none; }
  .faq-button { transition: none; }
}
@media print { .faq-button, .faq-dock-item { display: none; } }
