/* moozo suggest — custom styles on top of Pico CSS classless */

body {
  max-width: 680px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-home-link,
.header-home-link:hover,
.header-home-link:focus,
.header-home-link:visited {
  color: var(--pico-h1-color) !important;
  text-decoration: none !important;
}

.header-row h1 {
  margin: 0;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
}

.subtitle {
  color: var(--pico-muted-color);
  margin: 0.25rem 0 1rem;
  font-size: 0.9rem;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  padding: 0.25rem;
  flex-shrink: 0;
}

/* ── Controls ────────────────────────────────────────────────────────────── */

.controls {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.controls label {
  flex: 1;
}

.results-count {
  flex: 0 0 6rem !important;
}

.results-count input {
  width: 100%;
}

/* ── Bias slider ─────────────────────────────────────────────────────────── */

/* Numeric scale labels below the slider */
.bias-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--pico-muted-color);
  padding: 0 2px;
  margin-top: -0.4rem;
  user-select: none;
}

/* Gradient fill: colour the track left of the thumb.
   --bias-fill is set (and updated on input) by inline JS in index.html. */
input[name="bias"] {
  --bias-fill: 50%;
}

input[name="bias"]::-webkit-slider-runnable-track {
  background: linear-gradient(
    to right,
    var(--pico-primary) var(--bias-fill),
    var(--pico-muted-border-color) var(--bias-fill)
  );
}

/* Firefox progress fill */
input[name="bias"]::-moz-range-progress {
  background: var(--pico-primary);
  border-radius: 4px;
}

/* ── HTMX loading indicator ──────────────────────────────────────────────── */

.htmx-indicator {
  display: none;
  margin-left: 0.5rem;
  font-size: 1.25em;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline;
}


/* ── Result cards ────────────────────────────────────────────────────────── */

.result-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

.result-image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-image img {
  border-radius: 4px;
  object-fit: cover;
}

.no-image {
  font-size: 2rem;
}

.result-info {
  flex: 1;
  min-width: 0;
  line-height: 1.6;
}

.result-info small {
  color: var(--pico-muted-color);
  display: block;
}

/* ── Featured artists ────────────────────────────────────────────────────── */

.featured-artists {
  margin: 2rem 0 1.5rem;
}

.featured-heading {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pico-muted-color);
  margin: 0 0 0.75rem;
  font-weight: bold;
}

.featured-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.featured-list a {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 99px;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--pico-color);
  transition: border-color 0.15s, color 0.15s;
}

.featured-list a:hover {
  border-color: var(--pico-primary);
  color: var(--pico-primary);
  text-decoration: none;
}

/* ── Popular searches section ────────────────────────────────────────────── */

.top20 {
  margin-top: 3rem;
  border-top: 1px solid var(--pico-muted-border-color);
  padding-top: 1rem;
}

.top20-empty {
  display: none;
}

.top20-heading {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pico-muted-color);
  display: block;
  margin: 0 0 0.5rem;
  font-weight: bold;
}

.top20-list {
  list-style: decimal;
  margin: 0;
  padding-left: 1.4rem;
  font-size: 0.85rem;
}

.top20-list li {
  padding: 0.25rem 0;
}

.top20-item {
  overflow: hidden;
}

.top20-name {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top20-count {
  display: inline;
  color: var(--pico-muted-color);
  font-size: 0.8rem;
}

.top20-links {
  display: block;
  color: var(--pico-muted-color);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Override Pico classless CSS which can render <a> as block inside certain contexts */
.top20-list a {
  display: inline;
}

/* ── Events badge ────────────────────────────────────────────────────────── */

.events-badge {
  display: block;
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.events-badge a {
  color: var(--pico-primary);
}
