/* ============================================================
   Address Autocomplete Dropdown — Trustdem
   ============================================================ */

/* Wrapper — positioned relative so the dropdown anchors to input */
.td-ac-wrap {
  position: relative;
  width: 100%;
}

/* Suggestion list */
.td-ac-list {
  display: none;
  position: absolute;
  z-index: 9999;
  top: 100%;
  left: 0;
  right: 0;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  max-height: 260px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Individual suggestion item */
.td-ac-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: background 0.15s ease, color 0.15s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.td-ac-item:last-child {
  border-bottom: none;
}

/* Hover & active state */
.td-ac-item:hover,
.td-ac-item.td-ac-active {
  background: linear-gradient(135deg, rgba(217, 104, 15, 0.08), rgba(129, 0, 143, 0.06));
  color: #d9680f;
}

/* Main text */
.td-ac-main {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pin icon before each item */
.td-ac-item::before {
  content: '\f3c5'; /* fa-map-marker-alt */
  font-family: 'Font Awesome 5 Free', 'Font Awesome 6 Free', 'FontAwesome', sans-serif;
  font-weight: 900;
  font-size: 12px;
  color: #d9680f;
  margin-right: 10px;
  flex-shrink: 0;
  opacity: 0.7;
}

.td-ac-item:hover::before,
.td-ac-item.td-ac-active::before {
  opacity: 1;
}

/* ── Scrollbar styling ── */
.td-ac-list::-webkit-scrollbar {
  width: 5px;
}
.td-ac-list::-webkit-scrollbar-track {
  background: transparent;
}
.td-ac-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

/* ── Ensure inputs with autocomplete keep their existing styles ── */
[data-td-addr] {
  position: relative;
}

/* ── Fix for the devis form: ensure dropdown is above panel content ── */
.td-dv-field .td-ac-wrap {
  position: relative;
}

/* ── Fix for the reservation form: ensure dropdown is above other steps ── */
.form-inner-area .td-ac-wrap {
  position: relative;
}

/* ── Responsive: larger touch targets on mobile ── */
@media (max-width: 768px) {
  .td-ac-item {
    padding: 12px 14px;
    font-size: 15px;
  }

  .td-ac-list {
    max-height: 220px;
  }
}
