/* ============================================================
   Plate Hilfecenter – FAQ UI
   Styles ergänzen die bestehende Design-Sprache der Website.
   ============================================================ */

.faq-shell {
  --faq-ink: #0a0a0f;
  --faq-muted: #5b5b66;
  --faq-line: rgba(10, 10, 15, 0.08);
  --faq-paper: #ffffff;
  --faq-soft: rgba(10, 10, 15, 0.035);
  --faq-brand: #3f56ff;
  --faq-radius: 1.15rem;
}

.faq-search {
  position: relative;
  margin-bottom: 2rem;
}

.faq-search__icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  width: 1.15rem;
  height: 1.15rem;
  transform: translateY(-50%);
  color: var(--faq-muted);
  pointer-events: none;
}

.faq-search__input {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--faq-line);
  border-radius: 9999px;
  background: var(--faq-paper);
  box-shadow: 0 1px 2px rgba(10, 10, 15, 0.04), 0 12px 40px -16px rgba(10, 10, 15, 0.1);
  color: var(--faq-ink);
  font-size: 15.5px;
  line-height: 1.4;
  padding: 0.95rem 2.85rem 0.95rem 2.85rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-search__input::-webkit-search-decoration,
.faq-search__input::-webkit-search-cancel-button,
.faq-search__input::-webkit-search-results-button,
.faq-search__input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.faq-search__input::placeholder {
  color: rgba(91, 91, 102, 0.72);
}

.faq-search__input:focus {
  border-color: rgba(63, 86, 255, 0.45);
  box-shadow:
    0 0 0 1px rgba(63, 86, 255, 0.14),
    0 10px 40px -8px rgba(63, 86, 255, 0.22);
}

.faq-search__clear {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--faq-muted);
  cursor: pointer;
}

.faq-search__clear:hover {
  background: var(--faq-soft);
  color: var(--faq-ink);
}

.faq-search__clear[hidden] {
  display: none;
}

.faq-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
}

.faq-filter {
  appearance: none;
  border: 1px solid var(--faq-line);
  border-radius: 9999px;
  background: var(--faq-paper);
  color: var(--faq-muted);
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.55rem 0.9rem;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.faq-filter:hover {
  border-color: rgba(10, 10, 15, 0.16);
  color: var(--faq-ink);
}

.faq-filter.is-active {
  border-color: rgba(10, 10, 15, 0.88);
  background: var(--faq-ink);
  color: #fff;
}

.faq-filter:focus-visible {
  outline: 2px solid rgba(63, 86, 255, 0.55);
  outline-offset: 2px;
}

.faq-status {
  margin: 0 0 1.5rem;
  color: var(--faq-muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.faq-status--error {
  color: #b42318;
}

.faq-section + .faq-section {
  margin-top: 2.25rem;
}

.faq-section__title {
  margin: 0 0 0.85rem;
  color: var(--faq-ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: left;
}

.faq-section__title--featured {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.faq-section__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--faq-brand);
}

.faq-list {
  border: 1px solid var(--faq-line);
  border-radius: var(--faq-radius);
  background: var(--faq-paper);
  box-shadow: 0 1px 2px rgba(10, 10, 15, 0.04), 0 12px 40px -16px rgba(10, 10, 15, 0.1);
  overflow: hidden;
}

.faq-item + .faq-item {
  border-top: 1px solid var(--faq-line);
}

.faq-item__trigger {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border: 0;
  background: transparent;
  color: var(--faq-ink);
  cursor: pointer;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.45;
  padding: 1.05rem 1.15rem;
  text-align: left;
  transition: background-color 0.18s ease;
}

.faq-item__trigger:hover {
  background: var(--faq-soft);
}

.faq-item__trigger:focus-visible {
  outline: 2px solid rgba(63, 86, 255, 0.55);
  outline-offset: -2px;
}

.faq-item__chevron {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  color: var(--faq-muted);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.is-open .faq-item__chevron {
  transform: rotate(180deg);
}

.faq-item__panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.34s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.28s ease;
}

.faq-item.is-open .faq-item__panel {
  grid-template-rows: 1fr;
  opacity: 1;
}

.faq-item__panel-inner {
  overflow: hidden;
  min-height: 0;
}

.faq-item__content {
  margin: 0;
  padding: 0 1.15rem 1.15rem;
  color: var(--faq-muted);
  font-size: 15px;
  line-height: 1.65;
  white-space: pre-wrap;
  transform: translateY(-4px);
  transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.is-open .faq-item__content {
  transform: translateY(0);
}

.faq-empty {
  border: 1px dashed var(--faq-line);
  border-radius: var(--faq-radius);
  padding: 1.5rem 1.25rem;
  color: var(--faq-muted);
  font-size: 15px;
  line-height: 1.55;
  text-align: left;
}

.faq-skeleton {
  display: grid;
  gap: 0.75rem;
}

.faq-skeleton__block {
  height: 3.4rem;
  border-radius: 1rem;
  background: linear-gradient(
    90deg,
    rgba(10, 10, 15, 0.04),
    rgba(10, 10, 15, 0.08),
    rgba(10, 10, 15, 0.04)
  );
  background-size: 200% 100%;
  animation: faq-shimmer 1.2s ease-in-out infinite;
}

@keyframes faq-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-item__panel,
  .faq-item__chevron,
  .faq-item__content,
  .faq-search__input,
  .faq-skeleton__block {
    animation: none !important;
    transition: none !important;
  }
}
