* {
    box-sizing: border-box;
}

body {
    position: relative;
    width: 100%;
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    background-color: #FAFAFA;
}

main {
    flex: 1;
}

.imgTrain {
    max-width: 12.5rem !important;
}

.imgTrain img {
    width: 100% !important;
    height: auto;
}

body.dark-mode {
    background-color: rgb(63, 83, 103);
    color: #FAFAFA !important;
}

body.dark-mode h3 {
    color: rgb(255, 255, 255);
}

body.dark-mode .card-train {
    background-color: rgb(56, 66, 79);
    color: #FAFAFA;
}

body.dark-mode .alerts-box {
    background-color: rgb(56, 66, 79);
    color: #ffffff;
    border-radius: 8px;
    padding: 10px;
}

h1.center {
    text-align: center;
}

/* Navbar e offcanvas: */
nav#top-navbar {
    background-color: rgb(71, 94, 117);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 80px;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 0 2rem;
    border-bottom: 1px solid;
}

.app-title {
    display: flex;
    align-items: center;
    gap: 25%;
    max-width: 12.5rem;
    cursor: pointer;
}

.app-title img {
    width: 100%;
}

.app-title span {
    padding: 20px 0px;
    font-size: 35px;
    font-family: Roboto;
    font-weight: 600;
    letter-spacing: 5px;
    color:white
}

.sidenav {
    height: 100%;
    position: fixed;
    z-index: 1001;
    top: 0;
    left: 0;
    background-color: #778da9;
    overflow-x: hidden;
    transition: 0.3s;
    padding-top: 2rem;
}


.sidenav a {
    padding: 0.5rem 2rem;
    text-decoration: none;
    font-size: 1.25rem;
    color: #023047;
    display: block;
    transition: 0.3s;
    font-family: Roboto;
    font-weight: 500;
}

.sidenav a:hover {
    color: black;
}

.sidenav .closebtn {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
}


/**/

/* Ícones e botões: */
md-icon.black {
    color: black;
}

md-outlined-text-field#search-main {
    width: 100%;
}

md-filled-tonal-icon-button.custom-button {
    --md-sys-color-secondary-container: #778da9;
}

.custom-icon {
    color: #023047;
}

div.alert-item {
    display: flex;
    align-items: center;
}

div.alert-content {
    display: flex;
    flex-direction: column;
}

span.alert-title {
    padding-left: 10px;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    color: #FAFAFA;
}

span.alert-location {
    padding-left: 10px;
    font-size: 0.9rem;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
}

md-icon.alert-danger {
    color: #e63946;
}

md-icon.alert-warning {
    color: #ffb703;
}

md-icon#alert-badge-critical {
    background-color: #f2e9e4;
    border: 8px solid #f2e9e4;
    border-radius: 25px;
    color: black;
}

md-icon.darkmode #alert-badge-critical {
    background-color: #415a77;
    border: 8px solid #415a77;
    border-radius: 25px;
}

md-icon#alert-badge-warn {
    background-color: #f2e9e4;
    border: 8px solid #f2e9e4;
    border-radius: 25px;
    color: black;
}

md-icon.darkmode #alert-badge-warn {
    background-color: #415a77;
    border: 8px solid #415a77;
    border-radius: 25px;
    color: #FAFAFA;
}

md-icon#alert-badge-normal {
    background-color: #f2e9e4;
    border: 8px solid #f2e9e4;
    border-radius: 25px;
}

md-icon.darkmode #alert-badge-normal {
    background-color: #415a77;
    border: 8px solid #415a77;
    border-radius: 25px;
}

#dark-mode-button {
    appearance: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
}


#profile-button {
    appearance: none;
    background: none;
    border: none;
    font-size: 1.25rem;
}

/**/

.card-train {
    background-color: #778da9;
    border: 1px solid;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    gap: 15px;
    margin-top: 8px;
    margin: 5px;

}

.info {
    display: flex;
    justify-content: space-between;
}

.card-train#card-status-train {
    width: 48%;
    margin: 5px;
}

md-icon.subway-icon-color {
    color: #4F378A;
}

span#train-name {
    color: #1D1B20;
    font-family: 'Roboto';
    font-weight: 500;
    font-style: normal;
    line-height: 1.3;
}

span#train-route {
    font-style: normal;
    font-weight: 400;
    font-family: "Roboto";
}

div.train-status-box {
    border: 1px solid #CAC4D0;
    border-radius: 12px;
    width: 25vw;
    position: sticky;
    left: 100%;
}

div.centered-train-status-box {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

span#train-status {
    font-style: normal;
    font-weight: 500;
    font-family: "Roboto";
    font-size: 1.4vw;
    padding: 5px;
}

h3 {
    margin: 20px 10px;
    font-family: Roboto;
    font-weight: 500;
    color: #1D1B20;
    font-size: large;
}

div.alerts {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #778da9
}

div#alerts-box {
    background-color: #778da9;
    border: 1px solid;
    border-radius: 8px;
    margin: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

div#alerts-box.warning {
    background-color: rgba(255, 183, 3, 0.7);
}

div#alerts-box.danger {
    background-color: rgba(230, 57, 70, 0.8);
}

span#alert-text {
    font-family: Roboto;
    font-size: small;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

#body_initial {
    background-color: #0d1b2a;
}

#initial_page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.container {
    text-align: center;
    font-size: 40px;
    color: #372a28;
}

.cal-sans-regular {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-style: italic;
    ;
}

#dialog-title {
    font-size: 22px;
    font-weight: 600;
}

/*Calendário:*/
.calendar {
    width: 85%;
    margin: 0 auto;
    height: auto;
    display: flex;
    flex-direction: column;
    padding: 10px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 150px;
    
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.day {
    text-align: center;
    padding: 5px;
    color: #999FA6;
    font-weight: 500;
}

.dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.date {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    margin: auto;
    font-weight: 600;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    transition: 0.2s;
    color: black !important;
}

.date:hover {
    background: #91c9a5;
    color: #fff;
}

.date.active {
    background: #415a77;
    color: #fff;
}

.date.inactive {
    color: #d2d2d2;
}

.date.inactive:hover {
    color: #fff;
}

/**/

/* Rodapé: */
section.content {
    padding-bottom: 5rem;
}

@media screen and (max-width: 500px) {
    section.content {
        padding-top: 20%;
        padding-bottom: 20%;
    }
}

footer {
    background-color: #778da9;
    width: 100%;
    position: absolute;
    bottom: 0;
    margin-bottom: 0;
    justify-content: center;
    align-items: center;
    color: black;
    display: flex;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    border-top: 1px solid;
}

md-fab.nxt-btn {
    width: 100%; 
    padding: 0 20%;
}

div#navbar-img {
    width: 90%;
    padding-left: 45px;
}

div.top-btn-group {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

div#navbar-img-container {
    width: 110%;
}

span#login-app-title {
    text-align: center;
    color: #000000;
    padding-left: 45px;
}
/**/

/* Responsividade: */

/* Calendário*/

@media screen and (max-width: 525px) {
    .date {
        padding: 5px;
        text-align: center;
    }
}

@media screen and (max-width: 360px) {
    .calendar {
        padding: 15px;
    }

    .calendar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .header {
        flex-direction: row;
    }

    #monthYear {
        text-align: center;
        font-size: 1rem;
        margin: 0 10px;
    }

    .days {
        /* Oculta os outros dias */
        display: none !important;
    }

    .dates {
        /* Centraliza o dia que aparece */
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .date {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        font-weight: bold;
    }
}

/**/

@media screen and (max-width: 500px) {
    nav#top-navbar {
        height: 80px;
        padding: 0 1rem;
        position: fixed;
        margin-bottom: 10px;
    
    }

    footer {
        position: fixed;
    }

    .app-title {
        padding-left: 20px;
        
    }

    span#login-app-title {
        font-size: 20px;
        letter-spacing: 1px;
        text-align: center;
        margin-top: 20px;
        font-family: "Roboto";
        
        
    }

    .card-train {
        margin-bottom: 10px;
    }

    #dark-mode-button {
        font-size: 1.25rem;
    }


    #profile-button {
        font-size: 1.25rem;
    }

    div.top-btn-group {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        gap: 10px !important;
    }

    div#navbar-img {
        width: 70%;
    }
}