/* Electrabike standalone Test Ride v2 — inline field labels */

html.eb-test-ride-open {
  overflow: hidden;
}

.eb-test-ride-overlay[hidden] {
  display: none !important;
}

.eb-test-ride-overlay {
  --eb-tr-accent: #c59f72;
  --eb-tr-accent-dark: #af8659;
  --eb-tr-ink: #312d2a;
  --eb-tr-muted: #77716b;
  --eb-tr-line: #e8e3dd;
  --eb-tr-soft: #faf8f5;
  position: fixed;
  z-index: 10050;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  overflow: auto;
  background: rgba(22, 20, 18, .72);
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(4px);
  transition: opacity .18s ease, visibility .18s ease;
}

.eb-test-ride-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.eb-test-ride-dialog {
  position: relative;
  width: min(960px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .3);
  transform: translateY(12px) scale(.99);
  transition: transform .18s ease;
}

.eb-test-ride-overlay.is-open .eb-test-ride-dialog {
  transform: none;
}

.eb-test-ride-close {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--eb-tr-line);
  border-radius: 50%;
  background: #fff;
  color: var(--eb-tr-ink);
  cursor: pointer;
}

.eb-test-ride-close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.eb-test-ride-form-view {
  padding: 38px;
}

.eb-test-ride-form-view[hidden],
.eb-test-ride-success[hidden] {
  display: none !important;
}

.eb-test-ride-header {
  max-width: 650px;
  padding-right: 54px;
  margin-bottom: 28px;
}

.eb-test-ride-eyebrow {
  margin: 0 0 8px;
  color: var(--eb-tr-accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.eb-test-ride-header h2,
.eb-test-ride-success h2 {
  margin: 0;
  color: var(--eb-tr-ink);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.eb-test-ride-header > p:last-child,
.eb-test-ride-success > p {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--eb-tr-muted);
  font-size: 16px;
  line-height: 1.55;
}

.eb-test-ride-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
  gap: 30px;
  align-items: start;
}

.eb-test-ride-context {
  display: grid;
  gap: 16px;
}

.eb-test-ride-product {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  min-height: 128px;
  padding: 8px;
  align-items: center;
  border: 1px solid var(--eb-tr-line);
  border-radius: 18px;
}

.eb-test-ride-product-visual {
  display: grid;
  overflow: hidden;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 13px;
  background: var(--eb-tr-soft);
}

.eb-test-ride-product-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.eb-test-ride-product-image[hidden] {
  display: none !important;
}

.eb-test-ride-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  padding: 8px;
  place-items: center;
}

.eb-test-ride-placeholder[hidden] {
  display: none !important;
}

.eb-test-ride-placeholder svg {
  width: 100%;
  height: 100%;
}

.eb-test-ride-placeholder rect {
  fill: var(--eb-tr-soft);
}

.eb-test-ride-placeholder g {
  fill: none;
  stroke: var(--eb-tr-accent-dark);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eb-test-ride-product-copy strong {
  display: block;
  color: var(--eb-tr-ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
}

.eb-test-ride-product-copy > span:not(.eb-test-ride-empty-badge),
.eb-test-ride-product-copy small {
  display: block;
  max-width: 250px;
  margin-top: 7px;
  color: var(--eb-tr-muted);
  font-size: 13px;
  line-height: 1.35;
}

.eb-test-ride-product-copy small {
  color: var(--eb-tr-ink);
  font-weight: 650;
}

.eb-test-ride-empty-badge {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: #f3ece5;
  color: var(--eb-tr-accent-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.eb-test-ride-empty-badge[hidden] {
  display: none !important;
}

.eb-test-ride-showroom {
  padding: 22px;
  border-radius: 18px;
  background: var(--eb-tr-soft);
}

.eb-test-ride-showroom h3 {
  margin: 0 0 16px;
  color: var(--eb-tr-ink);
  font-size: 18px;
  font-weight: 650;
}

.eb-test-ride-showroom-line {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  margin-top: 11px;
  color: var(--eb-tr-muted);
  font-size: 14px;
  line-height: 1.45;
}

.eb-test-ride-showroom-line svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--eb-tr-accent-dark);
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eb-test-ride-showroom-line a {
  color: inherit;
  text-decoration: none;
}

.eb-test-ride-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.eb-test-ride-quick-actions a {
  display: grid;
  min-height: 48px;
  padding: 8px;
  place-items: center;
  border: 1px solid var(--eb-tr-line);
  border-radius: 11px;
  background: #fff;
  color: var(--eb-tr-ink);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.eb-test-ride-quick-actions a:hover {
  border-color: var(--eb-tr-accent);
  background: var(--eb-tr-soft);
}

.eb-test-ride-form {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--eb-tr-line);
  border-radius: 18px;
}

.eb-test-ride-field {
  display: grid;
  gap: 4px;
}

.eb-test-ride-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.eb-test-ride-field > span,
.eb-test-ride-contact-method legend {
  color: var(--eb-tr-ink);
  font-size: 13px;
  font-weight: 650;
}

.eb-test-ride-field em {
  color: var(--eb-tr-muted);
  font-style: normal;
  font-weight: 400;
}

.eb-test-ride-field input,
.eb-test-ride-field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid var(--eb-tr-line);
  border-radius: 11px;
  outline: none;
  background: #fff;
  color: var(--eb-tr-ink);
  font: inherit;
}

.eb-test-ride-field textarea {
  min-height: 94px;
  resize: vertical;
}

.eb-test-ride-field input::placeholder,
.eb-test-ride-field textarea::placeholder {
  color: #8b857f;
  opacity: 1;
}

.eb-test-ride-field input:focus,
.eb-test-ride-field textarea:focus {
  border-color: var(--eb-tr-accent);
  box-shadow: 0 0 0 3px rgba(197, 159, 114, .16);
}

.eb-test-ride-field.has-error input,
.eb-test-ride-field.has-error textarea {
  border-color: #bd3d36;
}

.eb-test-ride-field small {
  color: #a6312b;
  font-size: 12px;
}

.eb-test-ride-contact-method {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0;
  border: 0;
}

.eb-test-ride-contact-method legend {
  grid-column: 1 / -1;
}

.eb-test-ride-contact-method input {
  position: absolute;
  opacity: 0;
}

.eb-test-ride-contact-method span {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--eb-tr-line);
  border-radius: 10px;
  color: var(--eb-tr-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.eb-test-ride-contact-method input:checked + span {
  border-color: var(--eb-tr-accent);
  background: var(--eb-tr-soft);
  color: var(--eb-tr-ink);
}

.eb-test-ride-consent {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  color: var(--eb-tr-muted);
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
}

.eb-test-ride-consent input {
  position: absolute;
  opacity: 0;
}

.eb-test-ride-check {
  width: 20px;
  height: 20px;
  border: 1px solid var(--eb-tr-line);
  border-radius: 5px;
  background: #fff;
}

.eb-test-ride-consent input:checked + .eb-test-ride-check {
  border-color: var(--eb-tr-accent);
  background: var(--eb-tr-accent);
  box-shadow: inset 0 0 0 4px #fff;
}

.eb-test-ride-consent.has-error .eb-test-ride-check {
  border-color: #bd3d36;
}

.eb-test-ride-form-error {
  padding: 11px 13px;
  margin: 0;
  border-radius: 9px;
  background: #fff1f0;
  color: #9e2e28;
  font-size: 13px;
}

.eb-test-ride-submit,
.eb-test-ride-done {
  position: relative;
  display: grid;
  min-height: 54px;
  padding: 0 20px;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: var(--eb-tr-accent);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.eb-test-ride-submit:hover,
.eb-test-ride-done:hover {
  background: var(--eb-tr-accent-dark);
}

.eb-test-ride-spinner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: eb-test-ride-spin .7s linear infinite;
}

.eb-test-ride-submit.is-loading
  [data-eb-test-ride-submit-label] {
  opacity: 0;
}

.eb-test-ride-submit.is-loading .eb-test-ride-spinner {
  opacity: 1;
}

.eb-test-ride-note {
  margin: -3px 0 0;
  color: var(--eb-tr-muted);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.eb-test-ride-success {
  display: grid;
  min-height: 590px;
  padding: 64px 54px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.eb-test-ride-success-icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 50%;
  background: #edf5ed;
  color: #3c7d47;
}

.eb-test-ride-success-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.eb-test-ride-success-product {
  margin-top: 22px;
  color: var(--eb-tr-ink);
  font-size: 14px;
  font-weight: 650;
}

.eb-test-ride-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 26px;
}

.eb-test-ride-success-actions a {
  padding: 12px 16px;
  border: 1px solid var(--eb-tr-line);
  border-radius: 10px;
  color: var(--eb-tr-ink);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.eb-test-ride-done {
  min-width: 220px;
  margin-top: 16px;
}

@keyframes eb-test-ride-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 780px) {
  .eb-test-ride-overlay {
    padding: 12px 0 0;
    align-items: end;
  }

  .eb-test-ride-dialog {
    width: 100%;
    max-height: calc(100dvh - 12px);
    border-radius: 22px 22px 0 0;
  }

  .eb-test-ride-form-view {
    padding: 26px 18px 24px;
  }

  .eb-test-ride-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .eb-test-ride-header {
    padding-right: 42px;
    margin-bottom: 20px;
  }

  .eb-test-ride-header h2,
  .eb-test-ride-success h2 {
    font-size: 31px;
  }

  .eb-test-ride-product {
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 102px;
  }

  .eb-test-ride-showroom,
  .eb-test-ride-form {
    padding: 18px;
  }

  .eb-test-ride-success {
    min-height: min(620px, calc(100dvh - 12px));
    padding: 56px 24px 34px;
  }
}

@media (max-width: 420px) {
  .eb-test-ride-contact-method {
    grid-template-columns: 1fr;
  }

  .eb-test-ride-contact-method legend {
    grid-column: auto;
  }
}
