/* QTD on Test Drive page — match standalone form (no hero) */

.qtd-embed,
.qtd-embed *,
.qtd-embed *::before,
.qtd-embed *::after {
  box-sizing: border-box;
}

.test-drive-page.qtd-on-td,
.quick-test-drive-page {
  --qtd-pad: 12px 24px;
  --qtd-form-bg: #f7f5f6;
  --qtd-input-border: #d0d0d0;
  --qtd-text: #1E1E1E;
  --qtd-muted: #555;
  font-family: 'Montserrat', sans-serif;
  color: var(--qtd-text);
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Clear fixed site header — top + bottom breathing room */
body.layout-new .test-drive-page.qtd-on-td {
  margin-top: 0;
  padding-top: 0;
}

.qtd-embed.qtd-stage,
.qtd-stage {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 120px);
  background: #fff;
  display: block;
  width: 100%;
  line-height: normal;
}

.qtd-stage__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.qtd-stage__canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.qtd-stage__canvas.is-ready canvas {
  opacity: 1;
}

.qtd-stage__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(255, 255, 255, 0.55) 0%, transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, transparent 30%, transparent 70%, rgba(255, 255, 255, 0.5) 100%);
}

.qtd-stage__inner {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  /* top / side / bottom padding — form never touches edges */
  padding: clamp(96px, 12vw, 120px) clamp(20px, 4vw, 48px) clamp(48px, 8vw, 96px);
}

.qtd-form-card {
  width: 100%;
  max-width: 560px; /* narrower than full page so inputs don't stretch edge-to-edge */
  margin: 0 auto;
  padding: 40px 36px 36px;
  background: var(--qtd-form-bg);
  animation: qtd-fade-up 0.45s ease both;
}

.qtd-form-panel {
  display: block;
  width: 100%;
}

.qtd-form-title {
  margin: 0 0 10px;
  padding: 0;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--qtd-text);
  text-align: center;
}

.qtd-form-subtitle {
  margin: 0 0 28px;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--qtd-muted);
  text-align: center;
  line-height: 1.5;
}

.qtd-form-status {
  margin: 0 0 16px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
}

.qtd-form-status.is-error {
  background: #fde8e8;
  color: #9b1c1c;
}

#quickTestDriveForm {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}

.qtd-field {
  display: block;
  width: 100%;
  margin: 0 0 20px;
  padding: 0;
}

.qtd-label {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--qtd-text);
}

.qtd-input {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 48px;
  margin: 0;
  border: 1px solid var(--qtd-input-border);
  border-radius: 0;
  background: #fff;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--qtd-text);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease;
}

.qtd-input:focus {
  border-color: #1E1E1E;
}

.qtd-input::placeholder {
  color: #999;
  font-weight: 500;
}

.qtd-phone-wrap {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 48px;
  margin: 0;
  border: 1px solid var(--qtd-input-border);
  background: #fff;
  transition: border-color 0.15s ease;
}

.qtd-phone-wrap:focus-within {
  border-color: #1E1E1E;
}

.qtd-phone-prefix {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 0 14px;
  border-right: 1px solid var(--qtd-input-border);
  font-size: 14px;
  font-weight: 600;
  color: var(--qtd-text);
  white-space: nowrap;
  background: #f0eeef;
}

.qtd-flag {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.qtd-phone-input {
  border: 0 !important;
  height: 48px;
  flex: 1 1 auto;
  min-width: 0;
  background: transparent !important;
  padding: 12px 16px !important;
}

.qtd-error {
  display: block;
  min-height: 18px;
  margin: 6px 0 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.3;
  color: #b42318;
}

.qtd-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 452px;
  min-height: 52px;
  margin: 28px auto 0;
  padding: 14px 24px;
  border: 0;
  border-radius: 0;
  background: #1E1E1E;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.15s ease;
}

.qtd-submit__label {
  display: inline-block;
}

.qtd-submit:hover {
  background: #000;
}

.btn-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;
  height: 24px;
  margin-left: 0;
  overflow: hidden;
  opacity: 0;
  transition: width 0.45s ease, margin-left 0.45s ease, opacity 0.35s ease;
}

.btn-cta-icon__svg {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.btn-cta-icon__dash,
.btn-cta-icon__arrow {
  stroke: currentColor;
  fill: none;
  opacity: 0;
}

.btn-cta-icon__dash {
  transition: opacity 0.28s ease;
}

.btn-cta-icon__arrow {
  transition: opacity 0.28s ease;
}

.qtd-submit:hover .btn-cta-icon {
  width: 24px;
  margin-left: 8px;
  opacity: 1;
}

.qtd-submit:hover .btn-cta-icon__dash {
  opacity: 1;
}

.qtd-submit:hover .btn-cta-icon__arrow {
  opacity: 1;
  transition-delay: 0.22s;
}

.qtd-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.qtd-submit:disabled:hover .btn-cta-icon {
  width: 0;
  margin-left: 0;
  opacity: 0;
}

.qtd-submit.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.qtd-submit.is-loading .btn-cta-icon {
  display: none;
}

.qtd-success-panel {
  text-align: center;
  padding: 12px 0 4px;
}

.qtd-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
}

.qtd-success-check {
  width: 56px;
  height: 56px;
}

.qtd-success-check__circle {
  stroke: #16a34a;
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: qtd-check-circle 0.5s ease-out forwards;
}

.qtd-success-check__mark {
  stroke: #16a34a;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: qtd-check-mark 0.3s 0.35s ease-out forwards;
}

.qtd-success-panel[hidden],
.qtd-form-status[hidden],
.qtd-form-panel[hidden] {
  display: none !important;
}

@keyframes qtd-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes qtd-check-circle {
  to { stroke-dashoffset: 0; }
}

@keyframes qtd-check-mark {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .qtd-form-card,
  .qtd-success-check__circle,
  .qtd-success-check__mark {
    animation: none !important;
  }
}

@media (max-width: 767px) {
  .qtd-stage__inner {
    padding: 88px 16px 56px;
  }

  .qtd-form-card {
    max-width: 100%;
    padding: 28px 20px 24px; /* side padding so inputs never touch screen edge */
  }

  .qtd-input {
    padding: 12px 16px;
  }

  .qtd-submit {
    margin-top: 24px;
  }
}
