/* Dedicated Book a Test Drive page — layout inspired by omodajaecoo.com.my/test-drive */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.td-page {
  --td-ink: #f5f7f8;
  --td-muted: rgba(255, 255, 255, 0.72);
  --td-field: rgba(20, 24, 28, 0.55);
  --td-border: rgba(255, 255, 255, 0.28);
  --td-line: rgba(255, 255, 255, 0.14);
  color: var(--td-ink);
  background: var(--canvas, #161a18);
  min-height: 100vh;
}

.td-page .header--solid,
.td-page .header.header--models-open {
  background: rgba(15, 20, 18, 0.55);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
}

.td-page .header__nav a,
.td-page .header__link,
.td-page .nav-models__trigger {
  color: #fff;
}

.td-page .header__logo-img {
  filter: none;
}

.td-page .footer {
  background: var(--canvas, #161a18);
  color: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.td-page .footer a {
  color: rgba(255, 255, 255, 0.75);
}

.td-hero {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--header-h, 88px) + 2.5rem) 1.25rem 4rem;
  background:
    linear-gradient(180deg, rgba(18, 60, 71, 0) 55%, rgba(18, 18, 18, 0.96) 98%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.55)),
    url('https://www.omodajaecoo.com.my/themes/demo/assets/images/test-drive/test-drive-banner.webp') center / cover no-repeat;
}

.td-hero__inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.td-hero__title {
  margin: 0 0 2rem;
  text-align: center;
  font-family: Outfit, "DM Sans", sans-serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.td-form {
  display: grid;
  gap: 2rem;
  padding: 1.75rem 1.5rem 2rem;
  background: rgba(18, 22, 26, 0.42);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.32);
}

.td-form__top {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.5rem 2rem;
  align-items: start;
}

.td-form__left,
.td-form__right {
  display: grid;
  gap: 0.85rem;
}

.td-field {
  position: relative;
}

.td-field__label {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--td-muted);
}

.td-field--dated input[type="date"] {
  padding-right: 1rem;
  color-scheme: dark;
}

.td-field select,
.td-field input[type="text"],
.td-field input[type="email"],
.td-field input[type="tel"],
.td-field input[type="date"] {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(8, 10, 12, 0.5);
  border: 1px solid var(--td-border);
  border-radius: 10px;
  box-shadow:
    inset 4px 4px 10px rgba(0, 0, 0, 0.45),
    inset -2px -2px 8px rgba(255, 255, 255, 0.04);
  color: #fff;
  font: inherit;
  font-size: 16px;
  min-height: 48px;
  padding: 0.95rem 2.5rem 0.95rem 1rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.td-field input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.td-field select:focus,
.td-field input:focus {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(20, 24, 28, 0.72);
}

.td-field select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.td-field--select::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid rgba(255, 255, 255, 0.75);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.75);
  transform: translateY(-60%) rotate(45deg);
  pointer-events: none;
}

.td-field select option {
  color: #111;
  background: #fff;
}

.td-preview {
  position: relative;
  min-height: 220px;
  margin-top: 0.35rem;
  border: 1px solid var(--td-line);
  border-radius: 4px;
  background: rgba(8, 10, 12, 0.45);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.td-preview img {
  width: min(100%, 420px);
  height: auto;
  object-fit: contain;
  transition: opacity 0.25s ease;
}

.td-preview__name {
  position: absolute;
  left: 1rem;
  bottom: 0.85rem;
  font-family: Outfit, "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.td-showroom {
  border: 1px solid var(--td-border);
  border-radius: 6px;
  background: rgba(12, 16, 20, 0.55);
  padding: 1.1rem 1.15rem 1.2rem;
}

.td-showroom__label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--td-muted);
}

.td-showroom__title {
  margin: 0 0 0.55rem;
  font-family: Outfit, "DM Sans", sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.td-showroom__text,
.td-showroom__meta {
  margin: 0;
  color: var(--td-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.td-showroom__meta {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.25rem;
}

.td-showroom__meta a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.td-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.td-contact {
  border-top: 1px solid var(--td-line);
  padding-top: 1.75rem;
  display: grid;
  gap: 1.25rem;
}

.td-contact__title {
  margin: 0;
  font-family: Outfit, "DM Sans", sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
}

.td-contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.5rem 2rem;
  align-items: start;
}

.td-contact__fields {
  display: grid;
  gap: 0.85rem;
}

.td-consent {
  display: grid;
  gap: 1rem;
}

.td-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--td-muted);
}

.td-check input {
  margin-top: 0.1rem;
  width: 1.35rem;
  height: 1.35rem;
  min-width: 1.35rem;
  accent-color: #fff;
  flex-shrink: 0;
}

.td-check a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.td-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  margin-top: 0.25rem;
}

.td-submit {
  min-width: 180px;
  border: 0;
  border-radius: 2px;
  background: #fff;
  color: #111;
  font-family: Outfit, "DM Sans", sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.95rem 1.6rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.td-submit:hover {
  background: #e8e8e8;
}

.td-wa {
  color: #fff;
  font-size: 0.92rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.td-success {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 2.5rem 1.25rem;
  border: 1px solid var(--td-border);
  border-radius: 8px;
  background: rgba(10, 12, 14, 0.55);
}

.td-success h2 {
  margin: 0 0 0.75rem;
  font-family: Outfit, "DM Sans", sans-serif;
}

.td-success p {
  margin: 0 0 1.25rem;
  color: var(--td-muted);
}

.td-honey {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

@media (max-width: 900px) {
  .td-form__top,
  .td-contact__grid {
    grid-template-columns: 1fr;
  }

  .td-preview {
    min-height: 180px;
  }
}

@media (max-width: 560px) {
  .td-hero {
    padding-top: calc(var(--header-h, 76px) + 1.5rem);
  }

  .td-showroom__title {
    font-size: 1.02rem;
  }

  .td-showroom__text,
  .td-showroom__meta {
    overflow-wrap: anywhere;
  }

  .td-row {
    grid-template-columns: 1fr;
  }

  .td-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .td-submit {
    width: 100%;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .td-form {
    background: rgba(18, 22, 26, 0.94);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
