/* Soluciones Eléctricas de Arizona — header autocomplete (SEA_FACETS=on only; spec §10.2, fc-suggest.js). Every rule is
   scoped to .fc-ac* (plus .search input[data-ac] on coarse pointers); site.css's .suggest, .search and .btn rules are
   untouched. fc-core setHeaderVar sets the vars on the first focus and on resize: --fc-vvh (visual viewport height),
   --fc-actop (the dropdown's top in it), --fc-acw / --fc-acl (its width and left offset above 700px: at least 520px,
   past the input if need be, never off screen). Rows wrap by the dropdown's own width, not the viewport's. */
.fc-ac { position: absolute; top: 46px; left: 0; right: 54px; background: #fff; color: var(--ink); border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.25); z-index: 60;
  max-height: max(120px, min(70vh, calc(var(--fc-vvh,100dvh) - var(--fc-actop,var(--fc-hdr,102px)) - 8px))); overflow-y: auto; overscroll-behavior: contain; container-type: inline-size; }
.fc-ac-row { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 6px; border-bottom: 1px solid var(--line-2); font-size: 14px; line-height: 1.3; }
.fc-ac-row:last-child { border-bottom: 0; }
.fc-ac-row:hover { background: #f7fafd; }
.fc-ac-main { flex: 1; min-width: 0; padding: 3px; border-radius: 6px; }
.fc-ac-main > a { display: flex; gap: 10px; align-items: center; color: var(--ink); }
.fc-ac-main > a:hover { text-decoration: none; }
.fc-ac-main > a:hover .fc-ac-title { text-decoration: underline; }
.fc-ac-thumb { flex: none; width: 40px; height: 40px; display: grid; place-items: center; color: #9aa6b2; }
.fc-ac-thumb img { width: 40px; height: 40px; object-fit: contain; background: #fff; }
.fc-ac-txt { min-width: 0; display: flex; flex-direction: column; }
.fc-ac-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.fc-ac-spec { color: var(--blue); font-weight: 600; font-size: 12.5px; }
.fc-ac-txt small { color: var(--muted); font-size: 12.5px; }
.fc-ac-act { flex: none; padding: 3px; border-radius: 999px; }
.fc-ac-act > * { white-space: nowrap; }
/* the dropdown sits inside form.search: undo site.css's .search button (0,1,1) and :hover (0,2,1) on the add button */
.fc-ac div button { width: auto; border-radius: 999px; background: var(--blue); color: #fff; display: inline-flex; }
.fc-ac div button:hover { background: var(--blue-2); }
.fc-ac div button.added { background: var(--green); }
.fc-ac mark { background: #fff3c4; color: inherit; padding: 0; }
.fc-ac .fc-on { background: #e8f1fa; box-shadow: inset 0 0 0 2px var(--blue); }
.fc-ac-foot > div, .fc-ac-load > div, .fc-ac-none > div { flex: 1; padding: 6px 8px; border-radius: 6px; }
.fc-ac-foot a { display: block; font-weight: 700; }
.fc-ac-load { color: var(--muted); }
.fc-ac-none p { margin: 0 0 6px; }
.fc-ac-none p + p { color: var(--muted); font-size: 13px; }
@media (min-width: 701px) { .fc-ac { left: var(--fc-acl,0px); width: var(--fc-acw,auto); } }
@media (max-width: 700px) { .fc-ac { right: 0; } }
@media (pointer: coarse) {
  .search input[data-ac] { font-size: 16px; }
  .fc-ac-row { min-height: 44px; }
  .fc-ac-act > *, .fc-ac-foot a { min-height: 40px; }
  .fc-ac-foot a { display: flex; align-items: center; }
}
/* a narrow dropdown: the action cell wraps under the text (the media rule is for browsers without container queries) */
@media (max-width: 480px) {
  .fc-ac-row { flex-wrap: wrap; }
  .fc-ac-main { flex-basis: 100%; }
  .fc-ac-act { margin: -4px 0 2px 50px; }
}
@container (max-width: 460px) {
  .fc-ac-row { flex-wrap: wrap; }
  .fc-ac-main { flex-basis: 100%; }
  .fc-ac-act { margin: -4px 0 2px 50px; }
}
/* a short viewport (a phone keyboard, landscape): one title line and no thumbnail, so more rows fit */
@media (max-height: 500px) {
  .fc-ac-thumb { display: none; }
  .fc-ac-title { -webkit-line-clamp: 1; }
  .fc-ac .fc-ac-act { margin-left: 0; }
}
@media (forced-colors: active) { .fc-ac .fc-on { outline: 2px solid Highlight; outline-offset: -2px; } }
