/**
 * REALDOT FAQs — Styles
 *
 * v1.1.0: An das Schneidereit-Designsystem angepasst (siehe design.md im
 * Projektordner): Pill-Inputs (500px), Karten mit 12px-Radius und
 * Soft-Shadow, Orange-Familie. Auf dunklen Sektionen (.uk-light von
 * YooTheme) invertieren die Custom Properties automatisch.
 * Hover/Icons bewusst im hellen Theme-Primary #ef7d00 (Kundenentscheidung
 * 20.08.2026; das dunklere #bc6200 nur, wo Orange essenzieller Text ist).
 */

.rd-faqs-search,
.rd-faqs-list,
.rd-faqs-submit {
  --rdf-accent:      #ef7d00;
  --rdf-text:        #232d31;
  --rdf-heading:     #1a1a1a;
  --rdf-muted:       #94949a;
  --rdf-surface:     #fff;
  --rdf-line:        #e5e9ed;
  --rdf-shadow:      -5px -5px 15px rgba(255, 255, 255, .9), 5px 5px 15px rgba(57, 65, 124, .12);
  --rdf-shadow-lift: -2px -2px 5px rgba(255, 255, 255, .9), 2px 2px 5px rgba(57, 65, 124, .2);
  text-align: left;
}

/* Dunkle Sektionen (Footer, Service-Blau): YooTheme setzt .uk-light */
.uk-light .rd-faqs-search,
.uk-light .rd-faqs-list,
.uk-light .rd-faqs-submit {
  --rdf-text:        rgba(255, 255, 255, .82);
  --rdf-heading:     #fff;
  --rdf-muted:       rgba(255, 255, 255, .6);
  --rdf-surface:     rgba(255, 255, 255, .07);
  --rdf-line:        rgba(255, 255, 255, .15);
  --rdf-shadow:      none;
  --rdf-shadow-lift: none;
}

/* ------------------------------------------------------------------ *
 * Accordion ([realdot_faq_list])
 * ------------------------------------------------------------------ */

.rd-faqs-item {
  background: var(--rdf-surface);
  border-radius: 12px;
  box-shadow: var(--rdf-shadow);
  margin-bottom: 20px;
  overflow: hidden;
}

.rd-faqs-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 600;
  color: var(--rdf-heading);
  list-style: none;
  transition: color .2s ease-in-out;
}

/* Standard-Dreieck des Browsers ausblenden */
.rd-faqs-question::-webkit-details-marker { display: none; }
.rd-faqs-question::marker { content: ''; }

.rd-faqs-question:hover { color: var(--rdf-accent); }

/* Plus-/Minus-Indikator */
.rd-faqs-marker {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}
.rd-faqs-marker::before,
.rd-faqs-marker::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  margin-top: -1px;
  border-radius: 2px;
  background: var(--rdf-accent);
  transition: transform .25s ease-in-out;
}
.rd-faqs-marker::after { transform: rotate(90deg); }
.rd-faqs-item[open] .rd-faqs-marker::after { transform: rotate(0deg); }
/* Während des Zuklappens dreht der Marker sofort zurück (Klasse aus dem JS),
   obwohl [open] bis zum Ende der Höhen-Animation gesetzt bleibt */
.rd-faqs-item.rd-closing .rd-faqs-marker::after { transform: rotate(90deg); }

.rd-faqs-answer {
  padding: 0 24px 20px;
  color: var(--rdf-text);
}
.rd-faqs-answer > :last-child { margin-bottom: 0; }

/* Optionaler Link-Button am Ende der Antwort (Styling kommt von
   .uk-button-secondary aus dem Theme, hier nur Abstand) */
.rd-faqs-link-wrap { margin: 16px 0 0; }

@media (prefers-reduced-motion: reduce) {
  .rd-faqs-marker::before,
  .rd-faqs-marker::after,
  .rd-faqs-question { transition: none; }
}

/* ------------------------------------------------------------------ *
 * Live-Suche ([realdot_faq_search])
 * ------------------------------------------------------------------ */

.rd-faqs-search { position: relative; }
.rd-faqs-search-input-wrap { position: relative; }

.rd-faqs-search-input {
  width: 100%;
  padding: 12px 24px;
  font: inherit;
  color: var(--rdf-text);
  background: var(--rdf-surface);
  border: 1px solid var(--rdf-line);
  border-radius: 500px; /* Pill, wie .uk-input im Theme */
  outline: none;
  transition: border-color .2s ease-in-out;
}
.rd-faqs-search-input::placeholder { color: var(--rdf-muted); }
.rd-faqs-search-input:focus { border-color: var(--rdf-accent); }

.rd-faqs-results {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.rd-faqs-empty {
  padding: 8px 2px;
  color: var(--rdf-muted);
}

.rd-faqs-result {
  display: block;
  padding: 14px 24px;
  color: var(--rdf-heading);
  text-decoration: none;
  background: var(--rdf-surface);
  border-radius: 12px;
  box-shadow: var(--rdf-shadow);
  transition: transform .2s ease-in-out, box-shadow .2s ease-in-out, color .2s ease-in-out;
}
.rd-faqs-result:hover {
  color: var(--rdf-accent);
  transform: translateY(-2px);
  box-shadow: var(--rdf-shadow-lift);
  text-decoration: none;
}

.rd-faqs-result-title {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}
.rd-faqs-result-excerpt {
  display: block;
  color: var(--rdf-text);
}
.rd-faqs-result-cat {
  display: block;
  margin-top: 4px;
  font-size: .85em;
  color: var(--rdf-muted);
}

/* ------------------------------------------------------------------ *
 * Frontend-Einreichung ([realdot_faq_submit])
 * ------------------------------------------------------------------ */

.rd-faqs-submit { max-width: 720px; }

.rd-field { margin-bottom: 16px; }
.rd-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--rdf-heading);
}
.rd-field input,
.rd-field textarea {
  width: 100%;
  padding: 12px 24px;
  font: inherit;
  color: var(--rdf-text);
  background: var(--rdf-surface);
  border: 1px solid var(--rdf-line);
  border-radius: 500px;
}
.rd-field textarea { border-radius: 12px; }
.rd-field input:focus,
.rd-field textarea:focus {
  outline: none;
  border-color: var(--rdf-accent);
}

.rd-btn {
  display: inline-block;
  padding: 0 30px;
  font-size: 15px;
  line-height: 44px;
  font-weight: 600;
  color: #fff;
  background-color: #ef7d00;
  background-image: linear-gradient(90deg, #ef7d00 50%, #ef5600 100%);
  border: 0;
  border-radius: 500px;
  cursor: pointer;
  box-shadow: var(--rdf-shadow);
  transition: box-shadow .2s ease-in-out;
}
.rd-btn:hover { box-shadow: var(--rdf-shadow-lift); }

.rd-msg {
  margin-top: 10px;
  min-height: 1.2em;
  color: var(--rdf-text);
}
