/* Results container */
#results {
    position: relative;
    display: none;
    overflow: hidden auto;
    max-height: 80vh;
    font-size: 0.8em;
}

#results.visible {
    display: block;
}

/* Progress bar */
#results::before {
    content: '';
    display: block;
    height: 16px;
    width: var(--progress, 0%);
    max-width: 80%;
    background-color: #4caf50;
    transition: width 0.2s;
    margin-bottom: 16px;
    border-radius: 4px;
}

#results::after {
    content: attr(data-text);
    position: absolute;
    height: 16px;
    left: 0;
    top: 0;
    color: #000;
    line-height: 16px;
    text-align: center;
    width: 80%;
}

/* Result line */
#results .result-line {
    display: flex;
    flex-wrap: wrap;
    width: 80%;
    gap: 20px;
}

#results .result-line:not(:last-child)::after {
    content: ' ';
    display: block;
    position: relative;
    width: 100%;
    height: 1px;
    background-color: #615850;
    margin-bottom: 20px;
    opacity: 0.3;
}

#results .result-line .squadron {
    display: grid;
    grid-template-areas:
        'title title title title'
        'img img img img';
    gap: 5px 3px;
}

#results .result-line .title-stat {
    font-weight: bold;
    width: 90px;
}

#results .result-line .squadron .title-stat {
    grid-area: title;
    width: auto;
}

#results .result-line .squadron .niveau {
    text-align: center;
}

.result-line .stats {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#results .result-line .stats > div {
    display: flex;
    align-items: center;
    gap: 6px;
}

#results .result-line span {
    font-weight: bold;
}

#results .result-line span.green {
    color: #1a9e1f;
}

#results .result-line span.red {
    color: #c61515;
}

#results .result-line .training-and-chemistries {
    display: flex;
    flex-direction: column;
    flex: 1;
}

#results .result-line .training,
#results .result-line .chemistries {
    height: 50%;
    display: flex;
    align-items: center;
    padding-left: 10px;
}

.result-line .training {
    background: rgba(0, 0, 0, 0.04);
}

#results .result-line .chemistries {
    background: rgba(0, 0, 0, 0.02);
}

#results .result-line .images-training,
#results .result-line .images-chemistries {
    display: flex;
    align-items: center;
    height: 100%;
}

#results .result-line .images-training img,
#results .result-line .images-chemistries img {
    height: 75.3%;
    aspect-ratio: 1;
    max-width: 100%;
}
