html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  font-family: 'Merriweather Sans', sans-serif;
  background-color: #000;
}

h4.map-label {
  padding: 5px 8px;
  font-size: 10px;
}

.list-wrap {
  padding: 4px 0.5rem;
}

.grid-container {
  display: grid;
  grid-template-columns: 41.64vw 41.64vw 16.72vw;
  grid-gap: 0px;
  z-index: 40;  
}

#map1 {
  grid-column-start: 1;
  grid-column-end: 2;
  grid-row-start:2;
  grid-row-end:3;
  min-height: 41.66vh; max-height: 41.66vh;
  min-width:  41.64vw; max-width:  41.64vw; 
}
#vessdata {
  background-color: black;
  grid-column-start: 2;
  grid-column-end: 3;
  grid-row-start:2;
  grid-row-end:3;
  min-height: 41.66vh; max-height: 41.66vh;
  min-width:  41.64vw; max-width:  41.64vw;
  text-align: center;
}

#vessevnt {
  background-color: black;
  grid-column-start: 1;
  grid-column-end: 2;
  grid-row-start:3;
  grid-row-end:4;
  min-height: 41.66vh; max-height: 41.66vh;
  min-width:  41.64vw; max-width:  41.64vw;
  text-align: center;
}

/* Waypoint & Webcam section */

#waypoint {
  background-color: black;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: bottom;
  grid-column-start: 2;
  grid-column-end: 3;
  grid-row-start:3;
  grid-row-end:4;
  min-height: 41.66vh; max-height: 41.66vh;
  min-width:  41.64vw; max-width:  41.64vw;
  text-align: center;
  position: relative;
  z-index: 40;
  overflow: hidden;
}

#waypoint-label {
  position: relative;
  z-index: 100;
}

h2#quad3-label {
  position: relative;
  z-index: 100;
}
#waypoint-inner h3 {
  font-size: 0.6rem;
}

video#video_html5_api {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  object-fit: cover; 
  z-index: 50; 
  transform: scale(1);
}

video#video_html5_api.full {
  position: fixed;
}

video#video_html5_api.passing {
  transform: scale(3.5);
  top: 10vh;
  left: -220px;
  transition: all 1 ease-in-out;
  

}

video#video_html5_api.smz {
  transform: scale(2);
  left: 0px;
  top: 10vh;
  overflow: hidden;
  transition: transform 2s ease-in-out;  

}

video#video_html5_api.smz.left {
  left: 21vw;
  transition: left 3s ease-in-out;
}
video#video_html5_api.smz.center {
  left: 0px;
  transition: left 3s  ease-in-out;
}
video#video_html5_api.smz.right {
  left: -21vw;
  transition: left 3s ease-in-out;   
}

#waypoint-label.full, #waypoint-label.passing {
  visibility: hidden;
}

#overlay.full, #overlay.passing  {
  visibility: hidden;
}

#logo-img.full {
  visibility:hidden;
}

#newstext.full {
  visibility:hidden;
}

#quad3-label.full, #quad3-label.active, #quad3-label.passing {
  visibility:hidden;
}


/* Occasional Label for vessels in camerea range */
div#overlay2 {
  visibility: hidden;
  position: absolute;
  bottom: 10vh;
  right: 36.2vw;
  text-align: center;
  width: 21vw;
  margin: 2px 6px;
  background-color: rgba(81, 186, 190, 0.5);
  border-radius: 8px;
  z-index: 100;
}

div#overlay2.active {
  visibility: visible;
}

div#overlay2.full.active {
  position: absolute;
  left: 10.5vw;
  transition: cubic-bezier(0.075, 0.82, 0.165, 1)
}



 div#overlay2 ul li {
  list-style: none;
  transform: translateX(-18px);
  color:rgba(255, 255, 0, 0.694);
  font-size: 2rem;
 }




#vesslist {
  background-color: black;
  grid-column-start: 3;
  grid-column-end:   4;
  grid-row-start:    2;
  grid-row-end:      4;
  min-height: 83.33vh; max-height: 86.33vh;
  min-width:  16.72vw; max-width:  16.72vw;
  text-align: center;
}

#titlebar {
  background-color: black;
  grid-column-start: 1;
  grid-column-end: 4;
  grid-row-start: 1;
  grid-row-end: 2;
  min-height: 8.33vh; max-height: 8.33vh;
  min-width:  100vw; max-width:  100vw;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  
}

#newsbar {
  background-color: black;
  grid-column-start: 1;
  grid-column-end: 4;
  grid-row-start:4;
  grid-row-end:5;
  text-align: center;
  min-height: 8.33vh; max-height: 8.33vh;
  min-width:  100vw; max-width:  100vw;
}

#newsbar.passing {
  z-index: 100;
}

/* Label that's outside the Flow  */
h2#overlay {
  position: absolute;
  top: 8.33vh;
  text-align: center;
  width: 41.02vw;
  min-width: 41.02vw; max-width: 41.02;
  margin: 2px 6px;
  
}




/* Titlebar logo  */
#logo-img {   
  position: relative;
  z-index: 95;
  width: 10.31vw;
  height: 8.75vh; 
}

h1 {
  font-size: 3rem;
  font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  color: white;
  border-radius: 8px;
  transform: translateY(-35px);
}

.logo h1 {     
  font-size: 1.98rem;
  color: #000;
  padding: 5px;
 
  transform: translateY(-20px);
  background-color: rgba(255, 255, 255, 0.801);
  font-family: 'Merriweather Sans', sans-serif;
  text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.50);
  z-index: 100;
}

.logo h1 span.river {
  color: blue;
  -webkit-background-clip: text;  
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 5px;
}



/* Secondary Titles */
h2 {
  /* background-color: silver; */
  position: relative;
  border-radius: 8px;
  margin: 2px 4px;
  font-family: 'Merriweather Sans', sans-serif;
  color: black;
  text-shadow: 2px 2px 2px rgba(134, 132, 132, 0.5);
  z-index: 100;   
  background: #000; /* Safari 4-5, Chrome 1-9 */ 
  background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#555), to(silver)); /* Safari 5.1, Chrome 10+ */ 
  background: -webkit-linear-gradient(top, #555, silver); /* Firefox 3.6+ */ 
  background: -moz-linear-gradient(top, #555, silver); /* IE 10 */ 
  background: -ms-linear-gradient(top, #555, silver); /* Opera 11.10+ */ 
  background: -o-linear-gradient(top, #555, silver); 
  
}


/* Text in newsbar */
#newstext {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 17pt;
  color: white;
  transform: translateY(-18px);
}




/* Vessel List styling */
img.dir-img {
  margin-left: auto;
  margin-right: auto;
  height: 3.47vh;
  filter: drop-shadow(2px 2px 4px #4444dd);
}
.listMode ul {
  padding: 0px 5px;
  max-width: 30rem;
  max-height: 79.9vh;
  overflow: hidden;
}
.listMode ul li {
  margin: 0px;
  padding: 0px;
}


.list-wrap  {
  background-color: #2c3e50;
  opacity: 1;
  border-radius: 8px 8px 0px 0px;
  display: flex;
  font-size: 20pt;
  flex-direction: row;
  justify-content: left;
  align-items: center;
  /* padding: 10px 0.5rem; MEDIA OVERRIDE */
  
}
.listMode h5 {
  font-size: 1rem;
  border-radius: 0px 0px 8px 8px;
  color: rgba(255, 255, 255, 0.829);
  padding: .3rem;
  margin-top: 0px;
  background: rgb(168, 179, 14);
  text-align: center;
  text-shadow: 1px 1px #000;
}
h4.map-label {
  display: inline;
  background: aquamarine;
  color: black;
  padding: 5px 8px; /* MEDIA OVER RIDE */
  border-radius: 60%;
  font-size: 1.4vh; /* MEDIA OVER RIDE*/
  border: 2px solid black;  
}

h4.map-label.type-watched {
  background: rgba(255, 255, 0, 0.82);
}
.listMode .list-wrap h4.map-label {
  margin: 1vh;
}
.list-wrap .tile-title {
  font-size: 1.2rem;
  color: white;
  margin: auto;
  margin-bottom: 2px;
  margin-left:auto;
  margin-right: auto;
}

.list-wrap div.dir-container {
  position: relative;
  text-align: center;
}

.list-wrap span.speed {
  color: white;
  font-size: small;
  display: inline-block; 
  position: absolute; 
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
}

/* Data frame styling*/
div.grid2-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  padding: 1.5vh;  
}
#data-table {
  grid-column-start: 1;
  grid-column-end: 2;
  grid-row-start:1;
  grid-row-end:3;
  width: 26vw;  height: auto;
}
#img-frame {
  grid-column-start: 2;
  grid-column-end: 3;
  grid-row-start:1;
  grid-row-end:  2;
  background-color: black;
  width: 10vw;  height: 10vw;
}
div#img-frame img {
  max-width: 10vw; overflow: hidden;
}


#map2 {
  visibility: hidden;
}

#map2.active {
  visibility: visible;
  grid-column-start: 2;
  grid-column-end: 3;
  grid-row-start:2;
  grid-row-end:3;
  width: 10vw;  height: 15vh;
}




#map3 {
  visibility: hidden;
}

#map3.active {
  visibility: visible;
  position: relative;
  background-color: black;
  grid-column-start: 1;
  grid-column-end: 2;
  grid-row-start:3;
  grid-row-end:4;
  min-height: 41.66vh; max-height: 41.66vh;
  min-width:  41.64vw; max-width:  41.64vw;
  text-align: center;
  transform: translateY(-27vh);
  z-index: 50;
}

#map3.active.passing {
  margin-top: 15vh;
  margin-left: 4vw;
  min-height: 17vh;
  min-width: 13vw;
}

#map3.full {
  visibility: hidden;
}

ul#all-vessels {  
  list-style-type: none;
  bottom: 0px;
  padding: 1px;
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.4);
}
#selected-vessel > li {
  text-align: left;
  margin: 5px 5%;
  
}
.th {
  font-size: 1rem;
  color:rgb(255, 165, 56);
}
.td {
  color: white;
  font-size: 1rem;
  float: right;
  overflow-wrap: break-word;
}
.td.dir {
  text-transform: capitalize;
}


/* Popup Menu Stylings */
.popup .content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-150%) scale(0);
    width: 350px;
    height: 430px;
    z-index: 200;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    background: #dfdfdf;
   
 }
 
 #cb1 {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 30px;
    height: 30px;
    color: white;
    font-size: 30px;
    border-radius: 50%;
    padding: 2px 5px 7px 5px;
    background: #237be6;
    cursor: pointer; 
  
  }
 
 .popup.sawmill .content {
  transition: all 300ms ease-in-out;
  transform: translate(-50%,-50%) scale(1);
 }



 #popup1 h1 {
  text-align: center;
  font-size: 32px;
  font-weight: 600;
  padding-top: 20px;
  padding-bottom: 10px;
  color: rgb(91, 91, 92);
 }

 .input-field .validate {
  padding: 20px;
  font-size: 16px;
  border-radius: 5px;
  border: none;
  margin-bottom: 15px;
  color: #000000;
  background: #ffffff;
  border: 2px solid rgb(214, 214, 214);
  width: 270px;
  outline: none;
  }
  
  .first-button {
  color: rgb(3, 48, 146);
  font-size: 25px;
  font-weight: 500;
  padding: 15px 50px;
  border-radius: 5px;
  border: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #dadadb;
  cursor: pointer; 
  transition: box-shadow .35s ease !important;
  outline: none;
  }
  
  .first-button:active {  
  background-color: rgb(2, 42, 112);
  color: #fff;
  border: none;
  }
  
  .second-button {
  color: white;
  font-size: 18px;
  font-weight: 500;
  margin-top: 20px;
  padding: 15px 40px;
  border-radius: 5px;
  border: none;
  background: #05438f;
  cursor: pointer; 
  transition: box-shadow .35s ease !important;
  outline: none;
  }
  
  .second-button:active{
    background: linear-gradient(145deg,#222222, #292929);   
    border: none;
    outline: none;
  }
  
  #popup1 p {
    color: #141414;
    padding: 20px;
  }

/* Events Section */
.grid3-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 1vw;
  padding: 0px;  
}
#event-passenger {
  grid-column-start: 1;
  grid-column-end: 2;
  width: 20vw;  height: 20vh;
}
#event-other {
  grid-column-start: 2;
  grid-column-end: 3;
  width: 20vw;  height: 20vh;
}

li.card, div.card {
  list-style: none;
  color: black;
  /* font-family: 'Fira Sans'; */
  font-family: 'Merriweather Sans', sans-serif;
  text-align: left;
  background-color: aquamarine;
  padding-top: 0px;
  margin-top: .7vh;
  width: 19.77vw;
  height: auto;
  margin: .6vh 0px;
  border: 0.2vw solid red;   
}

li.card.isNew {
  background-color: aquamarine;
  animation-name: colorfade;
  animation-duration: 120s;
}

@keyframes colorfade {
  0%   { background-color: aquamarine; }
  1%   { background-color: salmon;     }
  100% { background-color: aquamarine; }
}

li.card h4, div.card h4 {
  color: blue;
  font-size: 0.9rem;
  line-height: 0.5rem;
  padding: 0px 0px 0px 5px;
  margin-bottom: 1vh;
  margin-top: 1vh;
}
li.card h4 time, div.card h4 time {
  color: black;
  padding-left: 25px;
}
li.card p, div.card p {
  color: black;
  font-family: Arial;
  font-size: 0.6rem;
  margin-top: 0px;
  margin-bottom: .7vh;
  padding: 0px 0px 0px 2px;
}
#passenger-ul {
  margin-top: 1vh;
  padding-left: 10px;
  z-index: 100;
}
#other-ul {
  margin-top: 1vh;
  padding-left: 0px;
}


#passenger-ul.tracker {
  visibility: hidden;
}

#overlay3.lower {
  position: absolute;
  bottom: 10vh;
  margin-top: 30vh;
  margin-left: 2vh;
  z-index: 200;
}


#overlay3.lower div {
  z-index:200;
}

#overlay3.full {
  visibility: hidden;
}

#other-ul.tracker {
  visibility: hidden;
}

/* Waypoint section styling */
#waypoint-inner {
  display:none;
  background-color: rgba(81, 186, 190, 0.897);
  position: absolute;  
  width: 40%;
  padding: 3px;
  border: black solid 2px;
  bottom: 25px;
  right: 25px;
  margin: auto auto;
  text-align: left;
 
}



em {
  color: rgb(255, 165, 56);
  font-style: normal;
}



/* Bump up certain font sizes UHD */
@media (min-width: 2200px) {
  li.card h4 {
    font-size: 1.9rem;
  }
  li.card > p  {
    font-size: 1.4rem;
  }
  .th {
    font-size: 1.7rem;
    
  }
  .td {
    font-size: 1.7rem;
  }
  .listMode h5 {
    font-size: 1.7rem;
  }
  .list-wrap .tile-title {
    font-size: 2.2rem;
  }
  h2 {
    font-size: 2rem;
  }
  h1 {
    font-size: 6rem;
  }
  .logo h1 {
    font-size: 5rem;
  }
  #newstext {
    font-size: 3rem;
  }
  #waypoint-inner h3 {
    font-size: 1.6rem;
  }
}




@media all and (orientation: portrait) {
    /* Targets phone screen. Grid is 2-cols wide by 5-rows high */
    h2#overlay {
        top: 4.16vh;
        left: 3vw;
    }
    #logo-img {
        width: 13vw;
        height: 2.75vh;
    }

    div#overlay2 {
        bottom: 50vh;
        right: 75vw;
    }

    .grid-container {
        grid-template-columns: 50vw 50vw;
        grid-template-rows: 5rem 20vh 26vh 44vh 5rem;
    }
    
    #titlebar {
        /* Top of screen */
        grid-column-start: 1;
        grid-column-end: 3;
        grid-row-start: 1;
        grid-row-end: 2;
        min-height: 10vh;
    }

    #map1 {
        /* Top left below titlebar */
        grid-column-start: 1;
        grid-column-end: 2;
        grid-row-start: 2;
        grid-row-end: 3;
        min-height: 26.66vh;
        max-width: 50vw;
    }
    #vessdata {
        /* Top right below titlebar */       
        grid-column-start: 2;
        grid-column-end: 3;
        grid-row-start: 2;
        grid-row-end: 3;
        min-height: 26.66vh;
        max-width: 50vw;
    }

    /* #vessdata sub-container */
    div.grid2-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 1.5vh;
        padding-top: 0;  
    }
    #data-table {
        grid-column-start: 1;
        grid-column-end: 3;
        grid-row-start:1;
        grid-row-end:2;
        width: auto;  height: auto;
    }
    #img-frame {
        grid-column-start: 1;
        grid-column-end: 2;
        grid-row-start:2;
        grid-row-end:  3;
        background-color: black;
        width: 100%;  height: auto;
    }
    div#img-frame img {
        max-width: 10vw; overflow: hidden;
    }
    div#map2.active {
        visibility: visible;
        grid-column-start: 2;
        grid-column-end: 3;
        grid-row-start:2;
        grid-row-end:3;
        width: 10vw;  height: 10vh;
      }

    #waypoint {
        /* Full width below #vessdata & #map1 */
        grid-column-start: 1;
        grid-column-end: 3;
        grid-row-start: 3;
        grid-row-end: 4;
        min-height: 26.67vh;
        max-width: 100vw;
    }

    #map3.active {
        visibility: visible;
        min-width:  50vw; max-width:  50vw;
        text-align: center;
        transform: translateY(-45vh);
        z-index: 50;
    }


    #vesslist {
        /* Left below #waypoint */
        grid-column-start: 1;
        grid-column-end: 2;
        grid-row-start: 4;
        grid-row-end: 5;
        min-height: 26.66vh;
        max-height: 44vh;
        max-width: 50vw;
        overflow-x: hidden;
        overflow-y: auto;
    }

    img.dir-img {
        height: 2vh;
    }

    .list-wrap {
        max-height: 3rem;
    }


    #vessevnt {
        /* Right below #waypoint */
        grid-column-start: 2;
        grid-column-end: 3;
        grid-row-start: 4;
        grid-row-end: 5;
        min-height: 26.66vh;
        max-height: 44vh;
        max-width: 50vw;
    }

    /* Vessel Events Sub-Grid. 1-col, 2-rows */
    div.grid3-container {
        display: grid;
        grid-template-rows: 1fr 1fr;
        grid-gap: .5rem;
        padding: 0px;  
    }
    #event-passenger {
        grid-column-start: 1;
        grid-column-end: 3;
        grid-row-start: 1;
        grid-row-end: 2;
        width: 100%;  height: 22vh;
        overflow-y: hidden;
    }

    #event-other {
        grid-column-start: 1;
        grid-column-end: 3;
        grid-row-start: 2;
        grid-row-end: 3;
        width: 100%;  height: 22vh;
        overflow-y: hidden;
    }

    #passenger-ul  {
        width: auto;
    }
    #other-ul {
        width: auto;
        padding-left: 1rem;
    }

    li.card {
        width: 90%;
        padding-left: 1rem;
    }

    #newsbar {
        /* Bottom full width */
        padding-top: 3;
        grid-column-start: 1;
        grid-column-end: 3;
        grid-row-start: 5;
        grid-row-end: 6;
        max-height: 5rem;
        max-width: 100vw;
        z-index: 100;
    }
}
  