.team-page {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.team-page-holder {
    max-width: 100vw;
    display: flex;
    gap: 8px;
}

.back-button {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: .5rem;
    margin-bottom: 4px;
}

.team-info,
.team-data,
.team-info-description,
.matches,
.graph-selection-holder {
    display: flex;
    flex-direction: column;
}

.team-info {
    width: 450px;
    min-width: 400px;
    flex-shrink: 0;
}

.team-info-basic {
    display: flex;
    flex-direction: row;
    margin-bottom: 8px;
}

.logo-large {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    border: 2px solid black;
}

.team-name {
    font-weight: bold;
    font-size: 2rem;
    display: flex;
    align-items: center;
}
.team-star {
    font-size: 1em;
}

/*#region Matches*/
.matches-upcoming-label {
    font-size: 1.5rem;
    border-top: 1px solid var(--font);
    border-radius: 4px;
}
.matches {
    gap: 4px;
}
.match {
    display: flex;
    border-radius: 4px;
    border: 1px solid var(--font);
    justify-content: space-evenly;
}
.match-number {
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    border-right: 1px solid black;
}
.match-number.trophy {
    background-color: var(--green);
}
.match-number.balance {
    background-color: var(--yellow);
}
.match-number.skull {
    background-color: var(--red);
}
.match-alliance {
    display: flex;
    justify-content: space-evenly;
    gap: 16px;
    width: 100%;
}
.match-alliance div {
    display: flex;
    align-items: center;
    justify-content: center;
}
.match-alliance.red {
    background-color: var(--red);
}
.match-alliance.blue {
    background-color: var(--blue);
}
/*#endregion*/

/*#region Compare*/
.compare-holder {
    display: flex;
    flex-direction: column;
    margin-top: 8px;
    padding: 8px;
    border: 1px solid var(--font);
    gap: 4px;
    border-radius: 4px;
    font-size: 1.3rem;
}

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

.compare-team {
    border: 1px solid var(--font);
    display: flex;
    width: 100%;
    padding: 4px;
    box-sizing: border-box;
    border-radius: 4px;
    align-items: center;
}

.compare-team-name {
    cursor: pointer;
    text-decoration: underline;
}

/*#endregion*/

.team-data {
    width: 100%;
}

/*#region Graph, Comments*/
.graph-comments-holder {
    display: flex;
    gap: 4px;
    flex-direction: row;
    order: -1000001;
}

.graph-selection-holder {
    border: 1px solid var(--font);
    border-radius: 4px;
    width: 250px;
    padding: 4px;
    gap: 4px;
    overflow-y: auto;
    overflow-x: hidden;
}

.graph-holder,
.comments-holder {
    flex-direction: column;
    display: flex;
}

.graph-holder.no-desmos {
    width: 20px;
    overflow: hidden;
    border: 0;
    opacity: 0;
}

.graph-controls {
    display: flex;
    gap: 4px;
    justify-content: space-between;
    align-items: center;
}

.graph {
    color: black;
    flex-shrink: 0;
    border: 1px solid var(--font);
    min-height: 374px;
    min-width: 374px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.graph.initial {
    border: 1px solid var(--font);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--placeholder);
}


.comments-holder {
    width: 100%;
    min-height: 374px;
    overflow-y: auto;
}
.pit-data-holder {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.pit-data-holder:empty:before {
    content: "No pit data :("
}

.pit-data-title, .comments-title {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}
.pit-data-title {
    margin-top: 8px;
}

.team-comments {
    width: 100%;
    font-size: 1.1rem;
    flex-shrink: 1;
}
.team-comments.nograph {
    min-height: 80px;
}
/*#endregion*/

.team-page-pit {
    border: 1px solid var(--font);
    border-radius: 4px;
    width: fit-content;
    padding: 4px;
    margin-top: 4px;
    gap: 16px;
}

.team-page-pit-name {
    font-weight: bold;
}

.drag {
    background-color: var(--line);
    border: 1px solid transparent;
    border-radius: 2px;
    box-sizing: border-box;
    flex-shrink: 0;
}
.drag.width {
    width: 4px;
    max-height: 100vh;
    cursor: col-resize;
}
.drag.height {
    height: 4px;
    max-width: 100vw;
    cursor: row-resize;
}
.drag.width.padding {
    margin-left: 4px;
    margin-right: 4px;
}
.drag.height.padding {
    margin-top: 4px;
    margin-bottom: 4px;
}

/*#region Image Display */
.team-image-display-bg {
    width: 100%;
    height: 100%;
    position: absolute;
    background-color: rgba(0,0,0,.4);
    left: 0;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}

.team-image-display-counter {
    font-size: 1.5rem;
    padding: .5rem;
    background-color: var(--bg);
    border: 1px solid var(--font);
    border-radius: .25rem;
}

.team-image-display {
    min-width: 8rem;
    min-height: 8rem;
    background-color: var(--bg);
    border: 1px solid var(--font);
    border-radius: .25rem;
    display: flex;
    gap: 1rem;
    padding: 1rem;
    justify-content: center;
    align-items: center;
}

.team-image-display img {
    max-width: calc(100vw - 36rem);
    max-height: calc(100vh - 16rem);
}
/*#endregion */