/* ==========================================================================
   NHV-12 — Search page
   ==========================================================================
   Only the search form lives here. The results — toolbar, grid, cards,
   pagination — reuse blocks/category.css, which is the listing stylesheet for
   both pages rather than a category-only one. Duplicating 200 lines of card CSS
   so the class prefix could read "search" would guarantee the two listings
   drift apart. */

.nhv-search-panel {
  margin: 0 0 22px;
  padding: 16px;
  background: var(--nhv-sand);
  border: 1px solid var(--nhv-rule-warm);
  border-radius: var(--nhv-radius-sm);
}

.nhv-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.nhv-search-field { flex: 1 1 200px; min-width: 0; }
.nhv-search-field--wide { flex: 2 1 320px; }

.nhv-search-label {
  display: block;
  margin: 0 0 5px;
  font-family: var(--nhv-font-display);
  font-size: var(--nhv-fs-small);
  font-weight: var(--nhv-fw-semi);
  color: var(--nhv-navy);
}

.nhv-search-panel .form-control,
.nhv-search-panel .form-control:focus {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  font-family: var(--nhv-font-body);
  font-size: var(--nhv-fs-base);
  color: var(--nhv-navy);
  background-color: var(--nhv-cream-bright);
  border: 1px solid var(--nhv-rule-warm);
  border-radius: var(--nhv-radius-sm);
  box-shadow: none;
}
.nhv-search-panel .form-control:focus-visible { outline: 2px solid var(--nhv-copper); outline-offset: 1px; }

/* The category select gets the same chevron as the toolbar's, drawn in copper
   rather than the OS grey. Right padding reserves room for it. */
.nhv-search-panel select.form-control {
  padding-right: 28px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23A3795B' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 7px;
}

.nhv-search-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.nhv-search-check {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-family: var(--nhv-font-body);
  font-size: var(--nhv-fs-small);
  font-weight: var(--nhv-fw-normal);
  color: var(--nhv-navy);
  cursor: pointer;
}
.nhv-search-check input { margin: 0; }
.nhv-search-check input:focus-visible { outline: 2px solid var(--nhv-copper); outline-offset: 2px; }

/* A disabled sub-category box is core's behaviour when no category is chosen —
   its script toggles it. Without a style for it the box just looks broken. */
.nhv-search-check input:disabled { cursor: not-allowed; }
.nhv-search-check input:disabled ~ span { color: var(--nhv-grey-link); }

.nhv-search-submit {
  margin-left: auto;
  padding: 9px 22px;
  font-family: var(--nhv-font-display);
  font-size: var(--nhv-fs-small);
  font-weight: var(--nhv-fw-semi);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nhv-cream-bright);
  background: var(--nhv-navy);
  border: 1px solid var(--nhv-navy);
  border-radius: var(--nhv-radius-sm);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.nhv-search-submit:hover { background: var(--nhv-navy-light); border-color: var(--nhv-navy-light); }
.nhv-search-submit:focus-visible { outline: 2px solid var(--nhv-copper); outline-offset: 2px; }

@media (max-width: 767px) {
  .nhv-search-submit { margin-left: 0; width: 100%; }
}
