/* Hand-editable site styling. Copied to docs/assets/ by build_inquiry_site.py.
 *
 * The font scale comes from theme.font_scale in inquiry/days.yaml, which the build writes
 * into the generated theme.css as --inquiry-font-scale. Material sizes almost everything in
 * rem from the root font size, so scaling the root scales body text, headings, navigation,
 * code and the transcript together. These three breakpoints mirror Material's own values. */

html {
  font-size: calc(125% * var(--inquiry-font-scale, 1));
}

@media screen and (min-width: 100em) {
  html {
    font-size: calc(137.5% * var(--inquiry-font-scale, 1));
  }
}

@media screen and (min-width: 125em) {
  html {
    font-size: calc(150% * var(--inquiry-font-scale, 1));
  }
}

/* The few places Material sets a fixed size rather than inheriting one. */
.md-typeset .admonition,
.md-typeset details {
  font-size: calc(0.7rem * var(--inquiry-typeset-boost, 1.05));
}

/* Colour theme selector in the header. */
.inquiry-color-picker {
  display: flex;
  align-items: center;
  margin: 0 0.2rem;
}

.inquiry-color-picker__select {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 0.1rem;
  background: transparent;
  color: var(--md-primary-bg-color);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.62rem;
  padding: 0.15rem 0.4rem;
}

.inquiry-color-picker__select:hover {
  border-color: var(--md-primary-bg-color);
}

/* Options render in the OS menu, which does not inherit the header's colours. */
.inquiry-color-picker__select option {
  color: initial;
}

@media screen and (max-width: 44em) {
  .inquiry-color-picker__select {
    max-width: 5.5rem;
  }
}

/* Clickable timestamps that seek the day's MP3. */
.md-typeset a.inquiry-seek {
  color: var(--md-accent-fg-color);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.md-typeset a.inquiry-seek:hover,
.md-typeset a.inquiry-seek.is-playing {
  color: var(--md-primary-fg-color);
  border-bottom-style: solid;
}

.md-typeset a.inquiry-seek code {
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: inherit;
  font-size: 0.85em;
}

/* Sticky bottom player. */
.inquiry-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: none;
  background: var(--md-default-bg-color);
  border-top: 1px solid var(--md-default-fg-color--lightest);
  box-shadow: 0 -0.2rem 0.8rem rgba(0, 0, 0, 0.12);
  padding: 0.55rem 0.9rem calc(0.55rem + env(safe-area-inset-bottom));
}

.inquiry-player.is-visible {
  display: block;
}

html.inquiry-player-open body {
  padding-bottom: 4.5rem;
}

.inquiry-player__main {
  display: grid;
  grid-template-columns: auto minmax(7rem, 12rem) 1fr auto;
  gap: 0.7rem;
  align-items: center;
  max-width: 70rem;
  margin: 0 auto;
}

.inquiry-player__play,
.inquiry-player__close {
  appearance: none;
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: 0.2rem;
  background: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  padding: 0.35rem 0.7rem;
}

.inquiry-player__close {
  background: transparent;
  color: var(--md-default-fg-color);
  font-size: 1rem;
  line-height: 1;
  padding: 0.2rem 0.55rem;
}

.inquiry-player__title {
  font-size: 0.72rem;
  font-weight: 600;
}

.inquiry-player__time {
  font-size: 0.65rem;
  color: var(--md-default-fg-color--light);
  font-variant-numeric: tabular-nums;
}

.inquiry-player__range {
  width: 100%;
  accent-color: var(--md-primary-fg-color);
}

@media screen and (max-width: 44em) {
  .inquiry-player__main {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "play meta close"
      "range range range";
  }

  .inquiry-player__play {
    grid-area: play;
  }

  .inquiry-player__meta {
    grid-area: meta;
  }

  .inquiry-player__range {
    grid-area: range;
  }

  .inquiry-player__close {
    grid-area: close;
  }
}

