/* =====================================================================
   Variables
   ===================================================================== */

:root {
    --red: #d30505;
    --green: #017701;
    --brand: #b30000;
    --color: #222;
}


/* =====================================================================
   Body
   ===================================================================== */

body {
    background-color: #e5e5e5;
    color: var(--color);
    text-align: center;
    font-family: -apple-system, 'Segoe UI', sans-serif;
    -webkit-tap-highlight-color: transparent;
}



/* =====================================================================
   Game
   ===================================================================== */

#game {
    max-width: 980px;
    margin: 0 auto;
}



/* =====================================================================
   Game of Flags
   ===================================================================== */

.game-of-flags {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-variant: small-caps;
    color: var(--brand);
    margin: 1.5em auto .8em;
    font-size: 4em;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, .7);
    line-height: 1;
    letter-spacing: -1px;
}

.game-of-flags span {
    font-size: .6em;
    position: relative;
    vertical-align: middle;
}

.is-mobile .game-of-flags {
    font-size: 2.5em;
}



/* =====================================================================
   Switch Checkbox
   ===================================================================== */

.switch {
    position: relative;
    cursor: pointer;
    display: inline-block;
    display: block;
    text-align: left;
    width: 230px;
    height: 34px;
    margin: 1em auto;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.switch .slider {
    position: absolute;
    cursor: pointer;
    width: 60px;
    top: 0;
    /* left: 0; */
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    -webkit-transition: .2s;
    transition: .2s;
    border-radius: 34px;
}

.switch .slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    -webkit-transition: .2s;
    transition: .2s;
    border-radius: 50%;
}

.switch input:checked~.slider {
    background-color: #2196F3;
    background-color: var(--brand);
}

.switch input:checked~.slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.switch .label {
    font-weight: 600;
    font-size: 1.2em;
    line-height: 34px;
    /* margin-left: 64px; */
    display: inline-block;
    color: #777;
}

.switch input:checked~.label {
    color: inherit;
}




/* =====================================================================
   Score
   ===================================================================== */

.score {
    font-weight: bold;
    font-size: 1.5em;
    padding: .3em 1em;
    background-color: #fff;
    border: 2px solid #999;
    border-radius: 8px;
    margin: 32px 0 16px;
    font-family: monospace;
    display: inline-block;
}



/* =====================================================================
   Game Progress
   ===================================================================== */

.game-progress {
    margin-bottom: 32px;
}



/* =====================================================================
   Progress Bar
   ===================================================================== */

.progress-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
    margin: 32px auto;
}

.is-mobile .progress-bar {
    margin: 32px auto 24px;
}

.progress-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #999;
}

.progress-bar span.correct {
    background-color: var(--green);
    border-color: var(--green);
}

.progress-bar span.wrong {
    background-color: var(--red);
    border-color: var(--red);
}



/* =====================================================================
   Guess Country
   ===================================================================== */

.guess-country {
    margin: 32px auto;
    font-size: 42px;
    line-height: 1.1;
}

.is-mobile .guess-country {
    font-size: 28px;
    margin: 16px auto 24px auto;
}



/* =====================================================================
   Guess Flag
   ===================================================================== */

.guess-flag {
    height: 164px;
    display: block;
    margin: 32px auto 24px;
}

.is-mobile .guess-flag {
    height: 132px;
}



/* =====================================================================
   Select Flag
   ===================================================================== */

.select-flag {
    cursor: pointer;
    height: 64px;
    margin: .4em .6em;
}

.is-mobile .select-flag {
    height: 52px;
    margin: .2em .4em;
}

.select-flag:hover {
    box-shadow: 2px 4px 24px rgba(0, 0, 0, .4);
}

.select-flag.CORRECT {
    box-shadow: 0 0 .4em .3em var(--green);
}

.is-mobile .select-flag.CORRECT {
    box-shadow: 0 0 .6em .4em var(--green);
}

.select-flag.WRONG {
    box-shadow: 0 0 .4em .3em var(--red);
}

.is-mobile .select-flag.WRONG {
    box-shadow: 0 0 .6em .4em var(--red);
}



/* =====================================================================
   Select Country
   ===================================================================== */

.select-country {
    font: inherit;
    color: inherit;
    font-size: 2em;
    font-size: 1.4em;
    cursor: pointer;
    display: inline-block;
    margin: .2em;
    font-weight: 600;
    border: 1px solid #888;
    border-radius: 8px;
    padding: .2em 1em;
    background-color: #fff;
}

.is-mobile .select-country {
    font-size: 1.1em;
}

.is-desktop .select-country:hover {
    background-color: #eee;
}

.is-desktop .select-country.CORRECT,
.is-mobile .select-country.CORRECT {
    background-color: var(--green);
    border-color: var(--green);
    color: #fff;
}

.is-desktop .select-country.WRONG,
.is-mobile .select-country.WRONG {
    background-color: var(--red);
    border-color: var(--red);
    color: #fff;
}



/* =====================================================================
   Quit Game Panel
   ===================================================================== */

.quit-game-panel {
    margin: 2em 0;
    padding: 1em 0;
    border-top: 1px solid #999;
}


/* =====================================================================
   Quit Game Button
   ===================================================================== */

.quit-game-button {
    font: inherit;
    cursor: pointer;
    display: inline-block;
    margin: .3em;
    font-weight: 600;
    line-height: 1;
    border: 1px solid #777;
    border: 0;
    border-radius: 32px;
    padding: .8em 1.6em;
    background-color: #fff;
    background-color: var(--brand);
    color: #fff;
}



/* =====================================================================
   Results Table
   ===================================================================== */

.results-table {
    margin: 0 auto;
}

.results-table th {
    text-align: right;
}

.results-table td {
    text-align: left;
    padding-left: 1em;
}



/* =====================================================================
   button
   ===================================================================== */

.button {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--brand);
    color: #fff;
    padding: 14px 32px;
    font: inherit;
    line-height: 1;
    border: 0;
    margin: 0;
    border-radius: 32px;
    font-weight: 600;
    transition: all .2s;
}

.button.DISABLED {
    background-color: #ccc;
    color: #777;
    cursor: default;
}



/* =====================================================================
   footer
   ===================================================================== */

footer {
    border-top: 1px solid #ccc;
    margin-top: 4em;
    padding: 1em 1em 2em;
    text-align: center;
}

footer a {
    color: #777;
}