/* General settings, variables, menubars and smaller side options reside in this file */ 
  
@viewport{
  zoom: 1.0;
  width: extend-to-zoom;
}

/* CSS 3 variables, substitute on a modern browser to try different color schemes */
:root {

  /* App surfaces */
  /* frame: html/browser frame background */
  /* page: main content/container and faq background */
  /* panel: notices, trip diagram, content panels */
  /* primary: menu, departure rows, trip diagram line, map popups, trip map stops */
  /* secondary: headers, buttons, active items, feed/search rows */

  --surface-frame: #56616B;
  --surface-page: #EEF2F5;
  --surface-panel: #FFFFFF;
  --surface-primary: #0B3A5B;
  --surface-secondary: #1D6F86;
  /* --surface-secondary: #2B6F73; */

  /* Text and accents */
  /* on-light: normal text on page and panel surfaces */
  /* on-dark: text on primary and secondary dark surfaces */
  /* highlight: stars, matches, highlighted markers */
  /* soft: reserved soft accent from the previous cyan-white text color */
  
  --text-on-light: #24313A;
  --text-on-dark: #FFFFFF;
  --accent-highlight: #F2C94C;
  --accent-soft: #E6F7FA;

  /* Trip status markers */
  --trip-current-stop: #35D04F;
  --trip-destination-stop: #D93D3D;
  --trip-skipped-stop: #F2A541;

  /* Trip diagram vehicle colors */
  --trip-vehicle-background: var(--surface-primary);
  --trip-vehicle-border: var(--accent-soft);
  --trip-vehicle-halo: var(--surface-panel);

  /* Departure status text */
  --departure-canceled: #FF7A7A;
  --departure-skipped: var(--trip-skipped-stop);
  --departure-added: #7DDC75;
  --departure-unmatched: #D8C86A;

  /* Standardized border radius */
  --borderradius: 3px;  
}

* { box-sizing: border-box; }

html {
  font-family: Helvetica;
  font-size: 5vmin; 
  height: 100%;
  background-color: var(--surface-frame);
}

body {
  margin: 0px;
  padding: 0px;
  border: 0px none;
  height: 100%;
}

a {
  color: var(--surface-primary);
  text-decoration: none;
}

input[type=search] {
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
}

/* CSS display settings */
.none { display: none; }
.block { display: block; }
.flex {
  display: flex;
}
.flexcenter {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* CSS visibility settings */
.visible { visibility: visible; } 
.hidden { visibility: hidden; }

.showingStopInfo { display: none; }
.showingTripInfo { display: none; }
.selected { opacity: 0.7; }
.small { font-size: 80%; }

.button {
  position: relative;
  margin: 1em auto;
  width: 90%;
  max-width: 35em;
  border: 0.2em outset;
  border-radius: 3px;
  border-radius: var(--borderradius);
  border-color: transparent;
  padding: 0.1em 0;
  text-align: center;
  background-color: var(--surface-secondary);
  color: var(--text-on-dark);
}

/* For a div to process a click it must either have a clickable or button class */
.clickable {
  position: relative;
}

/* Arrows used to open and close divs, e.g. FAQs */
.arrow {
  position: absolute;
  width: 0;
  height: 0;
  top: 12px;
  left: 0px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 15px solid var(--surface-primary);
  transition: 0.4s ease-out;
}
.active .arrow {
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 15px solid var(--surface-primary);
}

/* Used to show a loader when waiting */
.loader {
  display: none;
  position: absolute;
  right: -5px;
  top: 50%;
  margin-top: -9px;
  height: 18px;
  width: 18px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-primary);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-highlight) 45%, transparent);
  animation: loaderPulse 1.1s ease-out infinite;
}
.loader::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--accent-highlight);
}
.mapStopDetail > .loader {
  right: 0px;
  top: 65%;
  margin-right: -5px;
}
  @keyframes loaderPulse {
    0% {
      transform: scale(0.85);
      box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-highlight) 45%, transparent);
    }
    70% {
      transform: scale(1);
      box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent-highlight) 0%, transparent);
    }
    100% {
      transform: scale(0.85);
      box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-highlight) 0%, transparent);
    }
  }

/* Used for a customised pop up confirm box */
.modal, .gotit {
  position: absolute;
  z-index: 2;
  padding-top: 20vh; 
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.5);
}
  .modalInner, .gotitInner {
    color: var(--text-on-light);
    background-color: var(--surface-panel);
    margin: auto;
    padding: 0.5em;
    border: 0.2em solid var(--surface-primary);
    border-radius: 3px;
    border-radius: var(--borderradius);
    width: 50em;
    max-width: 90%;
    text-align: center;
  }
    #modalContent, #gotitContent {
      margin-bottom: 1em;
      text-align: left;
    }
    #modalYes, #modalNo, #gotitYes {
      margin: 0em 1em;
      padding: 0.2em 1em;
      background-color: var(--surface-secondary);
      color: var(--text-on-dark);
      border: 0.2em outset;
      border-radius: 3px;
      border-radius: var(--borderradius);
      border-color: transparent;
    }

#container {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: var(--surface-page);
  color: var(--text-on-light);
  display: flex; 
  flex-direction: column;
}

#menu {
  flex: 0 1 7vh;
  align-items: stretch;
  justify-content: space-between;
  background-color: var(--surface-primary);
  color: var(--text-on-dark);
}
#menu.showingSearchInfo { display: none; }
#menu_faq { cursor: help; }
 
  #menuLabel {
    display: none;
    font-size: 100%;
    font-weight: normal;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    align-items: center;
    background-color: var(--surface-secondary);
    color: var(--text-on-dark);
  }
  #menuLabel.activeItem { 
    display: flex;
  }
  .menuItem {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    display: flex;
    align-items: center;
    transition: 1s;
  }
  .menuItem.activeItem { 
    background-color: var(--surface-secondary);
    color: var(--text-on-dark);
  }

/* CSS for the 3 line expandable menu functionality */
#menu_menu {
  flex: 0 0 50px;
  padding-left: 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
  .bar1, .bar2, .bar3 {
    width: 20px;
    height: 3px;
    background-color: var(--text-on-dark);
    margin: 2px 0;
    border-radius: 1px;
  }
  .crossmark {
    font-weight: bold;
    font-size: 24px;
  }

#sidemenu {
  z-index: 1;
  height: 93vh;
  max-width: 25em;
  position: absolute;
  top: 7vh;
  left: 0;
  font-weight: bold;
  font-size:80%;
  color: var(--text-on-light);
  background-color: var(--surface-panel);
  overflow-x: hidden;
  transition: width 0.5s ease-out;
  display: flex; 
  flex-direction: column;
}
  .sidemenuInactive {
    width: 0;
    border-right: none;
  }
  .sidemenuActive {
    width: 75%;
    border-right: 1px solid var(--surface-frame);
  }
  #sidemenuContent {
    flex: 0 1 auto;
  }
    .sidemenuItem {
      padding: 1em 0.5em;
      border-bottom: 1px solid var(--surface-page);
      white-space: nowrap;
      transition: 0.5s;
    }
    .sidemenuItem:hover { 
      background-color: var(--surface-page);
    }
    .sidemenuItem.activeItem { 
      background-color: var(--surface-page);
      color: var(--surface-secondary);
    }
    #application {
      padding: 1em 0.5em 0.5em 0.5em;
    }
    #settings {
      padding: 1em 0.5em 0.5em 0.5em;
    }
      .nopage {
        padding: 0.5em 0.5em 0.5em 2.5em;
        white-space: nowrap;
        font-size: 90%;
        font-weight: normal;
        transition: opacity 1s;
      }
      .toggleSetting {
        padding-right: 3.5em;
        margin-bottom: 0.5em;
      }
        .toggleSwitch {
          display: block;
          position: absolute;
          right: 0.8em;
          top: 50%;
          margin-top: -0.6em;
          width: 2.2em;
          min-width: 2.2em;
          height: 1.2em;
          border-radius: 1em;
          background-color: var(--surface-page);
          border: 1px solid var(--surface-frame);
          transition: 0.2s;
        }
        .toggleSwitch::after {
          content: "";
          position: absolute;
          top: 0.15em;
          left: 0.15em;
          width: 0.8em;
          height: 0.8em;
          border-radius: 50%;
          background-color: var(--surface-panel);
          box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
          transition: 0.2s;
        }
        .toggleSwitch.on {
          background-color: var(--surface-secondary);
          border-color: var(--surface-secondary);
        }
        .toggleSwitch.on::after {
          left: 1.15em;
        }
  #sidemenuSpace {
    flex: 1 0 16vh;
    display: flex; 
    flex-direction: column;
  }
    #filler {
      flex: 1 0 1vh;
    }
    #logo {
      flex: 0 1 16vh;
      background-color: var(--surface-secondary);
      text-align: center;
    }
      #logoImage {
        width: 8vh;
        height: 8vh;
        margin-top: 4vh;
      }
  
main {
  width: 100%;
  height: 100%;
}

#content {
  width: 100%;
  height: 100%;
  flex: 1 1 50vh;
  overflow-y: auto;
  display: flex; 
  flex-direction: column;
  transition: opacity 0.5s ease-out;
}

/* Appears at the top of the content area and is used for various messages */
#message {
  visibility: hidden;
  flex: 0 0 auto;
  font-size: 0.8em;
  text-align: left;
  width: 100%;
  margin: 0.5em auto 0.5em auto;
  padding: 0 0.3em 0.2em 0.3em;
}
#message.error { color: var(--text-on-light); font-weight:bold; visibility: visible; }
#message.searchProgress { color: var(--surface-primary); visibility: visible; }

/* Holds the search and mystops functionality */     
#nextVehicles {
  height: 100%;
  flex-direction: row; 
  justify-content: center;
}

.box {
  text-align: left;
  padding: 0.5em 0.2em;
  background-color: var(--surface-panel);
  border-style: groove;
  border-width: 0.2em;
  border-radius: 3px;
  border-radius: var(--borderradius);
  margin: 1em 0.5em 2em 0.5em;
}

.boxtitle {
  font-weight: bold;
  text-align:left;
  margin: 0px 0px 10px 0px;
}

.fblogo {
  width: 24px;
  height: 24px;
  margin: 5px;
}
  
#about {
  font-size: 90%; 
}

#privacy {
  padding: 0.5em;
  text-align: left;
  background-color: var(--surface-panel);
  border-style: groove;
  border-width: 0.2em;
  border-radius: 3px;
  border-radius: var(--borderradius);
  margin: 0.5em;
} 

