:root {
    --bgcolor: rgb(255, 255, 255);
    --primary: rgb(30, 82, 139);
    --bordercolor_old: rgb(186, 214, 241);
    --bordercolor: #D0D0D0;
    --radius: 10px;
}

@font-face {
    font-family: "MuseoSlab500Regular";
    src: url(../Museo_Slab_500-webfont.eot);
    src: url("../Museo_Slab_500-webfont.eot?#iefix") format("embedded-opentype"), url(../Museo_Slab_500-webfont.woff) format("woff"), url(../Museo_Slab_500-webfont.ttf) format("truetype"),
        url("../Museo_Slab_500-webfont.svg#MuseoSlab500Regular") format("svg");
    font-weight: 400;
    font-style: normal;
}

html {
    height: 100vh;
}

body {
    font-family: Heebo, sans-serif;
}


.navbar {
    padding: 0;
    background-color: var(--bgcolor);
    font-family: Nunito, sans-serif;
}

.navbar-toggler {
    display: none;
}

#desktop-menu .nav-item {
    padding-top: 8px;
    padding-bottom: 5px;
    padding-left: 15px;
    padding-right: 15px;
    transition: .5s;
}

#desktop-menu .nav-item:hover {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

#desktop-menu .nav-item:hover .nav-link {
    color: var(--primary);
}

#desktop-menu .nav-item .nav-link {
    transition: .5s;
}

.navbar-brand {
    color: var(--primary);
    font-weight: bold;
    margin-right: 0;
}

#desktop-menu li {
    border-bottom: 3px solid var(--bgcolor);
}

#desktop-menu li.active {
    border-bottom: 3px solid var(--primary);
    font-weight: bold;
}

#desktop-menu .nav-item.active .nav-link {
    color: var(--primary);
}


.navbar .container-fluid {
    padding-left: 20px;
    padding-right: 20px;
}

.navbar-toggler-icon {
    color: var(--primary);
}

nav .btn-outline-secondary {
    border-color: var(--bordercolor);
}

.navbarFillerLeft {
    flex-grow: 4;
}

.nav-tabs {
    border: none;
}

.nav-tabs .nav-link {
    border: none;
    color: rgb(33, 37, 41);
    cursor: pointer;
}

.nav-tabs .nav-link.active {
    border-bottom: 3px solid var(--primary);
    font-weight: bold;
}

#desktop-menu {
    margin-right: 30px;
    margin-left: 30px;
    flex-direction: row;    
}

#loginBtn, #logoutBtn, #registerLink {
    margin-right: 20px;
}

#phone-menu {
    display: none;
    overflow-y: scroll;
}

.old-version-desktop {
    float: right;
    white-space: nowrap;
    padding-right: 50px;
    text-decoration: none;
    color: inherit;
}

.btn-primary, .btn-primary:active, .btn-primary:visited, .btn-primary:focus {
    background-color: var(--primary);    
}

.language {
    width: auto;
}

.old-version-mobile {
    display: none;
}

#bottom-menu {
    display: none;
}

#left {
    background-color: var(--bgcolor);
    position: fixed;
    top: 56px;
    bottom: 0;
    width: 350px;
    overflow-y: auto;
    overflow-x: hidden;     
    border-top: 1px solid var(--bordercolor);
}

#left form {
    margin: 10px;
}

#left > h3, #left h4, .lineHeader {
    display: block;
    padding: 10px;
    padding-left: 20px;
    width: 100%;
    margin-bottom: 0;
    line-height: 21px;
    border-bottom: 1px solid var(--bordercolor);
}

.lineHeader {
    display: grid; 
    grid-template-columns: auto 1fr auto;
    row-gap: 5px;
}

.lineHeader h3 {
    margin-bottom: 0;
    grid-row: 1;
    grid-column: 1;
}

.lineHeader .comments 
{
    font-weight: normal;
    font-size: 14px;
    cursor: pointer;
    grid-row: 1;
    grid-column: 3;
    justify-self: end;
    align-self: center;
    padding-right: 10px;
}

.lineHeader .lineicon {
    grid-row: 1;
    grid-column: 1;
    align-self: center;
    padding-right: 10px;
    padding-bottom: 3px;
}

.lineHeader .linename {
    grid-row: 1;
    grid-column: 2;
    justify-self: start;
    align-self: center;
    padding-bottom: 0;
    font-weight: normal;
    font-size: 16px;
    cursor: pointer;
    font-family: Nunito, sans-serif;
}

.lineHeader .operator {
    grid-row: 2; 
    grid-column: 2;
}

.lineHeader .operatingHours {
    grid-row: 2;
    grid-column: 3;
    font-size: 14px;
    justify-self: end;
    padding-right: 10px;
    cursor: pointer;
}

#left h4 {
    font-size: 16px;
    font-weight: normal;
}

#left ul {
    margin-bottom: 0;
}

#findBtn, #findBtn2 {
    background-color: var(--primary);
    color: white;
}


#swipebar {
    display: none;
}

#map {
    border-top: 1px solid var(--bordercolor);
    border-left: 1px solid var(--bordercolor);
    position: fixed;
    top: 56px;
    left: 350px;
    right: 0px;
    bottom: 0px;
}

#mainWrapper {
    height: 100%; 
    width: 100%;
    overflow-y: auto;
    _padding-bottom: 50px;
}

#map::before {
    content: "";
    position: absolute;
    top: 0px;
    right: 0px;
    bottom: 0px;
    left: 0px;
    z-index: -100;
    background: url(../images/bangkokbg.webp); 
    background-size: cover;
    opacity: 0.3;
}

#lazyButtonsWrapper {
    flex-direction: column;
    align-items: center;
    margin-top: 100px;
    display: none;
    justify-content: space-around;
    margin-left: 40px;
    margin-right: 40px;
    gap: 40px;
}

#lazyButtonsWrapper.showbuttons {
    display: flex;
}

#mapButton, #nearbyButton {
    padding: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    text-align: center;
    position: relative;
}

#mapButton::before, #nearbyButton::before {
    content: "";
    border-radius: 20px;
    background-color: black;
    opacity: 0.6;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: -100;
}

#lazyButtonsWrapper #mapButton #shorttext {
    display: none;
    z-index: 2000;
}

#lazyButtonsWrapper #mapButton #longtext {
    display: inline;
    z-index: 2000;
}

#lazyButtonsWrapper.shownearby #mapButton #shorttext {
    display: inline;
}

#lazyButtonsWrapper.shownearby #mapButton #longtext {
    display: none;
}

#nearbyButton {
    display: none;
    align-content: center;
    flex-direction: column;
}

#lazyButtonsWrapper.shownearby #nearbyButton {
    display: flex;
}

#left h3 {
    padding-top: 10px;
    font-size: 16px;
}

#left ul {
    list-style-type: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    white-space: nowrap;
    padding: 0;
}

#left ul li {
    border-bottom: 1px solid var(--bordercolor);
    padding-top: 10px;
    padding-bottom: 10px;
    padding-right: 20px;
    padding-left: 20px;
    cursor: pointer;
}

#left a {
    text-decoration: none;
    color: inherit;
}

#left li.active {
    border-left: 5px solid var(--primary);   
    font-weight: bold; 
}

#left a.details {
    display: none;
    font-weight: normal;
    font-style: italic;
}

#left li.active a.details {
    display: inline;
}

.info {
    display: flex;
    flex-direction: row;
    font-size: 18px;
    line-height: 30px;    
    border-color: var(--bordercolor); 
    border-style: solid;
    border-radius: var(--radius);
    border-width: 1px;
    background-color: var(--bgcolor);
    text-align: center;
    margin: 30px;
}

.info img {
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
    height: 400px;
}

.info h1, .info h2 {
    font-family: Nunito, sans-serif;
    font-weight: bold;
    animation: fadeInDown; 
    animation-duration: 1s;
}

h3 {
    font-family: Nunito, sans-serif;
}

.info .text-wrapper {
    padding: 20px;
}

#expandLink {
    display: none;
}

.subboxrow {
    margin-top: 30px;
    padding-left: 30px;
    padding-right: 30px;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.subboxrow div {
    width: 33%;
    text-align: center;
}

.subboxrow div, .searchbox {
    background-color: var(--bgcolor);
    border: 1px solid var(--bordercolor);
    border-radius: var(--radius);
    padding: 20px;
}

.subboxrow div p, .subboxrow div ul {
    text-align: left;
}

.firstrow > div > i, .firstrow > div > img {
    animation: fadeInUp; 
    animation-duration: 3s;        
}

.searchbox h3 {
    text-align: center;
}

.subboxrow h3 {
    font-size: 20px;
}

.subboxrow h3 a {
    text-decoration: none;
}

.subboxrow i {
    font-size: 50px;
    margin: 10px;
}

.subboxrow img {
    margin: 10px;
}

.subboxrow p {
    margin-bottom: 0;
    line-height: 30px;
}

.fullinfo {
    margin-top: 30px;
    margin-left: 30px;
    margin-right: 30px;
    background-color: var(--bgcolor);
    border: 1px solid var(--bordercolor);
    border-radius: var(--radius);
    padding: 20px;
}

.fullinfo h4 {
    text-align: center;
}

a.nolink {
    text-decoration: inherit;
    color: inherit;
}

.route {
    display: flex; 
    flex-direction: column; 
    gap: 5px;
}

.route input {
    width: 100%;
}

footer {
    margin-top: 30px;
    text-align: center;
    margin-bottom: 10px;
}

footer .fa-facebook {
    font-size: 30px;
    margin-top: 10px;
}

footer a {
    text-decoration: none;
}

.searchbox {
    display: none;
}

.visible-phone {
    display: none !important;
}

.phone-image {
    display: none !important;
}

.brand-small {
    display: none !important;
}

.modal {
    z-index: 1000;
}

.modal-body {
    overflow-y: scroll;
    max-height: 80vh;
}

.comment {
    padding-top: 10px;
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
}

.stationInbound, .stationOutbound {
    background-color: white;
    padding: 5px;
    border-radius: 50%;
}

.stationInbound {
    background-color: darkblue;
}

.stationOutbound {
    background-color: darkred;
}

.onOffIcon {
    float: right;
}

.line .onOffIcon {
    color: #888;
}

.line:hover {
    border-left: 5px solid var(--primary);
}

.line .operator {
    font-size: 13px;
    color: #888;
    float: right;
}

.line i.fa-star, .line i.fa-question {
    color: #888;
}

.loginform {
    margin: 30px; 
    margin-top: 50px;
    padding: 30px; 
    max-width: 600px; 
    background-color: var(--bgcolor); 
    border-width: 1px;
    border-style: solid;
    border-color: var(--bordercolor); 
    border-radius: 10px;  
    margin-left: auto;
    margin-right: auto;
}

.loginform h1 {
    text-align: center;
    font-family: Nunito, sans-serif;
    font-weight: bold;
}

.registrationFormWrapper {
    width: 100%; 
    padding: 30px;    
}

#locationIcon {
    font-size: 24px;
}

#showMapBtn {
    animation: heartBeat;
    animation-duration: 2s;
}

.stationicons {
    float: right;
}

.stationicons i {
    cursor: pointer;
}

#photoDiv {
    z-index: 2000; 
    margin-left: auto; 
    margin-right: auto;
    margin-top: 30px;
    position: relative;
}

#photoDiv img {
    height: 80vh;
    max-width: 100vw;
}

#photoDiv .fa-circle-chevron-left {
    left: 10px;
}

#photoDiv .fa-circle-chevron-right {
    right: 10px;
}

#photoDiv .fa-circle-chevron-left, .fa-circle-chevron-right {
    position: absolute;
    top: 50%;    
    border-radius: 50%;
    z-index: 2500;
    font-size: 48px;
    color: black;
    padding: 10px;
    width: 60px;
    text-align: center;
    opacity: 0.7;
    cursor: pointer;
}

#photoDiv .fa-square-xmark {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2500;
    font-size: 48px;
    color: black;
    opacity: 0.7;
    cursor: pointer;
    z-index: 2500;
}

#backdrop, .modal::before {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: black;
    opacity: 0.5;
    width: 100vw;
    height: 100vh;
    z-index: 1900;
}

.modal-dialog {
    z-index: 2000;
}

.autocomplete {
    /*the container must be positioned relative:*/
    position: relative;
    display: inline-block;
  }
  .autocomplete-items {
    position: absolute;
    border: 1px solid var(--bordercolor);
    border-bottom: none;
    border-top: none;
    z-index: 99;
    /*position the autocomplete items to be the same width as the container:*/
    top: 100%;
    left: 0;
    right: 0;
  }
  .autocomplete-items div {
    padding: 10px;
    cursor: pointer;
    background-color: white;
    border-bottom: 1px solid var(--bordercolor);
  }
  .autocomplete-items div:hover {
    /*when hovering an item:*/
    background-color: #e9e9e9;
  }
  .autocomplete-active {
    /*when navigating through the items using the arrow keys:*/
    background-color: var(--primary) !important;
    color: #ffffff;
  }


@media (max-width: 1600px) {
    .info {
        flex-direction: column;
        border-bottom-left-radius: none;
        border-top-right-radius: var(--radius);
        margin: 30px;
    }

    .info img {
        width: 100%;
        height: auto;
        border-top-right-radius: var(--radius);
        border-bottom-left-radius: 0;
    }

    .desktop-image {
        display: none !important;
    }

    .phone-image {
        display: block !important;
        position: relative;
    }

    .dontuse .info .phone-image h1 {
        color: white; 
        position: absolute; 
        bottom: 0; 
        left: 0; 
        right: 0;
        margin-bottom: 4px; 
        height: 50px; 
        z-index: 1000;
    }

    .dontuse .info .phone-image .overlay-background {
        position: absolute; 
        bottom: 0; 
        left: 0; 
        right: 0; 
        height: 60px; 
        background-color: black; 
        opacity: 0.6;
    }

    .dontuse .info .text-wrapper h1 {
        display: none;
    }

}

@media (max-width: 1200px) {
    #loginBtn, #logoutBtn, #registerLink {
        margin-right: 10px;
    }

    #desktop-menu .nav-item {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 1100px) {

    .hidden-phone, .desktop-image {
        display: none !important;
    }

    .visible-phone, .phone-image {
        display: block !important;
    }

    .navbar .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }    

    .navbar-toggler {
        display: block;
        margin-top: 8px;
        margin-bottom: 8px;
        border-color: var(--bordercolor);
        color: var(--primary);
    }

    .transit-space {
        display: none;
    }

    .container-fluid {
        justify-content: space-between;
    }

    .navbarFillerLeft {
        flex-grow: 0;
    }
    

    #desktop-menu {
        display: none;
    }

    #phone-menu {
        z-index: 100;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        background-color: var(--bgcolor);
        border-top: 1px solid var(--bordercolor);
    }

    #phone-menu .nav-link i {
        display: inline;
    }

    #phone-menu .nav-item {
        margin-left: 0;
        padding-left: 25px;
        padding-top: 5px;
        padding-bottom: 5px;
        border-bottom: 1px solid var(--bordercolor);
    }

    #phone-menu .nav-item.active {
        border-left: 5px solid var(--primary);
        font-weight: bold;
    }

    .old-version-desktop {
        display: none;
    }

    .old-version-mobile {
        display: inline;
        text-decoration: none;
        color: inherit;
    }

    .searchbox {
        display: block;
        margin: 15px;
    }

    #lazyButtonsWrapper {
        flex-direction: row;
        align-items: stretch;
        margin-top: 30px;
        margin-left: 20px;
        margin-right: 20px;
        gap: 20px;    
    }
    #mapButton, #nearbyButton {
        padding: 15px;
        font-size: 16px;
    }

    #mapButton br {
        display: block;
    }
    
    #bottom-menu {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 70px;
        border-top: 1px solid #E0E0E0;
        background-color: var(--bgcolor);
    }
    
    #bottom-menu ul {
        display: flex;
        flex-direction: row;
        list-style: none;
        align-items: center;
        margin-bottom: 0;
        padding-left: 0;
    }    

    #bottom-menu ul li {
        padding: 10px;
        width: 25%;
        text-align: center;
        font-size: 16px;
    }

    #bottom-menu ul li i {
        font-size: 24px;
    }

    #bottom-menu ul li.active {
        border-top: 3px solid var(--primary);
    }

    #bottom-menu ul li a {
        display: flex;
        flex-direction: column;
        text-decoration: none;
        color: inherit;
    }

    #swipebar {
        display: block;
        height: 30px;
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: center;
    }

    #swipebar > div {
        background-color: lightgrey;
        height: 10px;
        width: 100px;
        margin-top: 10px;
        border-radius: 5px;
    }

    #left {
        width: 100%;
        top: auto; 
        bottom: 70px;
        z-index: 20;
        height: 70px;
        border-top-left-radius: 30px;
        border-top-right-radius: 30px;
        overflow: hidden;
        box-sizing: border-box;
        background: none;
    }

    #left::before {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: -100;
        background-color: var(--bgcolor);
        content: "";
    }

    #left.halfsize::before, #left.thirdsize::before, #left.twothirdsize::before {
        opacity: 0.9;
    }

    #swipebar, #left h3 {
        _background-color: var(--bgcolor);
    }

    #left.halfsize {
        top: calc(50%);
        height: auto;
    }

    #left.thirdsize {
        top: calc(65%);
        height: auto;
    }

    #left.twothirdsize {
        top: calc(30%);
        height: auto;
    }

    .scrollList {
        overflow-y: scroll;
        overflow-x: hidden;
        position: relative;
        height: calc(100% - 70px);
        background-color: var(--bgcolor);
    }

    .subheader {
        background-color: var(--bgcolor);
    }

    #left ul {
        padding-bottom: 70px;
    }

    #left h3 {
        padding-top: 5px;
        padding-bottom: 10px;
        text-align: center;
    }

    #left h4 {
        padding-left: 20px;
    }

    #map {
        left: 0;
        top: 56px;
        bottom: 70px;
    }

    #mainWrapper {
        padding-bottom: 70px;
    }

    .info {
        margin: 15px;
    }

    .dontuse .info .phone-image h1 {
        margin-bottom: 0;
    }

    .subboxrow {
        flex-direction: column;
        padding: 15px;
        margin-top: 0;
        padding-top: 0;
    }

    .subboxrow div {
        width: 100%;
    }

    .fullinfo {
        margin-top: 0;
        margin-left: 15px;
        margin-right: 15px;
    }

    #extraInfo {
        display: none;
    }

    #expandLink {
        display: inline;
        text-decoration: none;
        cursor: pointer;
    }

    #left form.route {
        display: none;
    }

    .loginform {
        margin-top: 20px;
        margin-left: 15px;
        margin-right: 15px;          
    }

    .registrationFormWrapper {
        padding: 0;
    }

    #photoDiv {
        margin-top: auto;
        margin-bottom: auto;
    }

    #photoDiv img {
        max-height: 100vh;
        width: 100vw;
        height: inherit;
    } 
    
    #photoDiv .fa-square-xmark {
        top: 10px;
        right: 10px;
    }

    #messageModal .modal-dialog {
        margin-top: 150px;
    }
}

@media (max-width: 350px) {
    .brand-small {
        display: block !important;
    }

    .brand-normal {
        display: none !important;
    }

    #lazyButtonsWrapper {
        margin-top: 20px;
    }

    #mapButton, #nearbyButton {
        font-size: 14px;
    }

}
