/* ============================================================
   AUTOANKAUF-MITTELLAND — POLISHED MULTI-STEP FORM
   Version 1.2.0
   ============================================================ */

.asvf-wrap,
.asvf-wrap * {
  box-sizing: border-box;
}

.asvf-wrap {
  --asvf-primary: #2563eb;
  --asvf-primary-dark: #1d4ed8;
  --asvf-primary-soft: #eff6ff;
  --asvf-text: #111827;
  --asvf-muted: #6b7280;
  --asvf-border: #e5e7eb;
  --asvf-field: #f3f4f6;
  --asvf-danger: #b91c1c;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: clamp(24px, 4vw, 48px);
  overflow: hidden;
  color: var(--asvf-text);
  font: inherit;
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: 22px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.1);
}

.asvf-title {
  margin: 0 0 32px;
  color: var(--asvf-text);
  font: inherit;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-align: center;
}

/* Progress indicator */
.asvf-progress {
  position: relative;
  margin: 0 0 clamp(34px, 5vw, 50px);
}

.asvf-progress-steps {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.asvf-progress-steps::before,
.asvf-progress-bar {
  position: absolute;
  top: 17px;
  right: calc(100% / 12);
  left: calc(100% / 12);
  height: 3px;
  border-radius: 999px;
}

.asvf-progress-steps::before {
  z-index: -2;
  content: "";
  background: #dbe2ea;
}

.asvf-progress-bar {
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}

.asvf-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--asvf-primary);
  border-radius: inherit;
  transition: width 0.3s ease;
}

.asvf-progress-step {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #9ca3af;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  transition: color 0.25s ease;
}

.asvf-progress-number {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 700;
  background: #fff;
  border: 2px solid #dbe2ea;
  border-radius: 50%;
  box-shadow: 0 0 0 5px #fff;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}

.asvf-progress-step.is-active,
.asvf-progress-step.is-complete {
  color: var(--asvf-primary);
}

.asvf-progress-step.is-active .asvf-progress-number,
.asvf-progress-step.is-complete .asvf-progress-number {
  color: #fff;
  background: var(--asvf-primary);
  border-color: var(--asvf-primary);
}

.asvf-progress-step.is-active .asvf-progress-number {
  box-shadow:
    0 0 0 5px #fff,
    0 0 0 8px rgba(37, 99, 235, 0.13);
}

.asvf-progress-text {
  margin: 12px 0 0;
  color: var(--asvf-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}

/* Steps and headings */
.asvf-step {
  display: none;
  animation: asvf-fade-in 0.24s ease;
}

.asvf-step.is-active {
  display: block;
}

.asvf-step h3 {
  margin: 0 0 24px;
  color: var(--asvf-text);
  font: inherit;
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-align: center;
}

.asvf-step > p {
  max-width: 720px;
  margin: -10px auto 24px;
  color: var(--asvf-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  text-align: center;
}

.asvf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.asvf-grid .asvf-field {
  margin-bottom: 0;
}

.asvf-grid .asvf-field-full {
  grid-column: 1 / -1;
}

/* Standard fields */
.asvf-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--asvf-text);
  font-size: 0.91rem;
  font-weight: 600;
}

.asvf-field input,
.asvf-field textarea {
  width: 100%;
  max-width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  color: var(--asvf-text);
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  outline: none;
  background: var(--asvf-field);
  border: 1px solid transparent;
  border-radius: 11px;
  box-shadow: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.asvf-field textarea {
  min-height: 132px;
  resize: vertical;
}

.asvf-field input:hover,
.asvf-field textarea:hover {
  background: #eef0f3;
}

.asvf-field input:focus,
.asvf-field textarea:focus {
  background: #fff;
  border-color: var(--asvf-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.asvf-field small {
  color: var(--asvf-muted);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
}

/* Searchable make/model autocomplete */
.asvf-autocomplete-control {
  position: relative;
  display: block;
  min-width: 0;
  margin: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: normal !important;
}

.asvf-autocomplete-control > input {
  display: block;
}

.asvf-suggestions {
  position: absolute;
  z-index: 100;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 250px;
  padding: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid var(--asvf-border);
  border-radius: 11px;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.16);
}

.asvf-suggestions[hidden] {
  display: none !important;
}

.asvf-suggestion {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--asvf-text) !important;
  font: inherit;
  font-size: 0.94rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.asvf-suggestion:hover,
.asvf-suggestion.is-active {
  color: var(--asvf-primary-dark) !important;
  background: var(--asvf-primary-soft) !important;
}

/* Selectable cards */
.asvf-choice {
  padding: 0;
  margin: 0 0 26px;
  border: 0;
}

.asvf-choice legend {
  padding: 0;
  margin: 0 0 11px;
  color: var(--asvf-text);
  font-size: 0.91rem;
  font-weight: 600;
}

.asvf-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}

.asvf-cards label {
  min-width: 0;
  margin: 0;
}

.asvf-cards input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.asvf-cards span {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 11px 12px;
  color: #374151;
  font-size: 0.91rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  user-select: none;
  background: var(--asvf-field);
  border: 1px solid transparent;
  border-radius: 11px;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.asvf-cards span:hover {
  color: var(--asvf-primary-dark);
  background: var(--asvf-primary-soft);
  border-color: #bfdbfe;
}

.asvf-cards input:checked + span {
  color: var(--asvf-primary-dark);
  background: var(--asvf-primary-soft);
  border-color: var(--asvf-primary);
  box-shadow: inset 0 0 0 1px var(--asvf-primary);
}

.asvf-cards input:focus-visible + span {
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

/* Upload area */
.asvf-drop {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  color: var(--asvf-primary-dark);
  text-align: center;
  cursor: pointer;
  background: #f8fbff;
  border: 2px dashed #93b4f8;
  border-radius: 15px;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.asvf-drop:hover,
.asvf-drop.is-dragging {
  background: var(--asvf-primary-soft);
  border-color: var(--asvf-primary);
}

.asvf-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.asvf-drop strong {
  font-size: 1rem;
  font-weight: 700;
}

.asvf-drop small {
  margin-top: 7px;
  color: var(--asvf-muted);
  font-size: 0.8rem;
}

.asvf-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.asvf-preview {
  position: relative;
  padding: 7px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--asvf-border);
  border-radius: 12px;
}

.asvf-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.asvf-wrap .asvf-preview button {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  margin: 6px 0 0;
  color: var(--asvf-danger);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  border: 0;
  border-radius: 7px;
}

.asvf-wrap .asvf-preview button:hover {
  background: #fef2f2;
}

/* Privacy / legal notices */
.asvf-photo-privacy,
.asvf-legal-notice {
  max-width: 720px;
  margin: 0 auto 18px;
  color: var(--asvf-muted);
  font-size: 0.84rem;
  line-height: 1.55;
  text-align: center;
}

.asvf-legal-notice {
  margin-top: 18px;
  margin-bottom: 6px;
  font-size: 0.82rem;
}

.asvf-photo-privacy {
  margin-top: -6px;
}

/* Consent options */
.asvf-check {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin: 14px 0;
  color: #4b5563;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.55;
}

.asvf-check input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--asvf-primary);
}

.asvf-check a {
  color: var(--asvf-primary-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Navigation */
.asvf-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
  margin-top: 28px;
  border: 0;
}

.asvf-wrap .asvf-nav button {
  display: inline-flex;
  min-width: 150px;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  margin: 0;
  color: #fff;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  background: var(--asvf-primary);
  border: 1px solid var(--asvf-primary);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.asvf-wrap .asvf-nav button:hover {
  color: #fff;
  background: var(--asvf-primary-dark);
  border-color: var(--asvf-primary-dark);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
  transform: translateY(-1px);
}

.asvf-wrap .asvf-nav button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.asvf-wrap .asvf-nav button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.asvf-wrap .asvf-nav .asvf-back {
  color: #374151;
  background: #fff;
  border-color: #d1d5db;
  box-shadow: none;
}

.asvf-wrap .asvf-nav .asvf-back:hover {
  color: var(--asvf-primary-dark);
  background: var(--asvf-primary-soft);
  border-color: #bfdbfe;
  box-shadow: none;
}

.asvf-next,
.asvf-submit {
  margin-left: auto !important;
}

/* Messages and validation */
.asvf-message {
  min-height: 1.4em;
  margin-top: 18px;
  color: var(--asvf-danger);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

.asvf-invalid input,
.asvf-invalid textarea,
.asvf-invalid span {
  border-color: var(--asvf-danger) !important;
}

.asvf-invalid input,
.asvf-invalid textarea {
  background: #fff7f7;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.08);
}

.asvf-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.asvf-success {
  padding: 40px 10px;
  text-align: center;
}

.asvf-success h3 {
  margin: 0 0 12px;
  color: var(--asvf-text);
  font-size: 1.6rem;
}

.asvf-success p {
  margin: 0;
  color: var(--asvf-muted);
  line-height: 1.65;
}

@keyframes asvf-fade-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Compact shortcode mode */
.asvf-compact {
  padding: clamp(20px, 3vw, 34px);
}

.asvf-compact .asvf-title {
  margin-bottom: 24px;
}

.asvf-compact .asvf-progress {
  margin-bottom: 30px;
}

/* Tablet */
@media (max-width: 767px) {
  .asvf-wrap {
    padding: 28px 22px;
    border-radius: 18px;
  }

  .asvf-title {
    margin-bottom: 27px;
  }

  .asvf-progress {
    margin-bottom: 34px;
  }

  .asvf-progress-label {
    display: none;
  }

  .asvf-progress-steps {
    gap: 4px;
  }

  .asvf-progress-steps::before,
  .asvf-progress-bar {
    top: 15px;
  }

  .asvf-progress-number {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
    box-shadow: 0 0 0 4px #fff;
  }

  .asvf-progress-step.is-active .asvf-progress-number {
    box-shadow:
      0 0 0 4px #fff,
      0 0 0 7px rgba(37, 99, 235, 0.12);
  }

  .asvf-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .asvf-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asvf-nav {
    margin-top: 24px;
  }

  .asvf-wrap .asvf-nav button {
    min-width: 0;
    flex: 1;
    padding-right: 14px;
    padding-left: 14px;
  }
}

/* Small mobile */
@media (max-width: 420px) {
  .asvf-wrap {
    padding: 24px 16px;
    border-radius: 15px;
  }

  .asvf-title {
    font-size: 1.55rem;
  }

  .asvf-progress-number {
    width: 29px;
    height: 29px;
    font-size: 0.7rem;
  }

  .asvf-progress-steps::before,
  .asvf-progress-bar {
    top: 13px;
  }

  .asvf-progress-text {
    margin-top: 10px;
  }

  .asvf-step h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
  }

  .asvf-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .asvf-cards span {
    min-height: 52px;
    padding: 9px 8px;
    font-size: 0.84rem;
  }

  .asvf-drop {
    min-height: 165px;
    padding: 22px 16px;
  }

  .asvf-previews {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .asvf-wrap *,
  .asvf-wrap *::before,
  .asvf-wrap *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
