/* course-selector.css: the "what courses are you taking?" picker above the map. Subtle by design:
 * it sits quietly, collapses to a thin pill, and themes through tokens.css variables only. */

#course-selector {
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
  font-family: var(--font-body);
}
#course-selector.is-collapsed { background: transparent; }

/* head row */
.cs-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
}
.cs-prompt {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.cs-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
}
.cs-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.cs-toggle-caret { font-size: 0.7em; }
#course-selector.is-collapsed .cs-toggle { margin-left: 0; }
#course-selector.is-collapsed .cs-head { padding: 6px 16px; }

/* body */
.cs-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 12px;
}

/* selected chips */
.cs-selected { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.cs-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px 4px 11px;
  border: 1px solid var(--accent);
  border-radius: 100px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}
.cs-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.cs-chip-x:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.cs-empty { color: var(--text-dim); font-size: 0.82rem; font-style: italic; }

/* typeahead */
.cs-type { position: relative; max-width: 360px; }
.cs-input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 11px;
  min-height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm, 8px);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
}
.cs-input::placeholder { color: var(--muted); }
.cs-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cs-suggest {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0; right: 0;
  margin: 0; padding: 4px;
  list-style: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm, 8px);
  background: var(--surface-3, var(--surface-2));
  box-shadow: var(--chrome-shadow, 0 6px 24px rgba(0,0,0,0.3));
  max-height: 280px;
  overflow: auto;
}
.cs-suggest-item { margin: 0; }
.cs-suggest-btn {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: var(--radius-sm, 6px);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
}
.cs-suggest-btn:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.cs-suggest-title { font-size: 0.86rem; font-weight: 600; }
.cs-suggest-code { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); }

/* the obvious course buttons */
.cs-allbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-coursebtn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 5px 11px;
  min-height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-family: var(--font-body);
}
.cs-coursebtn:hover { border-color: var(--accent); color: var(--text); }
.cs-coursebtn.is-on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.cs-coursebtn-title { font-size: 0.8rem; font-weight: 600; line-height: 1.1; }
.cs-coursebtn-code { font-family: var(--font-mono); font-size: 0.62rem; opacity: 0.8; line-height: 1; }

/* footer: show-the-whole-map */
.cs-foot { display: flex; }
.cs-showall {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
}
.cs-showall:hover { color: var(--text); border-color: var(--text-dim); }
.cs-showall.is-on {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold);
}

@media (max-width: 640px) {
  .cs-head { padding: 8px 12px; }
  .cs-body { padding: 0 12px 12px; }
  .cs-type { max-width: 100%; }
  .cs-coursebtn { flex: 1 1 auto; }
}
