/**
 * Flores Delivery Google Maps - Custom Autocomplete v2.0.0
 *
 * Dropdown 100% propio. Cero dependencia de .pac-container,
 * .pac-icon o fuentes de Google. SVG inline para iconos.
 */

/* ── Dropdown container ── */
.fdg-ac-dropdown {
  position: absolute;
  z-index: 999999;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Cada sugerencia ── */
.fdg-ac-item {
  display: flex;
  align-items: flex-start;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  transition: background-color 0.15s ease;
  box-sizing: border-box;
  gap: 10px;
}

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

.fdg-ac-item:hover,
.fdg-ac-item.fdg-ac-active {
  background-color: rgba(44, 85, 69, 0.06);
}

/* ── Icono SVG (pin) ── */
.fdg-ac-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.fdg-ac-icon svg {
  display: block;
}

/* ── Texto ── */
.fdg-ac-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.fdg-ac-main {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fdg-ac-secondary {
  font-size: 12px;
  color: #888;
  line-height: 1.3;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Posicionar dropdown relativo al parent del input ── */
.cb-field-group {
  position: relative;
}

/* ── Ocultar el pac-container de Google (por si acaso) ── */
.pac-container {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* ── Campos hidden ── */
.fdg-hidden-field {
  display: none !important;
}

/* ── Badge de distancia ── */
.fdg-distance {
  font-size: 12px;
  color: #888;
  font-weight: normal;
}

/* ── Scrollbar custom ── */
.fdg-ac-dropdown::-webkit-scrollbar {
  width: 6px;
}

.fdg-ac-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.fdg-ac-dropdown::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .fdg-ac-dropdown {
    max-height: 220px;
    border-radius: 0 0 8px 8px;
  }

  .fdg-ac-item {
    padding: 12px 10px;
  }

  .fdg-ac-main {
    font-size: 13px;
  }
}
