/* Define a configurable brand color */
:root {
  --brand-primary: rgb(0, 140, 255);
  /* default */
}

/* Contenedor principal */
#app {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px;
  font-family: 'Segoe UI', sans-serif;
  color: #333;
}

/* Títulos */
#test-drive-app h3 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--brand-primary);
}


#test-drive-app #dex-result p {
  margin-bottom: 8px;
}

/* Inputs y selects */
#test-drive-app input[type="text"],
#test-drive-app input[type="email"],
#test-drive-app input[type="tel"],
#test-drive-app textarea,
#test-drive-app select {
  width: 100%;
  padding: 5px 10px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

/* Botones */
#test-drive-app button {
  background-color: var(--brand-primary);
  color: white;
  border: none;
  padding: 10px 16px;
  font-size: 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#test-drive-app button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

#test-drive-app button:hover:not(:disabled) {
  background-color: var(--brand-primary);
}

/* Mensajes de advertencia */
#test-drive-app #dex-warn,
#test-drive-app #dex-result {
  margin-top: 12px;
  font-size: 14px;
}

/* Layout de formulario */
#test-drive-app form .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

#test-drive-app form .grid>div {
  margin-bottom: 12px;
}

#test-drive-app form .grid textarea {
  grid-column: 1 / span 2;
}

/* Selector de pasos (si lo tenés en el lateral) */
#test-drive-app .pasos {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

#test-drive-app .pasos li {
  padding: 8px 12px;
  border-left: 4px solid transparent;
  margin-bottom: 4px;
  font-weight: bold;
}

#test-drive-app .pasos li.activo {
  border-left-color: var(--brand-primary);
  background-color: #f0f8ff;
}

#test-drive-app .dtdt--model-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  background-color: #fff;
  transition: box-shadow 0.3s ease;
  justify-items: center;
}

#test-drive-app .dtdt--model-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#test-drive-app .dtdt--model-image img {
  max-width: 100%;
  height: 9rem;
  object-fit: contain;
  width: 100%;
}

#test-drive-app .dtdt--model-title span,
#test-drive-app .dtdt--model-title h5 {
  margin-top: 12px;
  font-size: 18px;
  color: #333;
}

#test-drive-app .dtdt--model-branch {
  margin-top: 8px;
  font-size: 14px;
  color: #555;
}

#test-drive-app .dtdt--model-button .dextdbkg--button {
  background-color: var(--brand-primary);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#test-drive-app .dtdt--model-button .dextdbkg--button:hover {
  background-color: var(--brand-primary);
}

#test-drive-app .dex-branch-card {
  border: 1px solid #d9deea;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  min-height: 190px;
  overflow: hidden;
  padding: 0;
}

#test-drive-app .dex-branch-card:hover {
  border-color: #c7cedd;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

#test-drive-app .dex-branch-card.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

#test-drive-app .dex-branch-card__media {
  aspect-ratio: 16 / 7;
  background: #f8fafc;
  border-bottom: 1px solid #edf0f4;
  overflow: hidden;
}

#test-drive-app .dex-branch-card__media img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

#test-drive-app .dex-branch-card__header {
  align-items: center;
  border-bottom: 1px solid #edf0f4;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  min-height: 88px;
  padding: 22px 24px;
  text-align: left;
}

#test-drive-app .dex-branch-card__title-icon {
  display: block;
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

#test-drive-app .dex-branch-card__name {
  color: #0f172a;
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: uppercase;
}

#test-drive-app .dex-branch-card__body {
  flex: 1;
  padding: 16px 24px 6px;
}

#test-drive-app .dex-branch-card__date {
  color: #07164c;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 8px;
}

#test-drive-app .dex-branch-card__address {
  color: #52607a;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

#test-drive-app .dex-branch-card__action {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 0 24px 18px;
}

#test-drive-app .dex-branch-card__action .dex-select-branch {
  background: #f8fafc;
  border: 1px solid #d8deea;
  border-radius: 6px;
  color: #07164c;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  margin: 0 !important;
  padding: 7px 12px;
  background-color: var(--brand-primary);
}

#test-drive-app .dex-branch-card__action .dex-select-branch:hover {
  background: #eef2f7;
  border-color: #c7cedd;
}

#test-drive-app .dex-branch-card__action .dex-select-branch:disabled {
  color: #64748b;
  cursor: not-allowed;
}

#test-drive-app .dextdbkg--steps-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#test-drive-app .timeline-block {
  display: flex;
  justify-content: center;
}

/* 👇 En mobile (ej. <768px) los pasos se apilan */
@media (max-width: 768px) {
  #test-drive-app .dextdbkg--steps-line {
    display: block;
    /* no flex en mobile */
    text-align: center;
  }

  #test-drive-app .timeline-block {
    margin-bottom: 12px;
    /* espacio entre circulitos */
    display: inline-flex;
  }
}

#test-drive-app .marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #ccc;
  /* color base para steps inactivos */
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s, transform 0.2s;
}

#test-drive-app .marker:hover {
  transform: scale(1.1);
}

#test-drive-app .marker.step-active {
  background-color: var(--brand-primary);
  /* azul principal */
  box-shadow: 0 0 0 4px rgba(0, 91, 170, 0.2);
  /* halo azul */
}

#test-drive-app .marker-step-1,
#test-drive-app .marker-step-2,
#test-drive-app .marker-step-3,
#test-drive-app .marker-step-4,
#test-drive-app .marker-step-5 {
  cursor: default;
}

#test-drive-app .flatpickr-calendar.inline {
  width: 100%;
}

/* Contenedor principal del formulario CF7 */
#test-drive-app .wpcf7 {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px;
  font-family: 'Segoe UI', sans-serif;
  color: #333;
  padding-top: 0;
}

/* Títulos */
#test-drive-app .wpcf7 h3 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--brand-primary);
}

/* Inputs y selects de CF7 */
#test-drive-app .wpcf7-form-control.wpcf7-text,
#test-drive-app .wpcf7-form-control.wpcf7-email,
#test-drive-app .wpcf7-form-control.wpcf7-tel,
#test-drive-app .wpcf7-form-control.wpcf7-textarea,
#test-drive-app .wpcf7-form-control.wpcf7-select {
  width: 100%;
  padding: 5px 10px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

/* Botón de envío CF7 */
#test-drive-app .wpcf7-form-control.wpcf7-submit {
  background-color: var(--brand-primary) !important;
  color: white;
  border: none;
  padding: 10px 16px;
  font-size: 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#test-drive-app .wpcf7-form-control.wpcf7-submit:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

#test-drive-app .wpcf7-form-control.wpcf7-submit:hover:not(:disabled) {
  background-color: var(--brand-primary) !important;
}

/* Layout en grid para CF7 (si usás wrapper con class grid) */
#test-drive-app .wpcf7 .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

#test-drive-app .wpcf7 .grid>div {
  margin-bottom: 12px;
}

#test-drive-app .wpcf7 .grid textarea {
  grid-column: 1 / span 2;
}

/* Mensajes de CF7 */
#test-drive-app .wpcf7-response-output {
  margin-top: 12px;
  font-size: 14px;
}

#test-drive-app .wpcf7-not-valid-tip {
  color: red;
  font-size: 13px;
}

#test-drive-app form p {
  margin-bottom: 0;
}

#test-drive-app form label {
  width: 100%;
}

#test-drive-app .wpcf7 form.sent .wpcf7-response-output {
  border-color: #46b450;
  display: none;
}

#test-drive-app .wpcf7-form label {
  text-align: left !important;
}

#test-drive-app .wpcf7-form p {
  text-align: left !important;
}

#test-drive-app .flatpickr-day.selected,
#test-drive-app .flatpickr-day.startRange,
#test-drive-app .flatpickr-day.endRange,
#test-drive-app .flatpickr-day.selected.inRange,
#test-drive-app .flatpickr-day.startRange.inRange,
#test-drive-app .flatpickr-day.endRange.inRange,
#test-drive-app .flatpickr-day.selected:focus,
#test-drive-app .flatpickr-day.startRange:focus,
#test-drive-app .flatpickr-day.endRange:focus,
#test-drive-app .flatpickr-day.selected:hover,
#test-drive-app .flatpickr-day.startRange:hover,
#test-drive-app .flatpickr-day.endRange:hover,
#test-drive-app .flatpickr-day.selected.prevMonthDay,
#test-drive-app .flatpickr-day.startRange.prevMonthDay,
#test-drive-app .flatpickr-day.endRange.prevMonthDay,
#test-drive-app .flatpickr-day.selected.nextMonthDay,
#test-drive-app .flatpickr-day.startRange.nextMonthDay,
#test-drive-app .flatpickr-day.endRange.nextMonthDay {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

#test-drive-app .wpcf7.no-js {
  padding: 0 !important;
}

.btn-tdv-cancelar {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 24px;
  background-color: var(--brand-primary);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

.flatpickr-innerContainer {
  justify-content: center !important;
  max-width: 100% !important;
  width: 100% !important;
}

#test-drive-app .dex-brand-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 0 0 32px;
}

#test-drive-app .dex-brand-filter__button {
  appearance: none;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  min-height: 38px;
  padding: 9px 16px;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

#test-drive-app .dex-brand-filter__button:hover,
#test-drive-app .dex-brand-filter__button.is-active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
}

@media (max-width: 575.98px) {
  #test-drive-app .dex-brand-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 26px;
  }

  #test-drive-app .dex-brand-filter__button {
    width: 100%;
    min-height: 40px;
    padding: 9px 10px;
    text-align: center;
  }
}
