/* Minimal stylesheet. The pages remain fully usable without it. */

* {
    box-sizing: border-box;
}

body {
    margin: 0 auto;
    max-width: 44rem;
    padding: 1rem;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    color: #111;
    background: #fff;
}

main {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h1 {
    font-size: 1.25rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.vote fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

.moods {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: stretch;
}

.mood {
    flex: 1;
    max-width: 12rem;
    padding: 1.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    background: #f4f4f4;
    border: 2px solid #333;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.mood:hover {
    background: #e8e8e8;
}

.emoji {
    font-size: 3rem;
    line-height: 1;
}

.result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.result .emoji {
    font-size: 5rem;
}

table.stats {
    border-collapse: collapse;
    margin: 1rem 0;
}

table.stats th,
table.stats td {
    border: 1px solid #333;
    padding: 0.4rem 0.8rem;
    text-align: left;
}

table.stats td {
    text-align: right;
}

tr.total th,
tr.total td {
    font-weight: bold;
}

.insufficient {
    font-weight: bold;
}

nav.periods,
nav.scope {
    margin: 0.5rem 0;
}

ol.countries {
    columns: 2;
}

footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #999;
    font-size: 0.85rem;
    text-align: center;
}

footer .langs {
    margin: 0.5rem 0;
}

footer .attribution {
    margin: 0.5rem 0;
}

@media (prefers-color-scheme: dark) {
    body {
        color: #eee;
        background: #111;
    }

    .mood {
        background: #222;
        border-color: #ccc;
        color: #eee;
    }

    .mood:hover {
        background: #333;
    }

    table.stats th,
    table.stats td {
        border-color: #ccc;
    }

    footer {
        border-color: #555;
    }

    a {
        color: #9cf;
    }
}
