/***************************************************
 *   variables & presets                           *
 ***************************************************/

:root{
    --black: #555;
    --dark-grey: #999999;
    --grey: #e4e0e0;
    --bg: #f4f0f0;
    --bg-green: #edffed;
    --bg-orange: #fff0d5;
    --bg-red: #ffe7e7;
    --green: #8dfe8d;
    --orange: #faca70;
    --red: #ff7474;
    --margin: 20px;
    --big-margin: 20px;
}
*, *::after, *::before{ margin: 0; padding: 0; box-sizing: border-box; }
.clearfix{ overflow: auto; }
.clearfix::after{ content: ""; clear: both; display: table; }


/***************************************************
 *   settings                                      *
 ***************************************************/
html{
    background: var(--bg);
}
body{
    font-family: monospace;
    color: var(--black);
    line-height: 1.6em;
    font-size: 1.3em;
    padding-top: var(--margin);
}
.container{
    width: 700px;
    margin: auto;
}
h1{
    margin-bottom: var(--margin);
    text-align: center;
}
#version{
    font-size: .4em;
    font-family: sans-serif;
    margin-left: 5px;
}
.green, .orange, .red{
    text-align: center;
    border-radius: 5px;
    padding: 2px 5px;
    border: 1px solid var(--grey);
    vertical-align: middle;
    overflow: hidden;
}
.green{
    background: var(--bg-green);
}
.orange{
    background: var(--bg-orange);
}
.red{
    background: var(--bg-red);
}
.font-green{
    color: var(--green);
}
.font-orange{
    color: var(--orange);
}
.font-red{
    color: var(--red);
}

#share{
    transition: .2s;
}
#share.clicked{
    background: var(--black);
    color: white;
}



/***************************************************
 *   options & form                                *
 ***************************************************/
select, input, .guess, .button, .form-item, .result, .continent-name, .country{
    display: inline-block;
    margin:0;
    padding: 0 15px;
    height: 50px;
    line-height: 50px;
    line-height: 50px;
    font-size: 1em;
    vertical-align: middle;
    border-radius: 10px;
    font-family: monospace;
    color: var(--black);
    border: 1px solid var(--grey);
    background: white;
    overflow: hidden;
}
select:focus, input:focus{
    outline: none;
}
.button{
    cursor: pointer;
    width: 50px;
    text-align: center;
    font-size: 18px;
}
.button.button-black{
    background: var(--black);
    color: white;
}
.button.button-orange:hover{
    background: var(--bg-orange);
}
.button.button-red:hover{
    background: var(--bg-red);
}
.button.button-enter{
    min-width: 100px;
}

.options{
    margin-bottom: var(--margin);
    display: flex;
    flex-wrap: wrap;
    gap:10px;
}
select{
    flex-grow: 1;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='grey' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position-x: 99%;
    background-position-y: 12px;
    text-overflow: ellipsis;
}

/***************************************************
 *   games                                         *
 ***************************************************/
.game{
    margin-bottom: 50px;
    display: none;
}
.game.selected{
    display: block;
}
.rules{
    margin-bottom: var(--big-margin);
    text-align: justify;
}

.pre-form, .form{
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.clue{
    font-weight: bold;
    padding: 0;
}
.clue img{
    height: 100%;
    float: left;
}
.clue-capital{
    padding-right: 10px;
}
.clue-capital img{
    margin-right: 10px;
}
.result{
    background: var(--black);
    color: white;
    flex-grow: 1;
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
}
.form .guess{
    flex-grow: 1;
}

.answers{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 7px;
}
.answer{
    text-overflow: ellipsis;
    white-space:nowrap;
}
.answer .img-container{
    overflow: hidden;
    border-radius: 3px;
    height: 19px;
    float: left;
    margin: 4px;
    margin-left: 0;
}
.answer .img-container img{
    height: 100%;
}



/***************************************************
 *   list                                          *
 ***************************************************/
.continent {
    margin-bottom: 50px;
}
.continent .continent-name {
    display: block;
    color: #fff;
    background: var(--black);
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}
.continent-name .continent-population{
    float: right;
}
.country {
    display: block;
    margin-bottom: 10px;
    padding-left: 0;
    text-overflow: ellipsis;
    white-space:nowrap;
}
.country.selected{
    background: var(--bg);
}
.country .country-flag {
    float: left;
    height: 50px;
    margin-right: 10px;
}
.country .country-flag img {
    display: block;
    height: 100%;
}
.country .country-info {
    display: inline-block;
    line-height: 1.2em;
    padding-top: 5px;
}
.country-name{
    display: block;
    font-weight: bold;
}
.country-capital {
    display: block;
    color: var(--dark-grey);
}
.country-population{
    float: right;
    font-weight: bold;
    height: 50px;
}


/***************************************************
 *   population                                    *
 ***************************************************/
.slider{
    appearance: none;
    -webkit-appearance: none;
    padding: 10px;
    /* width: 100%; */
    flex-grow: 1;
    /* width: 100%;
    height: 25px;
    background: white;
    padding: 2px; */
}
.slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: var(--black);
    cursor: pointer;
}
  
.slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    background: #04AA6D;
    cursor: pointer;
}
#population .form{
    justify-content:space-between;
}
#population-value{
    flex-grow: 0;
    font-weight: bold;
    min-width: 100px;
    text-align: center;
}





/***************************************************
 *   media queries                                 *
 ***************************************************/
@media screen and (max-width: 720px) {
    :root{
        --margin: 10px;
        --big-margin: 10px;
    }
    body{
        font-size: 1em;
    }
    .container{
        width: 95%;
    }
    h1{
        font-size: 1.15em;
        text-align: center;
    }
    select{
        width: 100%;
    }
    .answer .img-container{
        height: 14px;
    }
}
