/* The List page. Builds on ../css/style.css (colors, nav, sections). */

.hh-subtitle {
  margin-top: 8px;
  color: var(--muted);
  font-size: 1.15rem;
}

[hidden] {
  display: none !important;
}

.brand:hover {
  color: #ffffff;
}

.hh-header {
  margin-bottom: 26px;
}

.hh-intro {
  margin: 14px 0 0;
  padding-left: 1.1em;
  color: var(--muted);
}

.hh-contact {
  margin-top: 10px;
  color: var(--muted);
}

.hh-contact a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-2);
}

/* ---------- toolbar ---------- */

.hh-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(34, 40, 49, 0.92);
  backdrop-filter: blur(8px);
  font-size: 0.92rem;
}

.hh-search {
  position: relative;
  display: flex;
  flex: 1 1 100%;
  align-items: center;
}

.hh-search .icon {
  position: absolute;
  left: 12px;
  color: var(--accent-2);
  pointer-events: none;
}

.hh-search input {
  width: 100%;
  padding: 9px 96px 9px 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(57, 62, 70, 0.6);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.hh-search input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

.hh-search input:focus {
  border-color: rgba(223, 208, 184, 0.55);
}

.hh-search input::-webkit-search-cancel-button {
  filter: grayscale(1) brightness(1.6);
  cursor: pointer;
}

.hh-search-status {
  position: absolute;
  right: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  pointer-events: none;
  white-space: nowrap;
}

.hh-empty {
  margin-top: 34px;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
}

.hh-progress {
  display: flex;
  flex: 1 1 220px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.hh-progress span {
  white-space: nowrap;
}

progress {
  flex: 1;
  height: 8px;
  border: 0;
  border-radius: 99px;
  overflow: hidden;
  appearance: none;
  background: var(--surface);
}

progress::-webkit-progress-bar {
  background: var(--surface);
}

progress::-webkit-progress-value {
  background: var(--accent-2);
  border-radius: 99px;
}

progress::-moz-progress-bar {
  background: var(--accent-2);
  border-radius: 99px;
}

.hh-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
}

.hh-reset {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(57, 62, 70, 0.48);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.hh-reset:hover:not(:disabled) {
  border-color: rgba(223, 208, 184, 0.5);
}

.hh-reset:disabled {
  opacity: 0.45;
  cursor: default;
}

.hh-reset.is-armed {
  border-color: #d9826b;
  color: #f0b4a3;
}

/* ---------- sections & groups ---------- */

.hh-section h2,
.hh-group h3 {
  justify-content: space-between;
}

.hh-group h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 22px 0 6px;
  font-size: 1rem;
  color: var(--text);
}

.hh-section .hh-group:first-of-type h3 {
  margin-top: 8px;
}

.hh-count {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.hh-note {
  color: var(--muted);
  margin-bottom: 6px;
}

/* ---------- items ---------- */

.hh-items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hh-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 2px 10px;
  padding: 9px 4px;
  border-top: 1px solid var(--line);
}

.hh-item.is-first {
  border-top: 0;
}

.hh-label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
}

.hh-label input,
.hh-toggle input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 4px 0 0;
  accent-color: var(--accent-2);
  cursor: pointer;
}

.hh-toggle input {
  margin: 0;
}

.hh-text {
  min-width: 0;
}

.hh-name {
  font-weight: 650;
}

.hh-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.6;
  vertical-align: 2px;
}

.hh-desc {
  display: block;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.hh-extra {
  grid-column: 1;
  padding-left: 30px;
  font-size: 0.9rem;
}

.hh-extra a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-2);
}

.hh-map {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--accent-2);
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

.hh-map:hover,
.hh-map:focus-visible {
  border-color: var(--line);
  color: var(--text);
}

.hh-item.is-done .hh-name {
  text-decoration: line-through;
  text-decoration-color: var(--accent-2);
  color: var(--muted);
}

.hh-item.is-done .hh-desc,
.hh-item.is-done .hh-tag,
.hh-item.is-done .hh-extra {
  opacity: 0.6;
}


@media (max-width: 620px) {
  .nav-links {
    display: flex;
  }

  .hh-toolbar {
    padding: 10px 12px;
  }

  .hh-section {
    padding: 18px;
  }
}
