@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

:root {
  --bb-dark-blue: #0d4877;
  --bb-light-blue: #2ca3e1;
  --bb-black: black;
  --bb-dark-gray: #59595c;
  --bb-light-gray: #e6e7e7;
  --bb-white: white;

  --header-background-color: var(--bb-white);
  --header-text-color: var(--bb-black);
  --header-height: 5.5rem;

  --content-background-color: var(--bb-white);
  --content-text-color: var(--bb-black);

  --highlight-background-color: var(--bb-light-gray);
  --highlight-text-color: var(--bb-black);

  --map-background-color: var(--bb-light-gray);
  
  --button-background-color: var(--bb-black);
  --button-text-color: var(--bb-white);
  --subtle-button-background-color: var(--bb-light-gray);
  --subtle-button-text-color: var(--bb-black);

  --input-border-width: 3px;
  --input-focused-border-color: var(--bb-black);
  --input-blurred-border-color: var(--bb-light-gray);

  --divider-color: var(--bb-dark-gray);
}

body {
  font-family: "DM Sans", sans-serif;
  font-optical-sizing: auto;
  background-color: var(--map-background-color);
  color: var(--content-text-color);
}

/*= Global Styles */

.btn, .btn:visited, .btn:link {
  background-color: var(--subtle-button-background-color);
  color: var(--subtle-button-text-color);
  box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.25);
  border-radius: 0.5rem;
  border-color: var(--input-blurred-border-color);
  border-width: var(--input-border-width);
  border-style: solid;
  font-family: "DM Sans", sans-serif;
  text-shadow: none;
  text-transform: none;
}

.btn-primary, .btn-primary:visited, .btn-primary:link {
  background-color: var(--button-background-color);
  color: var(--button-text-color);
  border-color: var(--button-background-color);
  border-radius: 2rem;
}

/*= Site Header */

#nav-btn {
  background-color: var(--content-background-color);
  color: var(--content-text-color);
  border-radius: 0.5rem;
  box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.25);
  text-shadow: none;
  font-weight: lighter;
  z-index: 1;
}

#site-header {
  display: flex;
  align-items: center;
  padding: 0;
  background-color: var(--header-background-color);
  color: var(--header-text-color);
}

#site-title {
  display: none;
}

#site-title .bluebikes-logo {
  margin-left: 2rem;
  height: 1.3rem;
  width: auto;
  max-width: none;
}

.access.is-exposed {
  position: absolute;
  background-color: var(--bb-light-gray);
  box-sizing: border-box;
}

#pages-nav-container .access.is-exposed {
  top: -0.5rem;
  padding-top: 3.5rem;
}

#language-picker .access.is-exposed {
  top: 6rem;
}

.current-language {
  display: flex;
  align-items: center;
  justify-content: center;
}

.language-carousel {
  position: relative;
  display: inline-block;
  width: 7em;
}

.language-carousel::after {
  position: absolute;
  top: -10%;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  content: '...';
}

/* Cycle through each language item, showing it for two seconds, and then fading to the next one */
@keyframes fadeBetweenLanguages {
  0%, 10% { opacity: 0; }
  10%, 50% { opacity: 1; }
  50%, 60% { opacity: 1; }
  60%, 100% { opacity: 0; }
}

.language-item {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  animation: fadeBetweenLanguages 6s linear infinite 0s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.language-item:nth-child(1) { animation-delay: 0s; }
.language-item:nth-child(2) { animation-delay: 3s; }

.access.is-exposed .menu-item .btn {
  border-radius: 0;
  border-width: 1px 0;
  border-color: var(--divider-color);
  box-shadow: none;
  height: 2.5rem;
}

@media screen and (width >= 60em) {
  #site-header {
    height: var(--header-height);
  }
  
  #site-title {
    display: block;
    font-family: "DM Sans", sans-serif;
    text-shadow: none;
  }

  #site-title a:link, #site-title a:visited {
    color: var(--header-text-color);
  }

  .access {
    top: 0;
    margin: 0;
    height: 100%;
  }

  .menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
  }

  .menu li {
    float: none;
    margin: 0;
    height: 100%;
  } 

  .access li:hover > ul, .access li:hover > form > ul {
    height: auto;
    width: 10rem;
  }

  .language-carousel::after {
    content: '⌄';
  }

  #pages-nav-container {
    flex-grow: 1;
  }

  #pages-nav-container .access {
    width: 100%;
  }

  .menu-item .btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: white;
    box-shadow: none;
    border-width: 0 0 0 1px;
    border-color: var(--bb-light-gray);
    border-radius: 0;
    padding: 1.5rem;
    height: 100%;
    font-size: 1rem;
  }

  .menu-item .btn:hover {
    color: var(--bb-light-blue);
  }
}

/*= Map Container */

#map {
  background-color: var(--map-background-color);
}

#stations-overlay,
#proximity-overlay,
#suggestions-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

#map canvas,
#stations-overlay canvas,
#proximity-overlay canvas,
#suggestions-overlay canvas {
  cursor: pointer;
}

#suggestions-overlay .mapboxgl-canvas {
	mix-blend-mode: multiply;
}

#map-progress {
  top: 3.5rem;
  left: 0.5rem;
  right: 0.5rem;
}

#place-search-box {
	position: absolute;
	z-index: 11;
	left: 3.5rem;
	right: 3.5rem;
	top: 0.5rem;
	height: 2rem;
}

#place-search-box input[role="combobox"] {
  padding: 0 40px;
  border-width: 0;
  height: 2.5rem;
}

.geolocation-button-wrapper {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 11;
}

#geolocation-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background-color: var(--content-background-color);
  background-image: url("images/locate-me.75762b6fb943.svg");
  background-size: contain;
  color: var(--content-text-color);
  box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.25);
}

@media only screen and (width < 60em) {
  #map {
    /* transition: height 0.3s ease-in-out; */
  }

  body:not(.content-visible) #map,
  body:not(.content-visible) #stations-overlay,
  body:not(.content-visible) #proximity-overlay,
  body:not(.content-visible) #suggestions-overlay {
    /* There's no good way to account for the location-bar size on a mobile
    browser, but here I just give it 32 px of room. Then I subtract another
    10rem for the bottom button and colophon. */
    height: calc(100vh - 32px - 10rem);
  }
}

@media only screen and (width >= 60em) {
  #place-search-box {
    top: calc(var(--header-height) + 0.5rem);
    left: 3.5rem;
    right: 0.5rem;
  }

  .content-visible #place-search-box {
    top: calc(var(--header-height) + 0.5rem);
    left: 3.5rem;
    right: 27.5rem;
  }

  .geolocation-button-wrapper {
    top: calc(var(--header-height) + 0.5rem);
    right: auto;
    left: 0.5rem;
  }
}

/*= Content Panel */

article h1 {
  font-size: 1.35rem;
  margin: -1rem -1rem 1rem -1rem;
  padding: 1rem 3rem;
  background-image: url("../img/header-background.adac7a447fd2.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: white;
}

article h2 {
  font-size: 1.2rem;
  border-bottom: 1px solid var(--bb-light-gray);
}

a.close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0.5rem;
  right: 0.5rem;
  left: auto;
  box-shadow: none;
  box-sizing: border-box;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 1.25rem;
  background-color: var(--subtle-button-background-color);
  color: var(--subtle-button-text-color);
}

a.close-btn span {
  display: none;
}

.bluebikes-logo {
  margin: 2rem auto;
  max-width: 70%;
  display: block;
}

.place-form .map-legend-container {
  margin-bottom: 1rem;
}

.map-legend {
  padding: 0;
  margin: 0;
  margin-top: 1rem;
  list-style: none;
}

.map-legend li {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.map-legend p {
  margin: 0;
}

.map-legend .symbol-label {
  font-weight: bold;
}

.map-legend .existing-station .symbol,
.map-legend .suggested-station .symbol {
  display: inline-block;
  flex-shrink: 0; 
  height: 2em;
  width: 3em;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: 50% 50%;
}

.map-legend .existing-station .symbol {
  height: 1em;
  background-image: url("../img/bluebikes-station-icon.2f2cf587e316.png");
}

.map-legend .suggested-station .symbol {
  background-image: url("../img/suggestions-legend-symbol.8063a69aa746.svg");
}

@media (width >= 960px) {
  a.close-btn {
    left: -3rem;
    background-color: var(--content-background-color);
  }

  #content {
    left: auto;
    top: var(--header-height);
    width: 24rem;
    box-sizing: border-box;
    box-shadow: -0.325em 0 0.325rem rgba(0,0,0,0.1);
  }

  article h1 {
    font-size: 2rem;
    padding-right: 0;
  }

  .content-visible #map-container {
    right: 24rem;
    left: 0;
    margin-left: 0;
    width: auto;
  }
}

/*= Forms */

label {
  color: var(--content-text-color);
  font-size: 1em;
  text-transform: none;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}
.checkbox-group input {
  width: 1em;
  height: auto;
  opacity: 1;
  position: relative;
  top: 0;
  margin-left: 0.5em;
  margin-right: 0.5em;
  text-align: center;
}

.checkboxgroup-field-label {
  display: block;
  padding-bottom: 0.5rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  font-size: 1rem;
}

.checkbox-label-text {
  display: block;
  flex-grow: 1;
  border-width: var(--input-border-width);
  border-radius: calc(1em + var(--input-border-width));
  border-color: var(--input-blurred-border-color);
  margin-left: calc(-2em - var(--input-border-width));
  padding-left: calc(2em + var(--input-border-width));
  background-color: var(--subtle-button-background-color);
  color: var(--subtle-button-text-color);
  line-height: 1;
  font-size: 1em;
  font-weight: bold;
  text-transform: none;
}

.checkbox-group input:focus {
  outline: none;
}

input:focus + .checkbox-label-text,
label:hover .checkbox-label-text {
  color: initial;
  border-color: var(--input-focused-border-color);
  background-color: initial;
}

input:checked + .checkbox-label-text {
  background-color: var(--button-background-color);
  color: var(--button-text-color);
}

input[type="text"] {
  border-width: 0 0 var(--input-border-width) 0;
  border-color: var(--input-blurred-border-color);
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--input-focused-border-color);
}

.place-good_location_other_reason-field,
.place-another_station_other_reason-field {
  margin-top: -1em;
}

.highlight {
  padding: 0.5em;
  border-radius: 0.5em;
  background-color: var(--highlight-background-color);
  color: var(--highlight-text-color);
}

.suggestion-disclaimer {
  font-style: italic;
}

dialog {
  padding-right: 3.5rem;
}

@media screen and (width >= 60em) {
  dialog a.close-btn {
    left: auto;
  }
}

/*= Location Summary */

.closest-station-info .station-name,
.closest-station-info .station-distance,
.nearby-suggestions-info .suggestion-count {
  font-weight: bold;
}

.suggestion-reasons-chart {
  margin-top: -1rem;
  margin-bottom: 2rem;
}

.c3 text {
  font-family: 'DM Sans', sans-serif;
}

/*= Colophon */

#powered-by a.shareabouts-logo {
  font-size: 1em;
  font-family: cursive;
}

#powered-by a.poepublic-logo .poe {
  font-weight: bold;
}

#powered-by a.poepublic-logo .public {
  font-weight: normal;
}
