/* Styling for the CCOS version picker and the tables it drives.
   See docs/_ext/ccos_meta.py and docs/_static/ccos-meta.js. */

/* sphinx_rtd_theme has no dark mode -- the page is always light -- so the
   picker is always light too. Keying it off prefers-color-scheme made it a
   dark bar floating on a white page. */
.ccos-picker {
  --ccos-surface: #f8f9fb;
  --ccos-border: #d7dbe0;
  --ccos-accent: #2980b9;
  --ccos-muted: #4a5560;
  --ccos-text: #404040;

  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--ccos-border);
  border-left: 3px solid var(--ccos-accent);
  border-radius: 3px;
  background: var(--ccos-surface);
  color: var(--ccos-text);
  /* The controls are light regardless of the OS setting, to match the theme. */
  color-scheme: light;
  font-size: 0.9em;
}

/* sphinx_rtd_theme hardcodes `label { color: #333 }`; take the panel's colour
   instead so the two stay in step. */
.ccos-picker label {
  margin: 0;
  color: inherit;
  font-weight: 700;
}

/* The theme forces `select { background-color: #fff }` but sets no colour, so
   the text would otherwise inherit whatever the panel uses. */
.ccos-picker select {
  margin-left: 0.4rem;
  padding: 0.15rem 0.3rem;
  color: var(--ccos-text);
  background-color: #fff;
}

.ccos-picker-toggle {
  font-weight: 400;
}

.ccos-picker-status {
  margin-left: auto;
  color: var(--ccos-muted);
  font-style: italic;
}

/* The generated tables should read like the hand-written ones around them. */
.ccos-table table {
  width: 100%;
}

.ccos-enum-options {
  margin-top: 0.4rem;
  font-size: 0.9em;
  opacity: 0.85;
}
