:root{
    --bg-theme-light:#F8F8F8;
    --bg-theme-dark:#242424;
    --border-color:#B8B6BF;
    --text-light:#ffffff;
    --text-dark:#000000;

    /*width: calc(100% / var(--amount-countries-in-a-row) - (66px * (var(--amount-countries-in-a-row) - 1) / var(--amount-countries-in-a-row)));*/
    --country-box-width--lg:calc(100% / 4 - (66px * (4 - 1)) / 4);
    --country-box-width--md:calc(100% / 3 - (66px * (3 - 1)) / 3);
    --country-box-width--sm:calc(100% / 2 - (66px * (2 - 1)) / 2);
    --country-box-width--xs:calc(100% / 1 - (66px * (1 - 1)) / 1);
    font-family: 'Roboto', sans-serif;
}
.theme--dark{
    background-color: var(--bg-theme-dark);
    color: var(--bg-theme-light);
    transition: all .4s;
}
.theme--light{
    background-color: var(--bg-theme-light);
    color: var(--bg-theme-dark);
    transition: all .4s;
}

/*RESET STYLES*/
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
input{
    border: none;
    outline: none;
}
button{
    background-color: transparent;
    outline: none;
    border: none;
    cursor: pointer;
}
li{
    list-style: none;
}
/*RESET STYLES*/

body{
    background-color: var(--bg-theme-light);
}

.section-outer{
    max-width: 1600px;
    margin: 0 auto;
    padding: 85px 104px;
}
.section-inner{
    position: relative;
}


/*CUSTOM THEME CHECKBOX TRIGGER*/
.theme-switch__input{
    display: none;
}
.theme-switch__label{
    width: 70px;
    height: 32px;
    border: 1px solid var(--bg-theme-dark);
    border-radius: 30px;
    background-color: var(--bg-theme-dark);
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    cursor: pointer;
}
.theme-switch__label::after{
    content: '';
    width: 26px;
    height: 26px;
    border-radius: 100%;
    background-color: var(--bg-theme-light);
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all .4s;
    z-index: 100;
}
.theme-switch__input:checked + .theme-switch__label::after{
    background-color: var(--bg-theme-dark);
    transition: all .4s;
    transform: translate(37px,0);
}
.theme-switch__input:checked + .theme-switch__label{
    background-color: var(--bg-theme-light);
}
/*CUSTOM THEME CHECKBOX TRIGGER*/

.main__title {
    font-size: 40px;
    font-style: normal;
    font-weight: 700;
    line-height: 181.8%; /* 72.72px */
}

.main__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.form {
    margin: 35px 0;
}
.form--theme-dark{
    color: var(--border-color);
}
.form__input{
    background-color: inherit;
    color: inherit;
    width: 100%;
}

.input__wrapper {
    padding: 10px 36px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 376px;
    min-width: 346px;
    height: 50px;
    position: relative;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.08);

}

.input__button{
    position: absolute;
    right: 8px;
    top: 55%;
    transform: translateY(-50%);
}
.input__icon {
    width: 21px;
    height: 21px;
}

.dropdown {
    width: 152px;
    height: 50px;
    background-color: var(--bg-theme-light);
    position: relative;
}
.dropdown__title{
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background-color: var(--bg-theme-light);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    cursor: pointer;
}
.dropdown__list{
    height: 0;
    width: 100%;
    overflow: hidden;
    position: absolute;
    top: 100%;
    background-color: var(--bg-theme-light);
    border: 1px solid var(--border-color);
    z-index: 2;
    opacity: 0;
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
    transition: all .4s;
}
.dropdown__list.opened{
    opacity: 1;
    height: auto;
    padding-top: 10px;
    transform: translateY(-10px);
    transition: all .4s;
}
.dropdown__item{
    padding: 10px 15px;
    z-index: 1;
    cursor: pointer;
}
.dropdown__item:not(:last-child){
    border-bottom: 1px solid var(--border-color);
}
.content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 66px;
}

.country {
    background-color: var(--text-light);
    width: var(--country-box-width--lg);
    border-radius: 10px;
    border: 1px solid transparent;
    box-shadow: 0 4px 29px 0 rgba(0, 0, 0, 0.25);
}

.country__img{
    width: 100%;
    height: 180px;
    border-radius: 10px;
}
.country__details {
    padding: 15px 35px;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.country__name {
    font-size: 17px;
    font-weight: 600;
}
.error{
    margin-top: 100px;
}
.--theme-dark{
    background-color: var(--bg-theme-dark);
    color: var(--text-light);
    border-color: var(--text-light);
}
@media (max-width: 1440px) {
    .section-outer{
        padding: 50px;
    }
    .country{
        width: var(--country-box-width--md);
    }
}
@media (max-width: 992px) {
    .content{
        gap: 30px;
    }
    .country{
        width: var(--country-box-width--sm);
    }
}
@media (max-width: 768px) {
    .section-outer{
        padding: 30px;
    }
    .country{
        width: var(--country-box-width--sm);
    }
}
@media (max-width: 576px) {
    .main__header{
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }
    .main__title{
        padding-top: 50px;
        font-size: 28px;
    }
    .form{
        width: 100%;
        margin: 20px 0 10px;
    }
    .input__wrapper{
        min-width: 100%;
        max-width: 100%;
    }
    .dropdown{
        width: 100%;
    }
    .country{
        width: var(--country-box-width--xs);
    }
}
@media (max-width: 350px) {
    .main__title{
        font-size: 20px;
    }
}