
.jersey-img {
    width: 165px;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0px 0px 4px 0px rgba(0,0,0,0.2);
    background-color: white;

}

.team-jersey {
    display: flex;
    flex-direction: column;
    margin: 6px 2px;
}

.jerseys {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.jersey-top {
    display: flex;
    margin-bottom: 3px;
}

.team-code {
    text-transform: uppercase;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 4px;
}

.team-name {
    padding: 4px;
}

.jersey-lower {
    display: flex;
}

a.jersey-alternate-link {
    margin-right: 4px;
    position: relative;
}

a.jersey-alternate-link:before {content: 'Alternate';position: absolute;top: -30px;background: rgba(255,0,0,0.3);color: white;text-decoration: none;text-transform: uppercase;background: rgba(0,0,0,0.5);padding: 4px;width: 158px;text-align: center;}

div#info {
    text-align: center;
}

p.subtitle {
    font-size: 20px;
    margin: 0.5em 0;
}

#info h2 {
    font-size: 32px;
    margin: 0.5em 0;
}


/* */
.jerseys.sort--color .team-jersey {
    order: 100;
}

/* red and white */
.jerseys.sort--color .team-jersey[data-team="AUT"],
.jerseys.sort--color .team-jersey[data-team="DNK"],
.jerseys.sort--color .team-jersey[data-team="LVA"] {
    order: 4;
}
.jerseys.sort--color .team-jersey[data-team="CAN"],
.jerseys.sort--color .team-jersey[data-team="HKG"],
.jerseys.sort--color .team-jersey[data-team="JPN"],
.jerseys.sort--color .team-jersey[data-team="PER"],
.jerseys.sort--color .team-jersey[data-team="POL"],
.jerseys.sort--color .team-jersey[data-team="SGP"],
.jerseys.sort--color .team-jersey[data-team="CHE"] {
    order: 5;
}

/* red white blue */

.jerseys.sort--color .team-jersey[data-team="NOR"],
.jerseys.sort--color .team-jersey[data-team="THA"],
.jerseys.sort--color .team-jersey[data-team="TPE"] {
	order: 9;
}

.jerseys.sort--color .team-jersey[data-team="RUS"],
.jerseys.sort--color .team-jersey[data-team="USA"] {
    order: 10;
}

/* red + other */
.jerseys.sort--color .team-jersey[data-team="CHN"],
.jerseys.sort--color .team-jersey[data-team="PRY"] {
    order: 15;
}

/* white + other */
.jerseys.sort--color .team-jersey[data-team="KOR"],
.jerseys.sort--color .team-jersey[data-team="DEU"] {
    order: 20;
}

/* blue white */
.jerseys.sort--color .team-jersey[data-team="GRC"],
.jerseys.sort--color .team-jersey[data-team="FIN"],
.jerseys.sort--color .team-jersey[data-team="ISR"] {
    order: 25;
}

/* blue red white */
.jerseys.sort--color .team-jersey[data-team="FRA"],
.jerseys.sort--color .team-jersey[data-team="ISL"] {
    order: 35;
}
.jerseys.sort--color .team-jersey[data-team="GBR"],
.jerseys.sort--color .team-jersey[data-team="CHL"] {
    order: 36;
}
.jerseys.sort--color .team-jersey[data-team="NZL"] {
    order: 37;
}

/* blue yellow */
.jerseys.sort--color .team-jersey[data-team="MYS"] { order: 42; }
.jerseys.sort--color .team-jersey[data-team="SWE"] { order: 40; }
.jerseys.sort--color .team-jersey[data-team="ARG"] { order: 41; }

/* green white red */
.jerseys.sort--color .team-jersey[data-team="ITA"],
.jerseys.sort--color .team-jersey[data-team="MEX"] {
    order: 45;
}
.jerseys.sort--color .team-jersey[data-team="BGR"] { order: 46; }

/* green */
.jerseys.sort--color .team-jersey[data-team="IND"] {
    order: 49;
}
.jerseys.sort--color .team-jersey[data-team="AUS"],
.jerseys.sort--color .team-jersey[data-team="BRA"],
.jerseys.sort--color .team-jersey[data-team="IRE"],
.jerseys.sort--color .team-jersey[data-team="KWT"],
.jerseys.sort--color .team-jersey[data-team="PRT"],
.jerseys.sort--color .team-jersey[data-team="SAU"],
.jerseys.sort--color .team-jersey[data-team="ZAF"] {
    order: 50;
}

.jerseys.sort--color .team-jersey[data-team="PRT"],
.jerseys.sort--color .team-jersey[data-team="ZAF"] {
    order: 52;
}

/* yellow */
.jerseys.sort--color .team-jersey[data-team="COL"],
.jerseys.sort--color .team-jersey[data-team="PHL"] {
    order: 55;
}
.jerseys.sort--color .team-jersey[data-team="EGY"],
.jerseys.sort--color .team-jersey[data-team="ESP"] {
    order: 57;
}

/* orange */
.jerseys.sort--color .team-jersey[data-team="NLD"] {
    order: 57;
}

.buttons {
    display: flex;
    justify-content: center;
}

.button {
    margin: 4px;
    background: rgba(0,0,0,0.4);
    color: white;
    border-radius: 2px;
    padding: 4px 8px;
    user-select: none;
    cursor: pointer;

    border: 1px solid transparent;
    transition: border-color .2s;
}

.button.active {
    border: 1px solid white;
}

.jerseys.sort--alternate .team-jersey:not(.has-alternate) {
    display: none;
}


#top {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5em;

}

@media only screen and (min-width: 1200px) {
    #top {
        flex-direction: row;
    }
    #info {
        width: 100%;
    }
}

.old-jersey {
    width: 170px;
    height: 200px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: white;
    border: 4px solid white;
    margin: 0 4px;
    box-shadow: 0px 0px 4px 0px rgba(0,0,0,0.2);

}

.old-jerseys-imgs {
    display: flex;
    justify-content: center;
}
div#old-jerseys {
text-align: center;
    margin: 0 20px;
}

a {
    color: black;
    font-weight: bold;
}
.team-code {
    background-repeat: no-repeat;
    background-size: contain;
    width: 26px;
    color: transparent;
    background-color: transparent;
    box-shadow: 0px 0px 4px 0px rgba(0,0,0,0.2);
}

a.jersey-alternate-link[data-text]:before {
    content: attr(data-text);
}