/* Adapted from seating (server/static/css/style.css) so the two apps look the same;
   keep them in sync. src/index.css applies the same colors to the course pages.

   UC Berkeley colors (https://brand.berkeley.edu/visual-identity/colors/): Berkeley
   Blue #003262 takes the place of Bootstrap's blue, and California Gold #FDB515
   underlines the header. */
:root {
  --berkeley-blue: #003262;
  --berkeley-blue-dark: #00243f;
  --berkeley-blue-darker: #001a2e;
  --berkeley-blue-light: #8098b0;
  --california-gold: #fdb515;
  /* Founders Rock (#3b7ea1), a shade darker so that links have 4.5:1 contrast with the
     white page (WCAG 2.1 AA) and 3:1 with the body text, so they stand out from it
     without an underline. Berkeley Blue was too close to the text. */
  --link-blue: #39799b;

  --bs-primary: var(--berkeley-blue);
  --bs-primary-rgb: 0, 50, 98;
  --bs-primary-text-emphasis: var(--berkeley-blue-darker);
  --bs-primary-bg-subtle: #ccd6e0;
  --bs-primary-border-subtle: #99adc0;
  --bs-link-color: var(--link-blue);
  --bs-link-color-rgb: 57, 121, 155;
  --bs-link-hover-color: var(--berkeley-blue);
  --bs-link-hover-color-rgb: 0, 50, 98;
  --bs-focus-ring-color: rgba(0, 50, 98, 0.25);
}

/* Bootstrap's components set their own copy of its blue rather than reading --bs-primary */
.btn-primary {
  --bs-btn-bg: var(--berkeley-blue);
  --bs-btn-border-color: var(--berkeley-blue);
  --bs-btn-hover-bg: var(--berkeley-blue-dark);
  --bs-btn-hover-border-color: var(--berkeley-blue-dark);
  --bs-btn-focus-shadow-rgb: 0, 50, 98;
  --bs-btn-active-bg: var(--berkeley-blue-darker);
  --bs-btn-active-border-color: var(--berkeley-blue-darker);
  --bs-btn-disabled-bg: var(--berkeley-blue);
  --bs-btn-disabled-border-color: var(--berkeley-blue);
}

.dropdown-menu {
  --bs-dropdown-link-active-bg: var(--berkeley-blue);
}

.form-check-input:focus {
  border-color: var(--berkeley-blue-light);
  box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

.form-check-input:checked {
  background-color: var(--berkeley-blue);
  border-color: var(--berkeley-blue);
}

.nav-link:focus-visible {
  box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

.btn-close {
  --bs-btn-close-focus-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

a {
  text-decoration: none;
}

/* links within a sentence are underlined too, so they don't rely on color alone */
p a {
  text-decoration: underline;
}

.navbar.site-header {
  border-bottom: 4px solid var(--california-gold);
  /* Bootstrap's dark navbar dims its links to 55% white, too faint to read on the blue */
  --bs-navbar-color: #fff;
  --bs-navbar-hover-color: #fff;
  --bs-navbar-active-color: #fff;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--california-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.site-title {
  margin: 0;
  font-size: 1.25rem;
}

/* while the links are folded behind the menu button, the title takes the room left
   beside it, so a long title wraps instead of pushing the button onto its own line */
@media (max-width: 991.98px) {
  .site-title {
    flex: 1;
    min-width: 0;
  }
}

.site-title .navbar-brand {
  white-space: normal;
}

.site-content {
  padding: 16px 16px 10em;
}

/* pages that keep to a column in the middle of the screen */
.landing,
.main-container,
.rooms {
  margin: 0 auto;
}

.landing {
  max-width: 840px;
}

.main-container {
  max-width: 960px;
}

.rooms {
  max-width: 620px;
}

.checkbox ul {
  list-style-type: none;
}

.form-buttons {
  padding: 20px 10px 5px 10px;
}

/* As in seating: a borderless button holding a Bootstrap icon. */
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  border: 0;
  border-radius: 5px;
  background: none;
  color: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
  background-color: rgba(0, 0, 0, 0.12);
}

.offering-term {
  min-width: 4.5em;
  color: #424242;
  font-weight: bold;
}
