/* The trail pages (/trails and /trails/<code>, functions/trails/*.js):
   what they add on top of style.css and the seo shell's own rules. The
   line colour is the parks map's trail colour; everything else is a
   style.css token so the dark theme holds. */

.trails-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 14px;
}

#trails-q {
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--border, #cfd8d1);
  border-radius: 10px;
  background: var(--surface, #fff);
  color: var(--ink, #1b2a21);
  font: inherit;
  font-size: 16px;
}

.trails-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trails-chip {
  padding: 6px 12px;
  border: 1px solid var(--border, #cfd8d1);
  border-radius: 999px;
  background: var(--surface, #fff);
  color: var(--ink, #1b2a21);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.trails-chip small {
  color: var(--ink-muted, #5b7a66);
  font-weight: 400;
}

.trails-chip[aria-pressed="true"] {
  background: #b5451b;
  border-color: #b5451b;
  color: #fff;
}

.trails-chip[aria-pressed="true"] small {
  color: rgba(255, 255, 255, 0.85);
}

.trails-selects {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 14px;
  color: var(--ink-muted, #5b7a66);
}

.trails-selects select {
  margin-left: 4px;
  padding: 5px 8px;
  border: 1px solid var(--border, #cfd8d1);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--ink, #1b2a21);
  font: inherit;
  font-size: 14px;
}

.trails-clear {
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent-blue, #1c6e8c);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.trails-map {
  width: 100%;
  height: min(52vh, 460px);
  margin: 0 0 8px;
  border-radius: 12px;
  overflow: hidden;
  background: #e6ebe7;
}

.trail-tip {
  font-size: 12px;
}

.trailhead-pin {
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #b5451b;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
  color: #fff;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
}

.trails-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trail-card {
  padding: 14px 16px;
  border: 1px solid var(--border, #e3e8e4);
  border-left: 4px solid #b5451b;
  border-radius: 10px;
  background: var(--surface, #fff);
}

.trail-card.trail-open {
  box-shadow: 0 0 0 2px #b5451b inset;
}

.trail-name {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.trail-name a {
  color: var(--ink, #1b2a21);
  text-decoration: none;
}

.trail-name a:hover,
.trail-name a:focus-visible {
  text-decoration: underline;
}

.trail-closed {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--danger-tint, #f3e6e6);
  color: var(--danger, #a8384a);
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}

.trail-meta {
  margin: 4px 0 6px;
  font-size: 14px;
  color: var(--ink-muted, #5b7a66);
}

.trail-kinds {
  margin: 0 0 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.trail-kind {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--tint, #eef3ef);
  font-size: 12px;
  color: var(--ink, #1b2a21);
}

.trail-kind-waterfall { background: #dcecf5; }
.trail-kind-view { background: #e6f0dc; }
.trail-kind-peak { background: #efe3d2; }
.trail-kind-history { background: #ece3ef; }

.trail-profile {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  margin: 4px 0 6px;
}

.trail-profile-area {
  fill: #b5451b;
  fill-opacity: 0.14;
}

.trail-profile-line {
  stroke: #b5451b;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.trail-profile-txt {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 9px;
  fill: var(--ink-muted, #5b7a66);
}

.trail-label {
  color: var(--ink-muted, #5b7a66);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-right: 4px;
}

.trail-features,
.trail-heads,
.trail-links {
  margin: 4px 0;
  font-size: 14px;
  line-height: 1.6;
}

.trail-feature {
  display: inline-block;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--tint, #eef3ef);
}

.trail-feature-more {
  color: var(--ink-muted, #5b7a66);
}

.trail-head small {
  color: var(--ink-muted, #5b7a66);
}

.trail-drive {
  color: #b5451b;
  font-weight: 600;
  text-decoration: none;
}

.trail-drive:hover,
.trail-drive:focus-visible {
  text-decoration: underline;
}

.trail-hike {
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--tint, #f3f6f4);
}

.trail-hike h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.trail-hike h3 small {
  font-weight: 400;
  color: var(--ink-muted, #5b7a66);
  font-size: 12px;
}

.trail-hike-facts {
  margin: 2px 0;
  font-size: 13px;
  color: var(--ink-muted, #5b7a66);
}

.trail-hike-text p {
  margin: 6px 0;
  font-size: 15px;
  line-height: 1.55;
}

.trail-photo {
  margin: 8px 0;
}

.trail-photo img {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: 8px;
}

.trail-photo figcaption {
  font-size: 12px;
  color: var(--ink-muted, #5b7a66);
  margin-top: 3px;
}

.trail-links a {
  color: var(--accent-blue, #1c6e8c);
  text-decoration: none;
  font-weight: 600;
}

.trail-links a:hover,
.trail-links a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .trail-name {
    font-size: 18px;
  }
}
