/* ============================================================
   MARS Estimate Selector v2.2
   ============================================================ */

#mars-estimate-selector-wrapper {
  font-family: inherit;
  max-width: 1200px;
  margin: 0 auto;
}



/* ── STEP 0 — ZIP CHECK — CENTERED ───────────────────────── */

#mars-step0-zip {
  text-align: center;
  margin-bottom: 8px;
}

.mars-zip-check-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 520px;
  margin: 0 auto;
}

/* ZIP input — glassmorphism matching selector dropdowns */
.mars-est-zip-input {
  flex: 1 1 240px;
  height: 50px;
  padding: 0 16px;
  border: 2px solid rgba(255,255,255,0.50);
  border-radius: 6px;
  background: rgba(255,255,255,0.10);
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.mars-est-zip-input::placeholder {
  color: rgba(255,255,255,0.55);
}

.mars-est-zip-input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.85);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.12);
}

.mars-est-zip-btn {
  height: 50px;
  padding: 0 28px;
  background: #5FA8D3;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease;
  box-sizing: border-box;
  flex-shrink: 0;
}

.mars-est-zip-btn:hover {
  background: #3D87B0;
}

.mars-est-zip-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* ── ZIP RESULT ───────────────────────────────────────────── */

.mars-est-zip-result {
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  display: none;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.mars-est-zip-result.zip-loading {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.80);
  display: flex;
  justify-content: center;
}

.mars-est-zip-result.zip-success {
  background: rgba(255,255,255,0.85);
  border: 1.5px solid #5FA8D3;
  color: #172033;
  display: flex;
}

.mars-est-zip-result.zip-error {
  background: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(229,62,62,0.60);
  color: #c53030;
  display: flex;
}

.zip-check-icon {
  font-size: 18px;
  font-weight: 700;
  color: #5FA8D3;
  flex-shrink: 0;
  margin-top: 1px;
}

.zip-error-icon {
  font-size: 18px;
  font-weight: 700;
  color: #e53e3e;
  flex-shrink: 0;
  margin-top: 1px;
}

.zip-check-text {
  flex: 1;
}

.zip-check-text a {
  color: #5FA8D3;
  font-weight: 600;
}

.zip-change-btn,
.zip-contact-btn {
  height: 32px;
  padding: 0 14px;
  background: transparent;
  border: 1.5px solid #5FA8D3;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #5FA8D3;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.zip-change-btn:hover,
.zip-contact-btn:hover {
  background: #5FA8D3;
  color: #ffffff;
}

.mars-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.40);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: mars-spin 0.7s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes mars-spin {
  to { transform: rotate(360deg); }
}


/* ── LOCATION CONFIRMED STRIP ─────────────────────────────── */

.mars-location-confirmed-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.85);
  border: 1.5px solid #5FA8D3;
  border-radius: 8px;
  padding: 10px 18px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #172033;
  flex-wrap: wrap;
}

.mars-location-confirmed-strip .zip-check-icon {
  font-size: 16px;
  font-weight: 700;
  color: #5FA8D3;
  flex-shrink: 0;
}

.mars-location-confirmed-strip span:not(.zip-check-icon) {
  flex: 1;
}


/* ── STEP 1 — SELECTOR ────────────────────────────────────── */

#mars-step1-selector {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.18);
}

.mars-est-selectors-row {
  display: flex;
  gap: 15px;
  flex-wrap: nowrap;
  align-items: flex-end;
}

.mars-est-field {
  flex: 1;
  min-width: 0;
}

/* Select fields — glassmorphism */
.mars-est-select {
  width: 100%;
  height: 50px;
  padding: 0 36px 0 15px;
  border: 2px solid rgba(255,255,255,0.50);
  border-radius: 6px;
  background: rgba(255,255,255,0.10);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffffff' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.mars-est-select:focus {
  outline: none;
  border-color: rgba(255,255,255,0.85);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.12);
}

.mars-est-select:disabled {
  opacity: 0.40;
  cursor: not-allowed;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.3)' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.mars-est-select option {
  background: #ffffff;
  color: #172033;
}

.mars-est-submit-btn {
  width: 100%;
  height: 50px;
  padding: 0 20px;
  background: #5FA8D3;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.mars-est-submit-btn:hover {
  background: #3D87B0;
  transform: translateY(-1px);
}


/* ── PRICE RANGE ──────────────────────────────────────────── */

.mars-est-price-range {
  margin-top: 18px;
  display: none;
}

.mars-est-price-inner {
  background: rgba(255,255,255,0.85);
  border: 1.5px solid #5FA8D3;
  border-radius: 10px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.mars-est-price-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #667085;
  flex-shrink: 0;
}

.mars-est-price-value {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mars-est-price-value strong {
  font-size: 22px;
  font-weight: 800;
  color: #172033;
}

.mars-est-price-sep {
  font-size: 18px;
  color: #667085;
}

.mars-est-price-note {
  font-size: 12px;
  color: #667085;
  line-height: 1.4;
  flex: 1;
  min-width: 180px;
}


/* ── CONFIRMATION MESSAGE ─────────────────────────────────── */

.mars-est-message {
  display: none;
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.mars-est-message.est-success {
  background: rgba(255,255,255,0.85);
  border: 1.5px solid #5FA8D3;
  color: #172033;
}

.mars-est-message.est-error {
  background: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(229,62,62,0.60);
  color: #c53030;
}

.est-price-confirm {
  font-size: 13px;
  color: #172033;
}

.mars-est-message small {
  font-size: 12px;
  color: #667085;
}


/* ── FLATPICKR — BRAND + FIX CALENDAR CUTOFF ─────────────── */

/* Static mode — calendar renders inline, no cutoff */
.flatpickr-calendar.inline {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Override default positioning that causes cutoff */
.flatpickr-calendar {
  border-radius: 14px !important;
  box-shadow: 0 12px 40px rgba(23,32,51,0.18) !important;
  font-family: inherit !important;
  overflow: visible !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: #5FA8D3 !important;
  border-color: #5FA8D3 !important;
}

.flatpickr-day:hover {
  background: #ECF4FA !important;
}

.flatpickr-months .flatpickr-month {
  background: #172033 !important;
  color: #ffffff !important;
  border-radius: 14px 14px 0 0 !important;
}

.flatpickr-current-month {
  color: #ffffff !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  color: #ffffff !important;
}

.flatpickr-current-month input.cur-year {
  color: #ffffff !important;
}

.flatpickr-weekday {
  color: #5FA8D3 !important;
  font-weight: 700 !important;
}

/* Ensure calendar does not get clipped by parent overflow */
.mars-cf7-field {
  overflow: visible !important;
}

.wpcf7-form,
.wpcf7-form .mars-cf7-row {
  overflow: visible !important;
}


/* ── MOBILE ───────────────────────────────────────────────── */

@media (max-width: 767px) {

  .mars-zip-check-row {
    flex-direction: column;
    align-items: stretch;
    max-width: 100%;
  }

  .mars-est-zip-input {
    flex: none;
    width: 100%;
  }

  .mars-est-zip-btn {
    width: 100%;
  }

  .mars-est-selectors-row {
    flex-direction: column;
  }

  .mars-est-field {
    width: 100%;
  }

  .mars-est-price-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .mars-est-price-value strong {
    font-size: 20px;
  }

  .mars-location-confirmed-strip {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   END MARS Estimate Selector v2.2
   ============================================================ */