/* ============================================================
   MXP Search Vehicle
   Recreates the MaxpeedingRods homepage "Search Vehicle" box.
   All size/colour defaults live here and can be overridden from
   the Elementor style panel.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

@font-face {
  font-family: 'MXP Akrobat';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('https://assets.cqggedm.com/catalog/view/javascript/about-us/font/Akrobat-Black.woff') format('woff'),
       url('https://assets.cqggedm.com/catalog/view/javascript/about-us/font/Akrobat-Black.ttf') format('truetype');
}

.mxp-sv {
  --mxp-sv-select-h: 60px;
  --mxp-sv-btn-h: 60px;
  --mxp-sv-btn-w: 14%;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
}

.mxp-sv *,
.mxp-sv *::before,
.mxp-sv *::after {
  box-sizing: border-box;
}

/* ---------- black box + road stripes ---------- */
.mxp-sv .mxp-sv__box {
  position: relative;
  width: 100%;
  min-height: 206px;
  padding: 20px 20px 0;
  overflow: hidden;
  background-color: #000;
  background-image: url('../images/search-bg.png');
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 100% 100%;
}

/* ---------- title ---------- */
.mxp-sv .mxp-sv__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 15px;
  margin: 0;
  padding: 0;
  font-family: 'MXP Akrobat', 'Arial Black', Arial, sans-serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mxp-sv .mxp-sv__title-main {
  color: #fff;
}

.mxp-sv .mxp-sv__title-accent {
  color: #EF1C1C;
}

/* ---------- form row ---------- */
.mxp-sv .mxp-sv__form {
  margin: 0;
}

.mxp-sv .mxp-sv__row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 20px;
}

.mxp-sv .mxp-sv__field {
  position: relative;
  display: flex;
  flex: 1 1 0;
  min-width: 0;
}

/* ---------- selects ---------- */
.mxp-sv .mxp-sv__select {
  width: 100%;
  height: var(--mxp-sv-select-h, 60px);
  margin: 0;
  padding: 0 36px 0 16px;
  border: 0;
  border-radius: 0;
  background-color: #EEEEEE;
  background-image: url('../images/select-arrow.png');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  color: #3D3D3D;
  font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.mxp-sv .mxp-sv__select:disabled {
  background-color: #A7A7A7;
  color: #2B2B2B;
  cursor: default;
  opacity: 1;
}

.mxp-sv .mxp-sv__select:focus-visible {
  outline: 2px solid #EF1C1C;
  outline-offset: -2px;
}

.mxp-sv .mxp-sv__select option {
  color: #3D3D3D;
  background-color: #fff;
  font-family: inherit;
}

.mxp-sv .mxp-sv__select[aria-busy="true"] {
  opacity: .72;
}

/* Mobile custom dropdown: keeps the option list inside the field. */
.mxp-sv .mxp-sv__dd {
  display: none;
  position: relative;
  width: 100%;
}

.mxp-sv .mxp-sv__dd-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: var(--mxp-sv-select-h, 60px);
  margin: 0;
  padding: 0 36px 0 16px;
  border: 0;
  border-radius: 0;
  background: #EEEEEE;
  color: #3D3D3D;
  font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: normal;
  text-align: left;
  text-transform: none;
  cursor: pointer;
}

.mxp-sv .mxp-sv__dd-btn:disabled {
  background: #A7A7A7;
  color: #2B2B2B;
  cursor: default;
}

.mxp-sv .mxp-sv__dd-btn::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid #3D3D3D;
  border-bottom: 2px solid #3D3D3D;
  transform: rotate(45deg);
}

.mxp-sv .mxp-sv__dd-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mxp-sv .mxp-sv__dd-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  z-index: 80;
  max-height: 260px;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  list-style: none;
  background: #fff;
  border: 1px solid #d8d8d8;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.mxp-sv .mxp-sv__dd-list[hidden] {
  display: none;
}

.mxp-sv .mxp-sv__dd-option {
  padding: 10px 16px;
  color: #333;
  font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.mxp-sv .mxp-sv__dd-option:hover,
.mxp-sv .mxp-sv__dd-option.is-selected {
  background: #f1f1f1;
}

@media (max-width: 767px) {
  .mxp-sv .mxp-sv__field .mxp-sv__dd {
    display: block;
  }

  .mxp-sv .mxp-sv__field .mxp-sv__select {
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    opacity: 0;
    pointer-events: none;
  }

  .mxp-sv .mxp-sv__box {
    overflow: visible;
  }
}

/* required star, overlaid on the left edge like the reference */
.mxp-sv .mxp-sv__star {
  position: absolute;
  left: 4px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: #EF1C1C;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  pointer-events: none;
}

/* ---------- search button ---------- */
.mxp-sv .mxp-sv__btn {
  flex: 0 0 var(--mxp-sv-btn-w, 14%);
  height: var(--mxp-sv-btn-h, 60px);
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background-color: #EF1C1C;
  color: #fff;
  font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.mxp-sv .mxp-sv__btn:hover,
.mxp-sv .mxp-sv__btn:focus-visible {
  background-color: #EF1C1C;
}

.mxp-sv .mxp-sv__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.mxp-sv .mxp-sv__btn:active {
  transform: translateY(1px);
}

/* ---------- inline error ---------- */
.mxp-sv .mxp-sv__error {
  margin: 10px 0 0;
  color: #FF6B3D;
  font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
}

.mxp-sv .mxp-sv__error[hidden] {
  display: none;
}

/* ---------- tablet ---------- */
@media (max-width: 1024px) {
  .mxp-sv .mxp-sv__box {
    min-height: 0;
    padding-bottom: 20px;
  }

  .mxp-sv .mxp-sv__title {
    font-size: 32px;
  }

  .mxp-sv .mxp-sv__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
    margin-bottom: 20px;
  }

  .mxp-sv .mxp-sv__field {
    flex: none;
  }

  .mxp-sv .mxp-sv__btn {
    grid-column: 1 / -1;
    flex: none;
    width: 100%;
  }
}

/* ---------- phone ---------- */
@media (max-width: 600px) {
  .mxp-sv .mxp-sv__title {
    font-size: 26px;
    column-gap: 10px;
  }

  .mxp-sv .mxp-sv__row {
    grid-template-columns: 1fr;
  }

  .mxp-sv .mxp-sv__select {
    font-size: 13px;
  }

  .mxp-sv .mxp-sv__btn {
    font-size: 18px;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .mxp-sv .mxp-sv__btn {
    transition: none;
  }
}
