:root{
    --card-bg: white;
    --bg:  #2b3f58;
    --primary-light: #6b9ad3;
    --primary-dark: #0e223b;

    --text: #1f1d32;
    --text-light: #e7ebf1;
    --text-middle: #c0c3c6;
    --text-secondary: #808a96;
}
body{
    margin:0;
    font-family: Arial, Roboto;
    color: var(--text);
}
#container{
    display: grid;
    position: absolute;
    min-width: calc(100% - 2em);
    min-height: calc(100% - 2em);
    gap: 1em;
    padding: 1em;
    justify-items: stretch;
    justify-content: center;
    background-image: url(bg.jpg);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}
.block{
    display: flex;
    flex-direction: column;
    gap: 1em;;
}
.block .cardFlow{
    display: flex;
    flex-direction: column;
    gap: 0em;
    overflow: hidden;
    transition: all 2s ease;
    background-color: white;
    border-radius: 1em;
    position: relative;
}
.cardFlow + .expand{
    width: 100%;
    text-align: center;
    color: var(--text-light);
    cursor: pointer;
    margin-top: -2.5em;
    margin-bottom: .2em;
    z-index: 2;
}
.card:has(.chips){
    overflow: hidden;
}
.chips + .expand{
    height: 100%;
    width: 1em;
    text-align: center;
    color: var(--text-light);
    cursor: pointer;
    z-index: 2;
    position: absolute;
    right: 0; top: 0;
    display: flex;
    align-items: center;
}
.cardFlow + .expand:after{
    content: "see more";
}
.cardFlow.expanded + .expand:after{
    content: "see less";
}

.chips + .expand:after{
    content: "+";
}
.chips.expanded + .expand{
    display: none;
}

.block .cardFlow:not(.expanded){
    max-height: 20em;
}
.block .cardFlow.expanded{
    max-height: default;
}
.block .title{
    font-weight: bold;
    text-align: center;
    margin-top: .4em;
    margin-bottom: .1em;
    color: var(--text-light);
}
.card{
    position: relative;
    border-radius: 1em;
    background-color: var(--card-bg);
    box-shadow: 0px 0px 20px -3px #0000001a;
    padding: .5em;
    max-width: 720px;
    z-index: 2;

    a{
        text-decoration: none;
        color: inherit !important;
    }
}
.card.paralel{
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 1em;
    background-color: transparent;
    padding: 0;
    width: calc(100% + 1em);
    justify-content: space-around;
}

.card.stats{
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 1em;
    justify-content: space-around;
    text-align: center;
    background: none;
    padding: 0;
    max-width: 100%;

    .stat{
        border-radius: 1em;
        background-color: var(--card-bg);
        box-shadow: 0px 0px 20px -3px #0000001a;
        padding: .5em;

        :not(.label){
            font-size: 1.6em;
        }
    }

    .stat.big{
        display: flex; /* Enable flexbox */
        justify-content: center; /* Center horizontally */
        align-items: center;
        grid-row:1 / span 2;
        flex-wrap: wrap;
        align-content: center;
        font-size: 1.6em;
        
        .label{
            width: 100%;
            font-size: 0.66em;
        }
    }

    .data{
        font-size: 1.8em;
        font-weight: 700;
        text-shadow: 1px;
        position: relative;
        height: 3em;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .label{
        /*height: 3em;*/
    }

    .blue, .green, .red{
        display: inline-block;
        margin: 0 .1em;
    }
}
.green{
    color: #1fa550;
}
.stat .blue:before{
    content: '/';
    font-size: .8em;
    vertical-align: middle;
}
.blue{
    color: #295dc6;
}
.red{
    color: #ba2121;
}
.stat .red:before{
    content: '-';
    font-size: .5em;
    vertical-align: middle;
}

.card.flight.tall{
    grid-template-columns: 7em 1fr;
    grid-template-rows: 1.5em 3.3em;
}
.card.flight:hover{
    background-color: #0001;
}
.card.flight{
    padding: .24em .12em;
    box-shadow: none;
    display: grid;
    grid-template-columns: 7em 1fr;
    grid-template-rows: 1.5em 2em;
    gap: .16em;
    grid-template-areas:'airl route'
                        'airl label';
                    
    align-content: center;
    justify-items: left;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--text-secondary);
    background: transparent;
    border-radius: 0;

    .labels{
        grid-area: label;
        display: flex;
        flex-direction: column;
        align-items: left;
        gap: 0em;
        color: var(--text-secondary);
        width: 100%;
        text-align: left;
        min-height: 1em;
        font-size: 0.9em;
    }

    .route{
        grid-area: route;
        font-weight: 700;
        font-size: 1.1em;
        display: flex;
        gap: .2em;
        align-items: center;
        justify-self: left;
        align-self: center;

        .airport{
            width: 2.4em;
            overflow: hidden;
            text-align: center;
        }

        .flag{
            width: 1em;
        }
    }

    .route .material-symbols-outlined{
        font-size: 1em;
    }

    .airline{
        justify-self: center;
        grid-area: airl;
        img{
            height: 1.28em;
        }    
    }
}

#past, #upcoming{
    width: 20em;
    justify-self: center;
}

.block .cardFlow:not(.expanded,.hidden)::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 2em;
    background: linear-gradient(to bottom, #1f1d3200 0%, #1f1d3244 30%, #1f1d32ee 100%);
}

.card .chips:not(.expanded,.hidden)::after {
    content: '';
    position: absolute;
    right: 0;
    top:0;
    width: 3em;
    height: 100%;
    background: linear-gradient(to right, #1f1d3200 0%, #1f1d3244 30%, #1f1d32ee 100%);
    border-radius: 0em 1em 1em 0 ;
}

.card.flight1{
    display: grid;
    position: relative; 
    grid-template-columns: 1fr 2fr 1fr 1fr 1fr;
    grid-template-rows: 1.5em 2em 2.5em;
    gap: .2em;
    grid-template-areas:'date   date .   bg  bg'
                        '.     label .   bg  bg'
                        'from  label to  bg  bg'
                        '.     airl  .   bg  bg';
    align-content: center;
    justify-items: center;
    align-items: center;

    .bg{
        grid-area: bg;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        width: 100%;
        height: 100%;
        filter: brightness(.8);
        z-index: 0;
        border-radius: inherit;
        padding: 0 .4em .4em 0;
        transform: translate(.2em, .2em);
    }

    .date{
        grid-area: date;
        justify-self: left;
        z-index: 1;
        font-weight: 400;
        font-size: 1em;
    }

    .registration{
        grid-area: reg;
        text-align: right;
        color: var(--text-secondary);
        justify-self: right;
        z-index: 1;
    }

    .labels{
        grid-area: label;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0em;
        color: var(--text-secondary);
        width: 100%;
        text-align: center;
        min-height: 1em;
        z-index: 1;
    }

    .labels:after{
        content: '';
        width: 100%;
        height: .15em;
        border-radius: .3em;
        background: var(--text);
        margin-top: 1em;
        z-index: 1;
    }

    .from{
        grid-area: from;
    }
    .to{
        grid-area: to;
    }
    .from, .to{
        font-weight: 700;
        font-size: 1.4em;
        z-index: 1;
    }

    .airline{
        z-index: 1;
        grid-area: airl;
        color: var(--text-secondary);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.15em;

        img{
            height: 1.5em;
        }    
    }
}
.card .data.multi{
    div{
        animation: fade 12s ease infinite;
        position: absolute;
        opacity: 0;
    }
    div:nth-child(1){
        animation-delay: 0s;
    }
    div:nth-child(2){
        animation-delay: 4s;
    }
    div:nth-child(3){
        animation-delay: 8s;
    }
}

@keyframes fade {
    0% {
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    30% {
        opacity: 1;
    }
    40% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

.chips{
    display: flex;
    flex-wrap: 2;
    gap: .6em;
    max-width: 720px;
    font-size: 1em;
    overflow: hidden;

    .chip{
        display: flex;
        flex-wrap: nowrap;
        gap: .4em;
        padding: .4em .8em .4em .8em;
        border: 1px solid var(--text);
        border-radius: .3em;
        align-items: center;

        .airport{
            text-wrap: nowrap;
        }

        .country img{
            height: 1em;
        }
    }

    .chip:hover{
        background-color: #0001;
    }

}
.chips.expanded{
    flex-wrap: wrap;
}
.chips::-webkit-scrollbar {
    display: none;
}

#chartdiv-map {
    width: 100%;
    /*height: 200px;*/
}
#chartdiv-map > div{
    border-radius: 1em;
}

.hidden{
    display: none !important;
}

.stacked-chart{
    display: flex;
    flex-direction: row;
    text-align: center;
    border-radius: 1em;
    overflow: hidden;
    position: relative;
    z-index: 2;

    .chip{
        padding: .2em;
        line-height: 1em;
    }

    .text-hide{
        white-space: nowrap;
        overflow: hidden;
        text-overflow: hidden;
    }

    .frequency{
        font-size: .8em;
    }
}

#seat-chart {
    display: grid;
    grid-template-columns: repeat(40, 1fr);
    grid-template-rows: repeat(3, 1fr) .3em repeat(3, 1fr);
    gap: .05em;
    row-gap: .1em;
    width: 100%;
    max-width: 500px;
    position: relative;
    overflow: hidden;
    /*height: 4.5em;*/
}

.seat {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ccc; /* Background color of seats */
    border: 0em solid #ccc; /* Border for seats */
    padding: .3em; /* Padding inside each seat */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    font-family: Arial, sans-serif; /* Font style for seat labels */
    font-size: .8em; /* Font size for seat labels */
    border-radius: 100%;
    width: 0em;
    height: 0em;
}

.gap {
    grid-column: span 40; /* Spans all columns */
    grid-row: 4; /* Position the gap on the 4th row */
    height: 0; /* No height for gap */
    border: none;
    background: none;
}

.plane{
    border-top-left-radius: 5em;
    border-bottom-left-radius: 5em;
    padding-left: 2em;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.plane:before{
    display: block;
    content: "";
    border: 6em solid transparent;
    border-right: 6em solid white;
    position: absolute;
    top: -3.6em;
    z-index: 0;
    left: 50%;
    transform: translateX(-100%);
}

.card .form{
    display: flex;
    flex-direction: column;
    gap: 1em;
}
.card .title{
    font-size: 1.2em;
    margin-bottom: 1em;
}

input, textarea, select{
    outline: none;
    display: block;
    border: 1px solid var(--text-secondary);
    border-radius: 1em;
    padding: .4em .8em;
    margin: .5em 0;
}
input[type=checkbox]{
    display: inline-block;
    width: 1em !important;
    height: 1em;
}
input#guess{
    font-size: 1.2em;
}
input:not([type=button]), textarea{
    width: calc(100% - 1.6em);
}

.chip{
    transition: all .5s;
    height: 1em;

    .explanation{
        display: inline-block;
        max-width: 0px;
        transition: max-width 1s ease;
        overflow: hidden;
        gap: .3em;
        color: var(--text-secondary);
        white-space: nowrap;

        div, img{
            display: inline-block;
        }
    }
}
.chip.faded{
    color: var(--text-light);
    background-color: var(--text-light);
    pointer-events: none;
    user-select: none;
    border-color: var(--text-light);
}
.chip.new{
    /*border-color: #1fa550;
    border-width: calc(1px + .1em);
    padding: .3em .7em .3em .7em;*/

    .explanation{
        max-width: 1000px;
    }
}

#guess.red{
    border-color: #ba2121;
}
.flag{
    width: 1em;
}
.title .flag{
    padding-right: .4em;
}

.list{
    display: flex;
    flex-direction: column;
    gap: .4em;

    .li{
        padding: .4em .8em;
        border: 1px solid var(--text-secondary);
        border-radius: .5em;
        cursor: pointer;
    }
    .li:hover{
        background-color: var(--text-light);
    }
}

.copycode{
    background-color: var(--text-light);
    padding: .4em .8em;
    border-radius: .4em;
    margin: .4em;
}

span.date{
    font-size: .8em;
}

#moreBlock{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    user-select: none;
    padding: 1em 0;
    height: 9em;


    .input{
        font-size: 1.5em;
        padding: 1em;
        border-radius: .3em;
        cursor: pointer;
        width: 3em;
        background-color: white;
        border: 1px solid var(--text-secondary);
        text-align: center;
        transition: all .5s;
        transform: scale(1);
        color: var(--text);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: .3em;
    
        .flights{
            font-size: .6em;
            color: transparent;
            background-color: var(--text-light);
            border-radius: .3em;
            width: 2em;
        }
        .explanation{
            font-size: .6em;
            color: transparent;
            background-color: var(--text-light);
            border-radius: .3em;
            width: auto;
            max-width: 5em; 
            height: 2em;
            padding: .5em 1em;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            img{
                opacity: 0;
                margin-left: .3em;
            }
        }
    }

    .input.more{
        transform: scale(1.1);
    }    
    .input.less{
        transform: scale(.9);
    }    

    .middle{
        font-size: 1.2em;
        padding: 1em;
        text-align: center;
        width: 1em;
        transform: all 1s;
    }
}

#moreMode{
    background: transparent;
    color: white;
    text-align: center;
    box-shadow: none;

    .title{
        margin:0;
        font-size: .8em;
    }
}

#moreBlock.done{

    .input{
        display: none;
    }
    .middle{
        width: 100%;
    }
}

#moreBlock.showNames{
    .input, .input:hover{

        .explanation{
            color: var(--text);

            img{
                opacity: 1;
            }
        }
    }
}
#moreBlock.correct,
#moreBlock.wrong{
    pointer-events: none;

    .input{
        border-width: calc(1px + .1em);
        padding: .9em;

        .flights, .explanation{
            color: var(--text);

            img{
                opacity: 1;
            }
        }
    
    }
}
#moreBlock.correct .input{
    border-color: #1fa550;
}
#moreBlock.wrong .input{
    border-color: #ba2121;
}

.card .content{
    display: flex;
    gap: 1em;
}

#moreBlock.done .middle{
    animation: winnerAnimation 2s ease-in-out infinite, 
                       glow 1.5s ease-in-out infinite;
            background: gold;
            color: #1f191b;
            font-size: 2rem;
            padding: 20px;
            border-radius: 10px;
            text-align: center;
            margin: 50px auto;
            width: fit-content;
}
.done .middle:after{
    /*content: "You Won!";*/
}

.bar{
    width:100%;
    display:flex;
    gap:5px;
    margin-bottom:5px;
    .b,.g{
        height:5px;
        border-radius:5px;
    }
    .b{
        background: #295dc6;
    }
    .g{
        background: #1fa550;
    }
}

@keyframes winnerAnimation {
    0% { transform: scale(1) rotate(0deg); opacity: 1; }
    25% { transform: scale(1.2) rotate(5deg); opacity: 0.9; }
    50% { transform: scale(1) rotate(-5deg); opacity: 1; }
    75% { transform: scale(1.2) rotate(5deg); opacity: 0.9; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes glow {
    0% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 30px rgba(255, 215, 0, 1); }
    100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
}


@media (hover: hover) and (pointer: fine) {
    .input:hover{
        background-color: var(--text-light);
        .flights, .explanation{
            color: transparent;
            background-color: var(--text-middle);
        }

    }
}