body {
    margin: 0;
    min-height: 100vh;
}

/* Make titles BLACK for tfc_web, not mdl white-on-white */
.mdl-layout-title {
    color: #000;
}

/* Disable ugly boxes around images in IE10 */
a img{
    border: 0px;
}

a {
    color: #1cb2b5;
}

title {
    display: inline-block;
    text-transform: uppercase;
    background-color: transparent !important;
    color: #757575;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0;
    opacity: .87;
    text-decoration: none;
    margin: 0 0 0 10px;
}

ul.errorlist {
    color: darkred;
}

::-moz-selection {
    background-color: #1cb2b5;
    color: #fff;
}

::selection {
    background-color: #1cb2b5;
    color: #fff;
}

.search-box .mdl-textfield__input {
    color: rgba(0, 0, 0, 0.87);
}

.header .mdl-menu__container {
    z-index: 50;
    margin: 0 !important;
}


.mdl-textfield--expandable {
    width: auto;
}


.mobile-title {
    display: none !important;
}


.logo-image {
    height: 50px;
}


.header {
    overflow: visible;
    background-color: white;
}

.header .material-icons {
    color: #767777 !important;
}

.header .mdl-layout__drawer-button {
    background: transparent;
    color: #767777;
}

.header .mdl-navigation__link {
    color: #757575;
    font-weight: 700;
    font-size: 14px;
}

.navigation-container {
    /* Simple hack to make the overflow happen to the left instead... */
    direction: rtl;
    -webkit-order: 1;
    -ms-flex-order: 1;
    order: 1;
    width: 500px;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.navigation {
    /* ... and now make sure the content is actually LTR */
    direction: ltr;
    -webkit-justify-content: flex-end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    width: 800px;
}

.search-box.is-focused + .navigation-container {
    opacity: 0;
    width: 100px;
}


.navigation .mdl-navigation__link {
    display: inline-block;
    height: 60px;
    line-height: 68px;
    background-color: transparent !important;
    border-bottom: 4px solid transparent;
}

.navigation .mdl-navigation__link:hover {
    border-bottom: 4px solid #1cb2b5;
}

.search-box {
    -webkit-order: 2;
    -ms-flex-order: 2;
    order: 2;
    margin-left: 16px;
    margin-right: 16px;
}

.more-button {
    -webkit-order: 3;
    -ms-flex-order: 3;
    order: 3;
}


.drawer {
    border-right: none;
}

.drawer-separator {
    height: 1px;
    background-color: #dcdcdc;
    margin: 8px 0;
}

.drawer .mdl-navigation__link.mdl-navigation__link {
    font-size: 14px;
    color: #757575;
}

.drawer span.mdl-navigation__link.mdl-navigation__link {
    color: #1cb2b5;
}

.drawer .mdl-layout-title {
    position: relative;
    background: white;
    height: 100px;
}

.drawer .logo-image {
    position: absolute;
    bottom: 16px;
}

.logo-font {
    font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
    line-height: 1;
    color: #767777;
    font-weight: 500;
}

.aqua-link {
    text-decoration: none;
    color: #1cb2b5 !important;
}

.aqua-link:hover {
    color: #1cb2b5 !important;
}

.aqua-link .material-icons {
    position: relative;
    top: -1px;
    vertical-align: middle;
}

.cards-section {
    padding: 80px 0;
    max-width: 1044px;
    margin-left: auto;
    margin-right: auto;
}

.cards-section .cards-section-title {
    margin-left: 12px;
    padding-bottom: 24px;
}

.card-container {
}

.card-container .mdl-card__media {
    overflow: hidden;
    background: transparent;
}

.card-container .mdl-card__media img {
    width: 100%;
}

.card-container .mdl-card__title {
    background: transparent;
    height: auto;
}

.card-container .mdl-card__title-text {
    color: black;
    height: auto;
}

.card-container .mdl-card__supporting-text {
    height: auto;
    color: black;
    padding-bottom: 56px;
}

.card-container .mdl-card__actions {
    position: absolute;
    bottom: 0;
}

.card-container .mdl-card__actions a {
    border-top: none;
    font-size: 16px;
}

.list-card-square.mdl-card:hover {
    box-shadow: 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12), 0 5px 5px -3px rgba(0, 0, 0, .2);
}

.list-card-square > .mdl-card__title {
    background: #005851;
}

.list-card-square > .mdl-card__title > div.pie {
    width: 50%;
    float: right;
}

.list-card-square > .mdl-card__title > div.pie > svg.pie {
    float: right;
}

.list-card-square > .mdl-card__title > .mdl-card__title-text {
    color: #fff;
}

.sensor-button {
    background-color: #01b2b6 !important;
    padding: 3px;
    min-width: 10px;
    line-height: 20px;
    height: 20px;
    margin: 2px;
}

.mdl-card__title-text-half {
    width: 50%;
    float: right;
}

.shared-block-inline {
    display: inline-block;
    vertical-align: middle;
    text-align:center;
    margin: 0 0 0 10px;
}

footer {
    background-color: #fafafa !important;
}

footer a:hover {
    color: #1cb2b5;
}

footer .mdl-mega-footer--top-section::after {
    border-bottom: none;
}

footer .mdl-mega-footer--middle-section::after {
    border-bottom: none;
}

footer .mdl-mega-footer--bottom-section {
    position: relative;
}

footer .mdl-mega-footer--bottom-section a {
    margin-right: 2em;
}

footer .mdl-mega-footer--right-section a .material-icons {
    top: 6px;
}

.footer-logo {
    height: 50px;
    margin-right: 10px;
    margin-bottom: 10px;
}

.aqua-link-menu:hover {
    cursor: pointer;
}

.presentation-band {
    width: 100%;
    text-align: center;
    background-color: #37474f;
}

.presentation-band-text {
    max-width: 800px;
    margin-left: 25%;
    padding: 24px;
    text-align: left;
    color: white;
}

.aqua-alt-link {
    text-decoration: none;
    color: #1cb2b5 !important;
    font-size: 16px;
}

.aqua-alt-link:hover {
    color: #1cb2b5 !important;
}

.aqua-alt-link .material-icons {
    position: relative;
    top: 6px;
}

.mdl-layout__tab-bar-button {
    background: white;
}

.mdl-layout__tab-bar {
    background: white;
}

.mdl-layout__tab-bar .mdl-layout__tab {
    color: black;
}

.mdl-layout.is-upgraded .mdl-layout__tab.is-active {
    color: #005851;
}

.mdl-layout.is-upgraded .mdl-layout__tab.is-active::after {
    background-color: #1cb2b5;
}

.mdl-button--fab.mdl-button--colored {
    background-color: #1cb2b5;
}

.mdl-button--fab.mdl-button--colored:hover {
    background-color: #005851;
}

.bus-stop-column {
    position: absolute;
    left: 0;
    width: 5em;
}

.drawer-header {
    box-sizing: border-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-justify-content: flex-end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    padding: 16px;
    height: 100px;
    background-color: #37474f;
    color: white;
}


/**** Mobile layout ****/
@media (max-width: 900px) {
    .navigation-container {
        display: none;
    }

    .title {
        display: none !important;
    }

    .logo-image {
        height: 35px;
    }

    .mobile-title {
        display: block !important;
        position: absolute;
        left: calc(50% - 70px);
        top: 12px;
        transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* WebViews in iOS 9 break the "~" operator, and WebViews in OS X 10.10 break
       consecutive "+" operators in some cases. Therefore, we need to use both
       here to cover all the bases. */
    .search-box.is-focused ~ .mobile-title,
    .search-box.is-focused + .navigation-container + .mobile-title {
        opacity: 0;
    }

    .more-button {
        display: none;
    }

    .search-box.is-focused {
        width: calc(100% - 48px);
    }

    .search-box .mdl-textfield__expandable-holder {
        width: 100%;
    }

    footer .mdl-mega-footer--bottom-section {
        display: none;
    }
}

/**** CSN ****/

#otaa_fields, #abp_fields {
    background: #fafafa;
    padding: 20px;
    /*display: none;*/
}

#otaa_fields .header, #abp_fields .header {
    margin-bottom: 20px;
}

/***** TIMETABLE *****/
main.bus-timetable {
    margin: 0 auto;
    padding: 0 1em;
    display: block;
}

main.bus-timetable h1 {
    font-size: 2em;
}

main.bus-timetable h2 {
    font-size: 1.25em;
    margin-top: 1em;
}

main.bus-timetable h1, main.bus-timetable h2 {
    font-weight: 600;
    line-height: 1.2em;
    margin: .5em 0;
}

.timetable-wrapper-wrapper {
    font-size: .875em;
    margin: 1em 0;
}

.timetable-wrapper-wrapper input {
    vertical-align: top;
}

.timetable-wrapper {
    margin-right: -1.1em;
    margin-top: 1em;
    overflow: auto;
    /* offset to the right so we can 'fix' the left-most stop name column */
    margin-left: 250px;
}

.bus-timetable {
    border-collapse: separate;
    border-spacing: 0;
    padding-right: 1.1em;
    table-layout: fixed;
}

.bus-timetable td {
    border-left: 0;
    border-top: 1px solid #1cb2b5;
}

.bus-timetable td, .bus-timetable th {
    height: 1.5em;
    padding: .25em .5em;
    text-align: left;
}

.bus-timetable tbody tr:first-child td, .bus-timetable tbody tr:first-child th {
    border-top: 0;
}

.bus-timetable .referrer td, .bus-timetable .referrer th {
    background: #1cb2b5;
}

.bus-timetable .referrer td[colspan] {
    background: none;
}

.bus-timetable .referrer a {
    color: #000;
}

.bus-timetable th { /* th in the timetable is the Stop Name */
    /* Fix the 'stop name' column when we x-scroll */
    position: absolute;
    left: 0;
    margin-left: 30px;
    width: 270px;
    /* general style for stop name */
    border-top: 1px solid #1cb2b5;
    font-weight: normal;
    white-space: nowrap;
}

.bus-timetable th a {
    display: block;
    margin: -.25em -.5em;
    margin-left: 0;
    max-width: 40vw;
    overflow: hidden;
    padding: .25em .5em;
    padding-left: 0;
    text-overflow: ellipsis;
}

.bus-timetable tfoot td {
        border-left: 1px solid #1cb2b5;
        border-top: 1px solid #1cb2b5;
        vertical-align: top;
    }

.bus-timetable tfoot td:first-child {
    border: 0;
}

.bus-timetable .OTH th a {
    padding-left: 1em;
}

.fancy th {
    padding-right: 0;
    position: absolute;
}

.fancy th a {
    margin-right: 0;
    max-width: inherit;
}

.fancy tfoot td:first-child {
    position: absolute;
}

input:not(:checked) + label + .timetable-wrapper .OTH, input:not(:checked) + label + .route .OTH {
    display: none;
}

input:not(:checked) + label + .timetable-wrapper .referrer, input:not(:checked) + label + .route .referrer {
    display: table-row;
}

#dialog-import {
    width: 80%;
    height: calc(100% - 100px);
    min-height: 300px;
}

#dialog-import .mdl-dialog__content {
    height: calc(100% - 100px);
}

#dialog-import .mdl-dialog__content form {
    height: 100%;
}

.mdl-button--file input {
    cursor: pointer;
    height: 100%;
    right: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 300px;
    z-index: 4;
}

.mdl-textfield--file .mdl-button--file {
    right: 0;
    bottom: 0;
    position: relative;
    color: black;
}

/* Class to override .mdl-data-table setting 'white-space: nowrap' */
.wrapping-table {
    white-space: normal;
}
