/* State directory navigation — official strip, guided finder, browse */

.sdn {
  margin: 2rem 0 2.5rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Official strip (muted reference) --- */
.sdn-official-strip {
  margin: 0 0 1.25rem;
  padding: 0.65rem 0.9rem;
  background: #f7f8f9;
  border: 1.5px solid #0063A0;
  border-radius: 6px;
}

.sdn-official-strip__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #5a6570;
  text-align: center;
}

.sdn-official-strip__label {
  font-weight: 500;
  color: #4a5560;
}

.sdn-official-strip__sep {
  margin: 0 0.35rem;
  color: #b0b8c0;
}

.sdn-official-strip__link {
  color: #5a6570;
  text-decoration: underline;
  text-underline-offset: 2px;
  border-bottom: 0;
  background-image: none;
}

.sdn-official-strip__link:hover,
.sdn-official-strip__link:focus {
  color: #0063A0;
}

/* --- Guided finder (primary) --- */
.sdn-finder {
  padding: 1.5rem 1.35rem 1.35rem;
  background: #fff;
  border: 2px solid #dce3ea;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 63, 100, 0.06);
}

.sdn-finder__title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a2330;
  text-align: center;
  line-height: 1.3;
}

.sdn-finder__subtitle {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: #5a6570;
  text-align: center;
  line-height: 1.45;
}

.sdn-finder__fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sdn-finder__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.sdn-finder__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2c3e50;
}

.sdn-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;
}

.sdn-finder__select,
.sdn-finder__input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
  line-height: 1.45;
  color: #1a2330;
  background: #fff;
  border: 1.5px solid #c5ced6;
  border-radius: 6px;
  appearance: auto;
  box-sizing: border-box;
}

.sdn-finder__select:focus,
.sdn-finder__input:focus {
  outline: 2px solid #0063A0;
  outline-offset: 2px;
  border-color: #0063A0;
}

.sdn-finder__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  background: #0063A0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.sdn-finder__submit:hover:not(:disabled) {
  background: #004f80;
}

.sdn-finder__submit:focus {
  outline: 2px solid #0063A0;
  outline-offset: 3px;
}

.sdn-finder__submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sdn-finder__popular {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #eef1f4;
}

.sdn-finder__popular-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7680;
  margin-right: 0.15rem;
}

.sdn-finder__chip {
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #0063A0;
  background: #eef5fa;
  border: 1px solid #c5d9e8;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sdn-finder__chip:hover,
.sdn-finder__chip:focus {
  background: #dceaf4;
  border-color: #0063A0;
  outline: none;
}

.sdn-finder__chip:focus {
  outline: 2px solid #0063A0;
  outline-offset: 2px;
}

.sdn-finder__chip.is-selected {
  background: #0063A0;
  color: #fff;
  border-color: #0063A0;
}

.sdn-finder__hint {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: #8a4b00;
  text-align: center;
}

/* Combobox (JS-enhanced county search) */
.sdn-combobox {
  position: relative;
}

.sdn-combobox__list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  max-height: 240px;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  overflow-y: auto;
  background: #fff;
  border: 1.5px solid #c5ced6;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.sdn-combobox__option {
  display: block;
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  text-align: left;
  color: #1a2330;
  background: transparent;
  cursor: pointer;
  box-sizing: border-box;
}

.sdn-combobox__option:hover,
.sdn-combobox__option.is-active,
.sdn-combobox__option[aria-selected="true"] {
  background: #eef5fa;
  color: #0063A0;
}

.sdn-combobox__empty {
  padding: 0.75rem 0.85rem;
  font-size: 0.9rem;
  color: #6b7680;
}

/* --- Browse (secondary) --- */
.sdn-browse {
  margin-top: 1.25rem;
  border: 1px solid #e4e8ec;
  border-radius: 8px;
  background: #fafbfc;
}

.sdn-browse__summary {
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4a5560;
  cursor: pointer;
  list-style: none;
}

.sdn-browse__summary::-webkit-details-marker {
  display: none;
}

.sdn-browse__summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.5rem;
  color: #8a949e;
  transition: transform 0.15s ease;
}

.sdn-browse[open] > .sdn-browse__summary::before {
  transform: rotate(90deg);
}

.sdn-browse__summary:focus {
  outline: 2px solid #0063A0;
  outline-offset: -2px;
}

.sdn-browse__body {
  display: grid;
  gap: 1.15rem;
  padding: 0 1rem 1.15rem;
  border-top: 1px solid #eef1f4;
}

.sdn-browse__group-title {
  margin: 0.9rem 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6b7680;
}

.sdn-browse__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sdn-browse__list li {
  margin: 0;
}

.sdn-browse__list a {
  display: block;
  padding: 0.4rem 0;
  font-size: 0.92rem;
  color: #0063A0;
  text-decoration: none;
  border-bottom: 0;
  background-image: none;
}

.sdn-browse__list a:hover,
.sdn-browse__list a:focus {
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (min-width: 640px) {
  .sdn-finder {
    padding: 1.75rem 1.75rem 1.5rem;
  }

  .sdn-finder__fields {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
    gap: 0.85rem;
  }

  .sdn-finder__submit {
    width: auto;
    min-width: 140px;
    white-space: nowrap;
  }

  .sdn-browse__body {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .sdn-official-strip__text {
    text-align: left;
  }
}
