/* Entire banner */
.banner {
  background-color: #51E9F4;
  display: flex;
  align-items: center;
  gap: 0.5em;
  position: fixed;
  top: 0%;
  left: 0%;
  width: 99%;
  padding: 0.25rem 1% 0 0.625rem;
  z-index: 999;
}

/* Banner buttons */
.banner-button-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

/* Banner logo */
.banner-image {
  border-radius: 25%;
  width: 4em;
  height: auto;
}

/* Banner title */
.banner-title {
  display: inline;
  font-size: 1.5em;
  font-weight: bold;
  width: max-content;
  color: black;
  text-decoration: none;
}

/* Banner title hover/focus */
.banner-title:hover, .banner-title:focus {
  text-decoration: underline solid;
}

/* Banner seach bar */
.banner-search-bar {
  color: black;
  background-color: #0bbdcf;
  border: none;
  padding: 0.375rem 0.75rem 0.375rem 0.5rem;
  font-size: 1.125em;
  border-radius: 0 1em 1em 0;
  width: 27ch;
  transition: 
    background-color 0.15s,
    border-radius 0.15s;

  /* Font stack is as follows:
   * Highest Priority (Roboto Mono)
   * Windows fallback (Courier New)
   * macOS fallback (Monaco)
   * Linux fallback (DejaVu Sans Mono)
   * Any possible monospace font (monospace)
   * Last resort (Arial) */
  font-family: 'Roboto Mono', 'Courier New', 'Monaco', 'DejaVu Sans Mono', monospace, 'Arial';
  font-weight: bold;
  }

.banner-search-bar::placeholder {
  color: black;

  /* Font stack is as follows:
   * Highest Priority (Roboto Mono)
   * Windows fallback (Courier New)
   * macOS fallback (Monaco)
   * Linux fallback (DejaVu Sans Mono)
   * Any possible monospace font (monospace)
   * Last resort (Arial) */
  font-family: 'Roboto Mono', 'Courier New', 'Monaco', 'DejaVu Sans Mono', monospace, 'Arial';
  font-weight: normal;
}

/* Banner search bar when hovered/focused */
.banner-search-bar:hover, .banner-search-bar:focus-visible,
.banner-search-button:hover, .banner-search-button:focus {
  background-color: #a7f5fa;
  border-bottom-right-radius: 0%;
}

/* Banner search bar when activated */
.banner-search-button:active {
  background-color: #11778d;
}

/* Banner search button */
.banner-search-button {
  font-size: 1.125em;
  padding: 0.375rem 0.5rem 0.375rem 0.75rem;
  cursor: pointer;
  background-color: #0bbdcf;
  border-radius: 50% 0 0 50%;
  border: none;
  transition: 
    transform 0.2s,
    background-color 0.15s;
}

/* Gives the search button some width (else it disappears) */
.banner-search-button img {
  margin-top: 0.25em;
  width: 1em;
}

/* Website buttons */
.content-button,
.banner-button,
.screen-reader-bypass,
.video-button {
  display: inline-block;
  color: black;
  border-width: 0;
  border-radius: 1em;
  padding: 0.33em 0.66em;
  font-size: 1.125em;
  font-weight: bold;
  cursor: pointer;
  background-color: #0bbdcf;
  text-decoration: none;
  text-align: center;
  transition:
    background-color 0.15s,
    border-radius 0.15s;
}

/* Website buttons mouse-over & focus */
.content-button:hover, .content-button:focus,
.banner-button:hover, .banner-button:focus,
.screen-reader-bypass:hover, .screen-reader-bypass:focus {
  background-color: #0c97ae;
  border-bottom-right-radius: 0%;
}

/* Video button mouse-over (without border change) */
.video-button:hover {
  background-color: #0c97ae;
}

/* Website buttons pressed*/
.content-button:active,
.banner-button:active,
.screen-reader-bypass:active,
.video-button:active {
  background-color: #11788d;
}

/* Content button */
.content-button {
  margin-top: 1em;
  margin-right: auto;
}

/* Content image (right) */
.content-image-right {
  display: grid;
  grid-template-columns: 3fr 2fr;
  margin-top: 2em;
}

/* Content image (left) */
.content-image-left {
  display: grid;
  grid-template-columns: 2fr 3fr;
  margin-top: 2em;
}

/* Content image flavor text */
.content-image-flavor {
  display: grid;
  grid-template-rows: auto 1fr;
}

/* Content images */
.content-image {
  display: block;
  margin: auto;
  margin-top: 48px;
  width: 90%;
  border: solid;
  border-width: 1px;
}

/* Entire page */
html {
  background-color: #2450a4;

  /* Font stack is as follows:
   * Highest Priority (Roboto Mono)
   * Windows fallback (Courier New)
   * macOS fallback (Monaco)
   * Linux fallback (DejaVu Sans Mono)
   * Any possible monospace font (monospace)
   * Last resort (Arial) */
  font-family: 'Roboto Mono', 'Courier New', 'Monaco', 'DejaVu Sans Mono', monospace, 'Arial';
}

/* Any anchor with child image */
a:has(img) {
  text-decoration: none;
}

/* Default header overrides */
h1, h2, h3, h4, h5, h6 {
  margin-block-start: 0;
  margin-block-end: 0;
  margin-inline-start: 0;
  margin-inline-end: 0;
}

/* Content header */
h1 {
  text-align: center;
  font-size: 2em;
  font-weight: bold;
}

/* Content subheader */
h2 {
  font-size: 1.75em;
  font-weight: bold;
}

/* Header 3 */
h3 {
  font-size: 1.25em;
  font-weight: bold;
}

/* Header 4 */
h4 {
  font-size: 1.25em;
  color: #767676;
  font-weight: normal;
}

/* Header 5 */
h5 {
  font-size: 1em;
  color: #767676;
  font-weight: normal;
}

/* Videos and GIFs */
video {
  width: 100%;
  border: solid;
  border-width: 1px;
}

/* Quote text */
blockquote {
  font-size: 1.125em;
  text-align: center;
  margin-top: 0.625em;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2em;
  color: #767676;
  width: 75%;
}

/* Content paragraph */
p {
  margin-block-start: 0;
  margin-block-end: 0;
  margin-inline-start: 0;
  margin-inline-end: 0;
  margin-top: 0.875em;
}

/* Ordered List */
ol {
  padding-left: 6ch;
}

/* Removes the marker for the list items. i.e. "*" */
.no-marker li {
  display: block;
}

/* Main body formatting */
main {
  margin-top: 6.25em;
  padding-top: 1em;
}

/* Main content page (the white part) */
main,
footer {
  background-color: white;
  min-width: 100%;
  max-width: 76ch;
  box-sizing: border-box;
  padding: 1em 2em 3.125em;
}

/* Footer specific */
footer {
  padding-top: 10em;
  text-align: center;
  color: #727272;
}

/* Static page elements (main, footer) */
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: fit-content;
  justify-self: center;
}

/* Footer icon images*/
.footer-icon {
  height: 2em;
  margin: 1em;
  transition:
    transform 0.2s;
}

/* Shakes the icons when hover/focused */
.footer-icon:hover, .footer-icon:focus,
footer a:hover .footer-icon, footer a:focus .footer-icon,
.banner-search-button:hover img, .banner-search-button:focus img {
  animation: shake 0.5s;
}

/* Footer website navigation */
.footer-nav ul {
  margin: 0.5em 10% 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1em;
}

/* Footer navigation link */
.footer-nav li {
  flex: 1 1;
  width: max-content;
  margin-left: auto;
  margin-right: auto;
}

/* Any plain-text link */
.link {
  text-decoration: underline dotted;
}

/* Any plain-text link (hover/focused) */
.link:hover, .link:focus {
  text-decoration: underline solid;
}

/* Hides things from view (display) */
.screen-reader-only,
.screen-reader-bypass:not(:focus):not(:active),
.video-button,
.video-shade {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip-path: inset(50%);
}

/* Unhides things from view (display) */
.screen-reader-bypass:focus,
.content-video:hover .video-button, .video-button:focus,
.content-video:hover .video-shade, .content-video:focus-within .video-shade, .video-shade:hover { 
  position: absolute;
  clip-path: none;    
  overflow: visible;
}

/* Specific styling for skip link unhide */
.screen-reader-bypass:focus {
  top: 6.25em;
  z-index: 999;
}

/* Content videos */
.content-video {
  position: relative;
  display: block;
  margin: auto;
  margin-top: 3em;
  width: 90%;
}

/* GIF/Video overlay shading */
.video-shade {
  position: absolute;
  top: 0;
  left: 0;
  height: 99%;
  width: 101%;
  opacity: 0.5;
  background-color: #727272;
  z-index: 1;
  pointer-events: none;
}

/* GIF/Video overlay play/pause button anchor */
.video-button {
  width: 4em;
  height: 4em;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  border-radius: 50%;
}

/* GIF/Video overlay play/pause button image */
.video-button-image {
  display: block;
  height: auto;
  width: 100%;
}

/* "JS is disabled" popup */
.noscript-popup {
  background-color: white;
  font-size: 1em;
  text-align: center;
  margin-top: 3.125em;
  padding: 0.3125em;
}

/* The little profile pictures */
.profile-icon {
  border-radius: 50%;
  height: 1em;
}

/* All <span> parents that have an <img> child with the "profile-icon" class */
span:has(img.profile-icon) {
  white-space: nowrap;
}

/* Used to shake icons when hovered/focused */
@keyframes shake {
  0% { transform: rotate(0deg);}
  25% { transform: rotate(5deg);}
  50% { transform: rotate(-5deg);}
  75% { transform: rotate(5deg);}
  100% { transform: rotate(0deg);}
}

/* Dark mode */
@media (prefers-color-scheme: dark) {

  /* Main content background in dark mode */
  main, footer {
    background-color: #1A2D51;
  }

  /* Footer text in dark mode */
  footer {
    color: #BABABA;
  }

  /* Website background & default text in dark mode */
  html {
    background-color: #101C32;
    color: #E7E7E7;
  }

  /* Block quotes in dark mode */
  blockquote {
    color: #B0B0B0;
  }

  /* Lower header colors in dark mode */
  h4, h5 {
    color: #B0B0B0;
  }

  /* Banner in dark mode */
  .banner {
    background-color: #234785;
  }

  /* Banner title in dark mode */
  .banner-title {
    color: #E7E7E7;
  }

  /* Banner search bar in dark mode */
  .banner-search-bar,
  .banner-search-button {
    background-color: #4596ED;
  }

  /* Banner search bar focused in dark mode */
  .banner-search-bar:hover, .banner-search-bar:focus-visible,
  .banner-search-button:hover, .banner-search-button:focus {
    background-color: #3671D9;
  }

  /* Banner search bar when activated */
  .banner-search-button:active {
    background-color: #11778d;
  }

  /* Website buttons in dark mode */
  .content-button,
  .banner-button,
  .screen-reader-bypass,
  .video-button {
    background-color: #4A99ED;
  }

  /* Links (excluding buttons) in dark mode */
  a:not(
    .content-button, .banner-button, .banner-title, .screen-reader-bypass, .video-button, .sidebar a, .search-results-match) {
    color: #85A8ff;
  }

  /* Visted links (excluding buttons) in dark mode */
  a:visited:not(.content-button, .banner-button, .banner-title, .screen-reader-bypass, .video-button, .sidebar a, .search-results-match) {
    color: #BB81FF;
  }
}

/* High contrast mode */
@media (forced-colors: active) {

  /* Makes website interactive elements visible */
  .content-button,
  .banner-button,
  .screen-reader-bypass,
  .video-button,
  .banner-search-button {
    border: 2px solid ButtonBorder;
  }

  /* Makes website interactive elements highlighted */
  .content-button:focus, .content-button:hover,
  .banner-button:focus, .banner-button:hover,
  .screen-reader-bypass:focus, .screen-reader-bypass:hover,
  .video-button:focus, .video-button:hover,
  .banner-search-button:focus, .banner-search-button:hover,
  .banner-search-bar:focus-visible, .banner-search-bar:hover {
    border: 2px solid Highlight;
  }

  /* Makes the banner visible */
  .banner {
    border-bottom: 2px solid CanvasText;
  }

  /* Makes the search bar visible */
  .banner-search-bar {
    border: 2px solid FieldText;
  }
}

/* Any screen less than or equal to 649 pixels in width */
@media screen and (max-width: 649px) {

  /* Banner dynamically collapses into rows */
  .banner {
    flex-wrap: wrap;
    padding-bottom: 0.5em;
  }

  /* To compensate for the banner taking up
  more height, the <main> content gets pushed
  further down the screen */
  main {
    margin-top: 9em;
  }

  /* The footer navigation is now 1 column */
  .footer-nav ul {
    grid-template-columns: 1fr;
    margin: 0.5em auto;
  }

  /* Content images blocks are spaced further apart */
  .content-image-right,
  .content-image-left {
    grid-template-columns: auto;
    margin-top: 8em;
  }

  /* All images/videos/GIFs are now below the flavor */
  .content-image,
  .content-video {
    order: 2;
    margin-top: 1em;
  }

  /* All flavor is now above the image/video/GIF */
  .content-image-flavor {
    order: 1;
  }
}

/* Any screen less than or equal to 349 pixels in width */
@media screen and (max-width: 349px) {

  /* The banner image is now hidden */
  .banner-image {
    display: none;
  }

  /* The search bar now resizes itself */
  .banner-search-bar {
    width: 100%;
  }

  /* Since the only method of page navigation left in
  the banner is the banner title, it is now obviously a link */
  .banner-title {
    text-decoration: dotted underline;
  }
}