/*************************************************
 * FORMAVIS FORMS · Kontakt, Widerruf, Schaden,
 * Formular-Übersicht & Auto-Artikel
 *************************************************/

/* ============================================
   4) FORMULARE (Kontakt, Widerruf, Schaden etc.)
   ============================================ */

.formavis-form {
  margin: 0 auto;
  max-width: 840px;
  background: var(--fv-bg-elevated);
  border-radius: 18px;
  padding: 2rem 1.8rem 2.2rem;
  border: 1px solid var(--fv-border);
  box-shadow:
    0 28px 55px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(15, 23, 42, 0.9);
}

.formavis-form-title {
  margin-top: 0;
  margin-bottom: 0.7rem;
  font-size: 1.4rem;
  color: var(--fv-text);
}

.fv-hint,
.fv-form-hint,
.fv-helptext {
  font-size: 0.9rem;
  color: var(--fv-text-muted);
  margin-bottom: 1.1rem;
}

.fv-fieldset {
  border: 1px solid rgba(55, 65, 81, 0.8);
  border-radius: 14px;
  padding: 1.2rem 1rem 1.1rem;
  margin: 0 0 1.2rem;
  background: var(--fv-bg-soft);
}

.fv-fieldset legend {
  padding: 0 0.4rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--fv-text-soft);
}

.fv-field {
  margin-bottom: 0.9rem;
}

.fv-field label {
  font-size: 0.92rem;
  color: var(--fv-text);
}

.fv-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.fv-input,
.fv-textarea,
.formavis-form select {
  width: 100%;
  box-sizing: border-box;
  border-radius: 999px;
  border: 1px solid rgba(75, 85, 99, 0.9);
  background: #020617;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  color: var(--fv-text);
  outline: none;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease,
    transform 0.06s ease;
}

.fv-textarea {
  border-radius: 14px;
  min-height: 120px;
  resize: vertical;
}

.fv-input:focus,
.fv-textarea:focus,
.formavis-form select:focus {
  border-color: var(--fv-primary-strong);
  box-shadow:
    0 0 0 1px rgba(34, 197, 142, 0.75),
    0 0 25px rgba(34, 197, 142, 0.35);
  background: #020617;
  transform: translateY(-1px);
}

.fv-checkbox,
.fv-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  color: var(--fv-text-soft);
  cursor: pointer;
}

.fv-checkbox input,
.fv-radio input {
  accent-color: var(--fv-primary);
}

.fv-actions {
  margin-top: 1.4rem;
  display: flex;
  justify-content: flex-end;
}

/* Speziell: Transportschaden-Formular */
.formavis-form.formavis-damage-form {
  max-width: 920px;
}

.formavis-damage-form input[type="number"] {
  -moz-appearance: textfield;
}
.formavis-damage-form input[type="number"]::-webkit-outer-spin-button,
.formavis-damage-form input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* DSGVO Pflichtstern */
.fv-required {
  color: var(--fv-danger);
  margin-right: 4px;
  font-weight: 700;
}

/* DSGVO Checkbox im Formular */
.fv-fieldset .fv-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--fv-text);
  max-width: 100%;
}

.fv-fieldset .fv-checkbox input[type="checkbox"] {
  margin-top: 0.2rem;
  transform: scale(1.18);
}

.fv-fieldset .fv-checkbox a {
  color: var(--fv-primary);
  text-decoration: underline;
}

.fv-fieldset .fv-checkbox a:hover {
  color: var(--fv-accent);
}

/* DSGVO-Feld extra */
.fv-dsgvo-field .fv-checkbox {
  align-items: flex-start;
}
.fv-dsgvo-field .fv-checkbox input[type="checkbox"] {
  margin-top: 0.15rem;
}
.fv-dsgvo-field .fv-dsgvo-text {
  display: inline-block;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--fv-text-soft);
}
.fv-dsgvo-field .fv-dsgvo-text a {
  color: var(--fv-primary-strong);
  text-decoration: underline;
}
.fv-dsgvo-field .fv-dsgvo-text a:hover {
  color: var(--fv-accent);
}

/* Kontakt-Layout (aktuell: 1 Spalte) */
.formavis-contact-layout {
  display: block;
  width: 100%;
}
.formavis-contact-form-wrapper {
  width: 100%;
}
.formavis-contact-form {
  max-width: 100%;
  margin: 0;
}

/* Responsive Formulare */
@media (max-width: 900px) {
  .formavis-form {
    padding: 1.7rem 1.2rem 1.8rem;
  }
}
@media (max-width: 700px) {
  .fv-field-row {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* ============================================
   5) READONLY-FELDER & AUTO ERKANNTER ARTIKEL
   ============================================ */

.fv-input[readonly] {
  background: rgba(32, 34, 37, 0.55) !important;
  border-color: rgba(75, 85, 99, 0.55) !important;
  color: var(--fv-muted) !important;
  cursor: not-allowed !important;
  opacity: 0.85;
  box-shadow: inset 0 0 6px rgba(44, 156, 124, 0.18);
}

.fv-input[readonly]:hover {
  transform: none !important;
  box-shadow: none !important;
}

.fv-field.readonly-field label::after {
  content: " (automatisch erkannt)";
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--fv-text-muted);
  margin-left: 4px;
  opacity: 0.9;
}

/* Auto erkannter Produkt-Hinweis */
.fv-product-detected {
  margin-bottom: 1.2rem;
  border-radius: 1rem;
  border: 1px solid var(--fv-border, #2A2D30);
  background:
    radial-gradient(circle at top left,
      rgba(44, 156, 124, 0.18) 0,
      rgba(18, 19, 20, 0.98) 45%);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(5, 5, 6, 0.85);
  overflow: hidden;
}

.fv-product-detected__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
}

.fv-product-detected__summary::-webkit-details-marker {
  display: none;
}

.fv-product-detected__summary-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fv-product-detected__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.75);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fv-muted);
  background: rgba(9, 10, 11, 0.96);
}

.fv-product-detected__name {
  font-size: 0.92rem;
  font-weight: 500;
  color: #F9FAFB;
}

.fv-product-detected__link a {
  font-size: 0.8rem;
  color: var(--fv-primary-strong, #22C58B);
  text-decoration: none;
}
.fv-product-detected__link a:hover {
  text-decoration: underline;
}

.fv-product-detected__toggle-icon {
  font-size: 0.8rem;
  opacity: 0.8;
  transition: transform 0.18s ease;
}

.fv-product-detected[open] .fv-product-detected__toggle-icon {
  transform: rotate(180deg);
}

.fv-product-detected__body {
  padding: 0.6rem 1rem 0.9rem;
  border-top: 1px solid rgba(42, 45, 48, 0.9);
}

.fv-product-detected .fv-input[readonly] {
  background: rgba(15, 17, 19, 0.9) !important;
  border-color: rgba(75, 85, 99, 0.85) !important;
  color: var(--fv-muted) !important;
  cursor: not-allowed !important;
  box-shadow: inset 0 0 6px rgba(44, 156, 124, 0.18);
}

.fv-product-detected .readonly-field label::after {
  content: " (automatisch erkannt)";
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--fv-text-muted);
  margin-left: 4px;
}

.fv-helptext--product {
  margin-top: 0.25rem;
  font-size: 0.84rem;
  color: var(--fv-text-muted);
}

@media (max-width: 700px) {
  .fv-product-detected__summary {
    align-items: flex-start;
  }
}


/* ============================================
   6) FORMULAR-ÜBERSICHT · FORMULARE & ONLINE-MELDUNGEN
   ============================================ */

.fv-form-center {
  background: var(--fv-bg);
  padding: 4rem 1.5rem;
  color: var(--fv-text);
  font-family: system-ui, sans-serif;
}

/* Kopfbereich */
.fv-form-page-header {
  max-width: 780px;
  margin: 0 auto 3rem;
  text-align: center;
}

.fv-form-page-header h1 {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
  color: var(--fv-text);
}

.fv-form-page-header p {
  font-size: 1.1rem;
  color: var(--fv-muted);
}

/* Grid der Formular-Kacheln */
.fv-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Einzelne Formular-Karte */
.fv-form-card {
  background: var(--fv-bg-elevated);
  border: 1px solid var(--fv-border);
  padding: 1.6rem;
  border-radius: 16px;
  text-decoration: none;
  color: var(--fv-text);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
  text-align: center;
}

.fv-form-card:hover {
  transform: translateY(-4px);
  border-color: var(--fv-primary);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
  background: var(--fv-bg-soft);
}

/* Icon */
.fv-form-icon {
  display: block;
  font-size: 2.2rem;
  margin: 0 auto 0.15rem auto;
  text-align: center;
}

/* Überschrift mit Unterstreichung */
.fv-form-card h2 {
  margin: 0.1rem 0 0.15rem;
  font-size: 1.35rem;
  font-weight: 600;
  text-align: center;
  text-decoration: underline;
  text-decoration-color: var(--fv-primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Untertitel */
.fv-form-card p {
  margin: 0;
  font-size: 1rem;
  color: var(--fv-muted);
  text-align: center;
}

.fv-form-card:hover h2 {
  text-decoration-color: var(--fv-accent);
}

/* Formular-Grid Responsive */
@media (max-width: 600px) {
  .fv-form-page-header h1 {
    font-size: 2rem;
  }
  .fv-form-card {
    padding: 1.4rem;
  }
}