/* Fil Doux header search — matched to the site (Work Sans, navy #041e42, square corners). */
.fdhs {
  --fdhs-navy: #041e42;
  --fdhs-text: #363636;
  --fdhs-line: #dddedf;
  --fdhs-soft: #f4f5f6;
  position: relative;
  display: inline-block;
  font-family: inherit;
  color: var(--fdhs-text);
  line-height: 1.4;
}
.fdhs *, .fdhs *::before, .fdhs *::after { box-sizing: border-box; }

.fdhs-toggle {
  /* Sized to the icon itself so it lines up with the header's ti-bag / ti-user icons */
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; height: auto; padding: 0; margin: 0; border: 0; background: none; line-height: 1;
  cursor: pointer; color: var(--fdhs-navy);
}
.fdhs-toggle .ti-search, .fdhs-toggle svg { display: block; }
.fdhs-toggle:focus-visible, .fdhs-close:focus-visible { outline: 2px solid var(--fdhs-navy); outline-offset: 2px; }

/* The panel: dropdown under the icon on desktop */
.fdhs--icon .fdhs-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 99999;
  width: min(560px, 92vw); background: #fff; border: 1px solid var(--fdhs-line);
  box-shadow: 0 12px 32px rgba(4, 30, 66, 0.14);
}
.fdhs-panel[hidden] { display: none; }
.fdhs--bar { display: block; width: 100%; max-width: 560px; }
.fdhs--bar .fdhs-panel { position: relative; }

.fdhs-form { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 12px; height: 50px; border-bottom: 1px solid var(--fdhs-line); background: #fff; }
.fdhs--bar .fdhs-form { border: 1px solid var(--fdhs-line); }
.fdhs-icon { display: inline-flex; color: var(--fdhs-navy); opacity: 0.8; }
/* Themify icon: same size and color as the header's ti-bag / ti-user (20px, navy) */
.fdhs-toggle .ti-search { font-size: 20px; line-height: 1; color: var(--fdhs-navy); }
.fdhs-icon .ti-search { font-size: 18px; line-height: 1; }
.fdhs-input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; box-shadow: none; background: transparent;
  font: inherit; font-size: 16px; color: var(--fdhs-text); padding: 0;
}
.fdhs-input::placeholder { color: #8a8d90; }
.fdhs-input::-webkit-search-cancel-button { display: none; }
.fdhs-close { border: 0; background: none; font-size: 26px; line-height: 1; color: var(--fdhs-text); cursor: pointer; padding: 0 4px; }

/* Results */
.fdhs-results { max-height: min(70vh, 640px); overflow-y: auto; background: #fff; }
.fdhs--bar .fdhs-results {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 99999; border: 1px solid var(--fdhs-line); border-top: 0;
  box-shadow: 0 12px 32px rgba(4, 30, 66, 0.14);
}
.fdhs-results[hidden] { display: none; }
.fdhs-sec {
  padding: 14px 16px 6px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fdhs-navy); font-weight: 600;
}
.fdhs-item {
  display: flex; align-items: center; gap: 12px; padding: 8px 16px; text-decoration: none; color: inherit;
}
.fdhs-item:hover, .fdhs-item.is-active { background: var(--fdhs-soft); }
.fdhs-item img, .fdhs-noimg { flex: 0 0 48px; width: 48px; height: 48px; object-fit: cover; background: var(--fdhs-soft); }
.fdhs-text { display: flex; flex-direction: column; min-width: 0; }
.fdhs-title { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fdhs-title mark { background: none; color: var(--fdhs-navy); text-decoration: underline; text-underline-offset: 2px; padding: 0; }
.fdhs-sub { font-size: 12.5px; opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fdhs-empty { padding: 18px 16px; font-size: 14px; }

.fdhs-foot { border-top: 1px solid var(--fdhs-line); margin-top: 8px; }
.fdhs-all, .fdhs-ask { display: block; padding: 12px 16px; font-size: 14px; text-decoration: none; }
.fdhs-all { color: var(--fdhs-navy); font-weight: 600; }
.fdhs-ask { color: #fff; background: var(--fdhs-navy); }
.fdhs-all:hover, .fdhs-all.is-active { background: var(--fdhs-soft); }
.fdhs-ask:hover, .fdhs-ask.is-active { background: #0b2c5c; }

/* Phones: full-screen overlay, like FiboSearch's mobile mode */
@media (max-width: 767px) {
  .fdhs--icon .fdhs-panel {
    position: fixed; inset: 0; width: auto; border: 0; box-shadow: none; display: flex; flex-direction: column;
  }
  .fdhs--icon .fdhs-panel[hidden] { display: none; }
  .fdhs--icon .fdhs-results { max-height: none; flex: 1; }
  html.fdhs-open, html.fdhs-open body { overflow: hidden; }
}
