/* Site-wide shop search. Light by default; dark when data-search-theme="dark". */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ed-search {
  position: relative;
  flex: 0 1 240px;
  min-width: 160px;
  max-width: 320px;
}
.ed-search input[type="search"] {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong, #d4cfc8);
  border-radius: 0;
  background: transparent;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: inherit;
  appearance: none;
  font-family: inherit;
}
.ed-search input[type="search"]::placeholder { color: var(--muted, #6d6864); }
.ed-search input[type="search"]:focus {
  border-bottom-color: var(--rose-deep, #D9A3A8);
  outline: none;
}
.ed-search input[type="search"]::-webkit-search-decoration,
.ed-search input[type="search"]::-webkit-search-cancel-button { appearance: none; }

.ed-search-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  width: min(400px, 86vw);
  background: #fff;
  color: #1c1a19;
  border: 1px solid #e8e4df;
  z-index: 80;
  max-height: min(70vh, 440px);
  overflow: auto;
  padding: 8px 0;
}
.ed-search.is-open .ed-search-panel { display: block; }
.ed-search-item {
  display: block;
  padding: 10px 18px;
  text-decoration: none;
  color: inherit;
  border-left: 2px solid transparent;
}
.ed-search-item:hover,
.ed-search-item.is-active {
  background: #faf8f6;
  border-left-color: #D9A3A8;
}
.ed-search-kicker {
  display: block;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6d6864;
  margin-bottom: 2px;
}
.ed-search-title {
  display: block;
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.25;
  color: #1c1a19;
}
.ed-search-meta {
  display: block;
  font-size: 12px;
  color: #6d6864;
  margin-top: 2px;
}
.ed-search-empty {
  margin: 0;
  padding: 14px 18px;
  font-size: 14px;
  color: #6d6864;
}

/* Dark rooms and the main site header */
.ed-search[data-search-theme="dark"] input[type="search"] {
  border-bottom-color: #2a2a2f;
  color: #ececee;
  font-family: "JetBrains Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.ed-search[data-search-theme="dark"] input[type="search"]::placeholder { color: #74747c; }
.ed-search[data-search-theme="dark"] input[type="search"]:focus {
  border-bottom-color: #E8C4A8;
}
.ed-search[data-search-theme="dark"] .ed-search-panel {
  background: #101114;
  color: #ececee;
  border-color: #2a2a2f;
}
.ed-search[data-search-theme="dark"] .ed-search-item:hover,
.ed-search[data-search-theme="dark"] .ed-search-item.is-active {
  background: #0a0a0c;
  border-left-color: #E8C4A8;
}
.ed-search[data-search-theme="dark"] .ed-search-kicker,
.ed-search[data-search-theme="dark"] .ed-search-meta,
.ed-search[data-search-theme="dark"] .ed-search-empty { color: #a3a3ab; }
.ed-search[data-search-theme="dark"] .ed-search-title { color: #ececee; }

/* Shop header layout */
.site-header .header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 18px;
  margin-left: auto;
  min-width: 0;
}
.site-header .header-tools .ed-search {
  margin-right: 4px;
}
@media (max-width: 860px) {
  .site-header .bar { height: auto; flex-wrap: wrap; padding: 10px 0 12px; }
  .site-header .header-tools {
    width: 100%;
    flex-basis: 100%;
    flex-wrap: wrap;
    margin-left: 0;
    justify-content: flex-start;
  }
  .site-header .header-tools .ed-search {
    flex: 1 1 100%;
    max-width: none;
    order: 2;
  }
  .site-header .header-tools nav,
  .site-header .header-tools .cat-menu { order: 1; }
  .site-header .header-tools nav a { margin-left: 0; margin-right: 18px; }
  .site-header .header-tools .cat-menu-list { left: 0; right: auto; }
}

/* Main iExpress header */
.ix-shop-search {
  flex: 0 1 220px;
  min-width: 140px;
  max-width: 260px;
  margin-left: auto;
  margin-right: 12px;
}
@media (max-width: 767px) {
  .ix-shop-search {
    flex: 1 1 auto;
    max-width: 180px;
    margin-right: 8px;
  }
}
