/* Home page: the intro, the search box, and the quick stops chips. */

.home-intro {
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.home-title {
  font-size: 1.5rem;
}

.home-subtitle {
  margin-top: 0.375rem;
  color: var(--text-muted);
}

.home-cta {
  margin-top: 2rem;
  text-align: center;
}

/* "OR" centred on a rule that runs the width of the column */
.home-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.home-divider::before,
.home-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--border);
}

/* Search */

.search {
  position: relative;
  margin-top: 2rem;
}

.search-heading {
  font-size: 1.125rem;
  margin-bottom: 0.625rem;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.5rem 0 0.75rem;
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.search-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}

/* Square off the bottom so the field and its result list read as one surface */
.search-field[data-expanded="true"] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* The magnifier, first child of the field */
.search-field > svg {
  flex: none;
  color: var(--text-muted);
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 0;
  border: none;
  outline: none;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}

.search-clear:hover {
  background-color: var(--surface-2);
  color: var(--text);
}

.search-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  max-height: 20rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background-color: var(--surface);
  border: 1px solid var(--primary);
  border-top: none;
  border-bottom-left-radius: var(--r-md);
  border-bottom-right-radius: var(--r-md);
  box-shadow: var(--shadow-3);
  overscroll-behavior: contain;
}

.search-option {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  padding: 0.5rem 0.875rem;
  cursor: pointer;
}

.search-option[aria-selected="true"] {
  background-color: var(--primary-soft);
}

.search-option-code {
  flex: none;
  min-width: 2.75rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.search-option[aria-selected="true"] .search-option-code {
  color: var(--primary);
}

.search-option-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-mark {
  background: none;
  color: inherit;
  font-weight: 700;
}

.search-empty {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  padding: 0.875rem;
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-top: none;
  border-bottom-left-radius: var(--r-md);
  border-bottom-right-radius: var(--r-md);
  box-shadow: var(--shadow-2);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Quick stops */

.quick {
  margin-top: 2rem;
}

.quick-heading {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  max-width: 100%;
  padding: 0.375rem 0.875rem 0.375rem 0.625rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background-color: var(--surface);
  font-size: 0.875rem;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.quick-chip:hover {
  background-color: var(--surface-2);
  border-color: var(--text-muted);
}

.quick-chip svg {
  flex: none;
  color: var(--primary);
}

.quick-chip-recent svg {
  color: var(--text-muted);
}

.quick-chip-code {
  flex: none;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.quick-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}
