/**
 * CountryList
 */

.CountryList {
    margin: 0;
    padding: 0;
    list-style: none;
}

.CountryList__item {
    display: inline-block;
    width: 100%;
    margin-bottom: 1em;
}

.ie9 .CountryList__item {
    display: list-item;
    float: left;
}

.CountryList__link {
    display: block;
    padding: .5em;
    border: 1px solid #bbb;
    text-decoration: none;
    background-color: #fff;
    transition: .2s border ease-out;
}

.CountryList__link:hover {
    text-decoration: none;
    border-color: #7e459a;
}

.CountryList__imageContainer {
    position: relative;
    float: left;
    width: 45px;
    height: 45px;
    margin: 0 1em 0 0;
}

.CountryList__image,
.CountryList__flag {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 100%;
}

.CountryList__link:hover .CountryList__flag {
    display: none;
}

.CountryList__title {
    display: table;
    height: 45px;
    margin-bottom: 0;
    margin-left: 55px;
    color: #555;
    transition: .2s color ease-out;
}

.CountryList__link:hover .CountryList__title {
    color: #7e459a;
}

.CountryList__title .CountryList__titleWrapper {
    display: table-cell;
    vertical-align: middle;
    line-height: 1.1;
}

/** Inactive countries */
.CountryList__item--inactive {
    opacity: .5;
}

.CountryList__item--inactive:hover {
    opacity: 1;
}

.CountryList__item--inactive a {
    border-color: #ddd;
    background-color: transparent;
}

/** Media queries */
@media (min-width: 400px) {
    .CountryList {
        -webkit-columns: 180px 2;
        -moz-columns: 180px 2;
        columns: 180px 2;
    }

    .ie9 .CountryList__item {
        width: 48%;
        margin-right: 2%;
    }

    .ie9 .CountryList__item:nth-child(2n + 2) {
        margin-right: 0;
    }

    .CountryList__titleWrapper span {
        display: inline-block;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (min-width: 450px) {
    .CountryList__titleWrapper span {
        max-width: 120px;
    }
}

@media (min-width: 500px) {
    .CountryList__titleWrapper span {
        max-width: 140px;
    }
}

@media (min-width: 550px) {
    .CountryList__titleWrapper span {
        max-width: 160px;
    }
}

@media (min-width: 700px) {
    .CountryList {
        -webkit-columns: 200px 3;
        -moz-columns: 200px 3;
        columns: 200px 3;
    }

    .ie9 .CountryList__item {
        width: 31%;
        margin-right: 2%;
    }

    .ie9 .CountryList__item:nth-child(2n + 2) {
        margin-right: 2%;
    }

    .ie9 .CountryList__item:nth-child(3n + 3) {
        margin-right: 0;
    }

    .CountryList__titleWrapper span {
        max-width: 120px;
    }
}

@media (min-width: 900px) {
    .CountryList {
        -webkit-columns: 220px 4;
        -moz-columns: 220px 4;
        columns: 220px 4;
    }

    .ie9 .CountryList__item {
        width: 23%;
        margin-right: 2%;
    }

    .ie9 .CountryList__item:nth-child(2n + 2),
    .ie9 .CountryList__item:nth-child(3n + 3) {
        margin-right: 2%;
    }

    .ie9 .CountryList__item:nth-child(4n + 4) {
        margin-right: 0;
    }
}

@media (min-width: 1180px) {
    .CountryList {
        -webkit-columns: 180px 5;
        -moz-columns: 180px 5;
        columns: 180px 5;
    }

    .ie9 .CountryList__item {
        width: 180px;
        margin-right: 60px;
    }

    .ie9 .CountryList__item:nth-child(2n + 2),
    .ie9 .CountryList__item:nth-child(3n + 3),
    .ie9 .CountryList__item:nth-child(4n + 4) {
        margin-right: 60px;
    }

    .ie9 .CountryList__item:nth-child(5n + 5) {
        margin-right: 0;
    }

    .CountryList__titleWrapper span {
        max-width: 100px;
    }
}