/**
 * Flores Delivery Optimizer - Estilos del autocompletado
 */

/* ── Wrapper ── */
.fdo-autocomplete-wrap {
  position: relative;
  width: 100%;
}

/* ── Dropdown ── */
.fdo-autocomplete-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.fdo-autocomplete-dropdown::-webkit-scrollbar {
  width: 6px;
}

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

/* ── Sugerencias ── */
.fdo-suggestion {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #f0f0f0;
  outline: none;
}

.fdo-suggestion:last-child {
  border-bottom: none;
}

.fdo-suggestion:hover,
.fdo-suggestion:focus,
.fdo-suggestion.fdo-focused {
  background-color: #f0f7ff;
}

.fdo-suggestion-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e74c3c;
  margin-top: 1px;
}

.fdo-suggestion-text {
  flex: 1;
  min-width: 0;
}

.fdo-suggestion-main {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  line-height: 1.3;
  word-break: break-word;
}

.fdo-suggestion-sub {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

/* ── Estados ── */
.fdo-loading {
  padding: 14px 16px;
  color: #888;
  font-size: 13px;
  text-align: center;
}

.fdo-no-results {
  padding: 14px 16px;
  color: #666;
  font-size: 13px;
  text-align: center;
  line-height: 1.5;
}

.fdo-no-results small {
  color: #999;
}

/* ── Distancia en resultado de envío ── */
.fdo-distance {
  font-size: 12px;
  color: #888;
  font-weight: normal;
}

/* ── Ocultar campos hidden ── */
.fdo-hidden-field {
  display: none !important;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .fdo-autocomplete-dropdown {
    max-height: 250px;
  }

  .fdo-suggestion {
    padding: 12px;
  }

  .fdo-suggestion-main {
    font-size: 13px;
  }
}
