:root {
    --yellow: rgb(255, 200, 0);
    --blue: rgb(96, 114, 170);
    --green: rgb(230, 245, 227);
    --red: rgb(254, 47, 47);
    --grey: rgba(0, 0, 0, 0.05);
    --light-weight: 100;
    --normal-weight: 400;
    --bold-weight: 600;
    --transition: all 0.2s ease;
    --scale: scale(1.05);
}

* {
    text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    text-decoration: none;
    list-style: none;
    box-sizing: border-box;

    color: black;
    font-size: 12px;
    font-weight: var(--normal-weight);
    font-family: "Avenir Next", sans-serif;
    -webkit-tap-highlight-color: transparent;
}

.bold-font {
    font-weight: var(--bold-weight);
}

.light-font {
    font-weight: var(--light-weight);
}

.liquid {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0px 0px 6px var(--grey);
    backdrop-filter: blur(3px);
}

a {
    cursor: pointer;
}

h1,
h2 {
    display: inline;
    font-size: 3.2em;
}

h2 {
    font-weight: var(--light-weight);
    padding: 0 4px;
}

svg:not(.icon-back):not(.icon-fav) {
    stroke-width: 1;
}

body {
    margin: 0;
    background: linear-gradient(to bottom, rgb(228, 234, 255) 100px, rgb(244, 244, 244) 300px), rgb(228, 234, 255);
    background-repeat: no-repeat;
    min-height: 100vh;
}

/* ------------------------------
Main content
------------------------------ */

header {
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: 4400px;
    height: 380px;
    padding: 60px 100px 0;
}

main {
    padding: 0 100px 160px;
    margin-top: -18px;
}

.content {
    max-width: 840px;
    margin: 0 auto;
    display: flex;
}

header .content {
    flex-direction: row;
    gap: 26px;
    align-items: center;
}

main .content {
    flex-direction: column;
    gap: 32px;
}

.back-button {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    text-align: center;
    transition: var(--transition);
}

.back-button:hover,
.line-big:hover,
.line-link:hover {
    transform: var(--scale);
}

a:has(.back-button) {
    height: fit-content;
}

.icon-back {
    height: 42px;
}

.single {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.double {
    display: flex;
    flex-direction: row;
    gap: 32px
}

.wrapper {
    border-radius: 26px;
    display: flex;
    flex-direction: column;
    padding: 4px 26px;
}

.wrapper#courses {
    padding: 4px 26px 4px 0;
}

.carousel {
    display: flex;
    flex-direction: row;
    padding: 12px 14px;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.carousel::-webkit-scrollbar {
    display: none;
}

/* ------------------------------
Filter button
------------------------------ */

.filter {
    border-radius: 999px;
    padding: 2px;
    display: flex;
    gap: 6px;
    width: fit-content;
    align-items: center;
}

.filter-button,
.title-button {
    font-weight: var(--light-weight);
    border-radius: 999px;
    padding: 12px 18px;
    transition: background 0.2s ease;
}

.title-button {
    padding: 12px 22px;
    font-weight: var(--normal-weight);
}

.filter-button:not(.active) {
    cursor: pointer;
}

.filter-button:not(.active):hover {
    background: rgba(0, 0, 0, 0.02);
}

.filter-button.active {
    background: rgba(0, 0, 0, 0.03);
    font-weight: var(--normal-weight);
}

.icon-filter {
    width: 14px;
    height: 14px;
    margin: 0 6px 0 18px;
    flex-shrink: 0;
}

/* ------------------------------
Big line boxes
------------------------------ */

.line-big {
    width: 66px;
    height: 66px;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, rgb(246, 246, 246), rgb(228, 228, 228));
    flex-shrink: 0;
    gap: 2px;
    transition: var(--transition);
}

.fav-button {
    width: fit-content;
}

.line-name {
    font-size: 1.4rem;
    text-align: right;
}

/*
.line-big.day.filled {
    background: linear-gradient(to bottom, rgb(255, 253, 239), rgb(250, 244, 193));
}

.line-big.night.filled {
    background: linear-gradient(to bottom, rgb(244, 246, 254), rgb(230, 236, 255));
}
*/

.day .icon-fav {
    stroke: var(--yellow);
}

.day.filled .icon-fav {
    fill: var(--yellow);
}

.night .icon-fav {
    stroke: var(--blue);
}

.night.filled .icon-fav {
    fill: var(--blue);
}

.icon-fav {
    vertical-align: top;
    width: 20px;
    height: 20px;
}

.filled .icon-fav:hover {
    fill: none;
}

.day:not(.filled) .icon-fav:hover {
    fill: var(--yellow);
}

.night:not(.filled) .icon-fav:hover {
    fill: var(--blue);
}

/* ------------------------------
Lists
------------------------------ */

.list-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 12px 0px;
}

.list-item a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: var(--transition);
}

.list-group,
.list-group+.list-item,
.list-item+.list-item {
    border-top: 1px solid var(--grey);
}

.list-main {
    width: -webkit-fill-available;
}

.list-main.vehicle {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.list-group {
    padding-left: 15px;
}

.hidden {
    display: none;
}

.list-item.list-item:has(.active)+.list-group {
    display: block;
}

.expand-icon {
    transform: rotate(-90deg);
    transition: var(--transition);
}

.list-item:has(.active) .expand-icon {
    transform: rotate(0);
}

.list-main:hover {
    margin-left: 5px;
}

.list-title {
    font-size: 1.1em;
}

.parameters {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

.type {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 2px 10px;
    gap: 4px;
    background: var(--grey);
    border-radius: 999px;
}

.type.green {
    background: var(--green);
}

.icon-type {
    width: 14px;
    height: 14px;
}

/* ------------------------------
Courses style
------------------------------ */

#courses .list-item {
    gap: 20px;
    height: 66px
}

.vehicle-link,
.line-link,
.time-live {
    flex-shrink: 0;
}

a.vehicle-link {
    display: block;
    width: 290px;
    overflow: hidden;
}

a.vehicle-link img {
    height: 50px;
    float: right;
    transition: var(--transition);
}

a.vehicle-link:hover img {
    margin-right: 5px;
}

.line-link {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    text-align: center;
    justify-content: center;
    background: linear-gradient(to bottom, rgb(246, 246, 246), rgb(228, 228, 228));
}

.time-live,
.line-link {
    font-size: 1.2rem;
}

.time-live.red {
    color: var(--red);
}

.time-live.inactive {
    font-weight: var(--normal-weight);
}

.time-live.blink {
    animation: blink 1s linear 3;
}

@keyframes blink {
    30% {
        opacity: inherit;
    }

    40% {
        opacity: 0;
    }

    80% {
        opacity: 0;
    }

    90% {
        opacity: inherit;
    }
}

/* ------------------------------
Mobile style
------------------------------ */

@media only screen and (max-width: 800px) {
    header {
        background-size: 3360px;
        height: 280px;
        padding: 40px 26px 0;
    }

    header .content {
        gap: 18px;
    }

    main {
        padding: 0 26px 160px;
    }

    h1,
    h2 {
        font-size: 2.8rem;
    }

    .double {
        flex-direction: column;
    }

    .wrapper#courses {
        padding: 4px 16px 4px 0;
    }

    .list-main:hover {
        margin-left: 0;
    }

    a.vehicle-link {
        width: 72px;
    }

    #courses .list-item {
        gap: 16px;
    }
}