/* Pheno Guesser — theme inherited from encyclopaediae.org / flag-guesser (style_new.css) */

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    color: #e8e8e0;
    background: black;
    font-family: "Lucida Console", Monaco, "Courier New", Courier, monospace;
    font-size: 15px;
    line-height: 1.6;
    max-width: 800px;
    margin-top: 0;
    margin-left: auto;
    margin-right: auto;
    padding: 0 16px 58px 16px;
}

.page {
    border-left: 1px solid #303830;
    border-right: 1px solid #303830;
    min-height: 100%;
}

.masthead {
    border-top: 5px solid #99cc99;
    border-bottom: 1px solid #394839;
    align-items: flex-end;
    display: flex;
    gap: 0 16px;
    margin-bottom: 30px;
    padding: 16px 20px 0 20px;
}

.brand {
    flex: 1 1 auto;
    min-width: 0;
}

h1 {
    color: #f4f4ee;
    font-size: 31px;
    font-weight: normal;
    letter-spacing: 0;
    line-height: 1.1;
    margin: 0;
}

.cont {
    color: #a8b8a8;
    font-size: 13px;
    margin: 7px 0 16px 0;
}

.bar {
    display: flex;
    flex-shrink: 0;
    margin-left: auto;
}

.bar a {
    border: 1px solid #394839;
    border-bottom: 0;
    display: inline-block;
    font-size: 13px;
    letter-spacing: 0;
    margin-left: 4px;
    padding: 8px 11px 9px 11px;
}

.section {
    border-top: 1px solid #303830;
    margin: 0 20px 28px 20px;
    padding-top: 12px;
}

h2 {
    color: #99cc99;
    font-size: 17px;
    font-weight: normal;
    margin: 0 0 10px 0;
}

p {
    margin-top: 0;
}

ul {
    margin-top: 0;
    padding-left: 24px;
}

li {
    margin-bottom: 5px;
}

strong {
    color: #d8ffd8;
    font-weight: bold;
}

.article-page .section {
    margin-bottom: 31px;
}

#game-section {
    border-top: 0;
    padding-top: 0;
}

.foot {
    border-top: 1px solid #303830;
    color: #a8b8a8;
    font-size: 12px;
    margin: 40px 20px 0 20px;
    padding-top: 11px;
    text-align: center;
    text-transform: uppercase;
}

a {
    color: #99cc99;
    text-decoration: none;
}

a:hover,
a:focus {
    background: #132013;
    color: #d8ffd8;
    text-decoration: underline;
}

#game {
    background: #030603;
    border: 1px solid #303830;
    color: #e8e8e0;
    margin: 0;
    padding: 12px;
}

#mode-select {
    align-items: center;
    border-bottom: 1px solid #303830;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 16px;
    padding-bottom: 10px;
}

.mode-label {
    color: #a8b8a8;
    display: inline-block;
    font-size: 13px;
    margin-right: 5px;
}

button,
select {
    background: black;
    border: 1px solid #394839;
    box-sizing: border-box;
    color: #99cc99;
    cursor: pointer;
    font-family: "Lucida Console", Monaco, "Courier New", Courier, monospace;
    font-size: 15px;
    line-height: 1.2;
    margin: 0;
    padding: 8px 9px;
}

select {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
    padding-right: 24px;
    background-image: linear-gradient(45deg, transparent 50%, #99cc99 50%), linear-gradient(135deg, #99cc99 50%, transparent 50%);
    background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

button:hover:not(:disabled),
button:focus:not(:disabled),
select:hover,
select:focus,
.mode-button.active-mode {
    background-color: #132013;
    color: #d8ffd8;
}

button:disabled {
    color: #607060;
    cursor: default;
}

#region-select {
    margin-left: 6px;
}

/* ---- stats + faces ---- */

#stats-and-faces {
    display: flex;
    gap: 16px;
    margin: 18px 0 14px 0;
}

/* balances #stats-block so the faces sit centred on the map, not on the gap beside it */
#stats-and-faces::after {
    content: "";
    flex: 0 0 160px;
}

#stats-block {
    flex: 0 0 160px;
    align-self: flex-end;
    font-size: 14px;
}

#stats-block div {
    white-space: nowrap;
}

#faces {
    display: flex;
    flex: 1 1 auto;
    gap: 8px;
    justify-content: center;
}

#faces figure {
    margin: 0;
    text-align: center;
}

.face-frame {
    background: black;
    border: 1px solid #394839;
    box-sizing: border-box;
    height: 210px;
    overflow: hidden;
    width: 150px;
}

.face-frame img {
    display: block;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    width: 100%;
    -webkit-user-drag: none;
}

#faces figcaption {
    color: #a8b8a8;
    font-size: 12px;
    margin-top: 3px;
}

/* ---- map ---- */

#map {
    background: black;
    border: 1px solid #394839;
    height: 380px;
    margin-bottom: 8px;
    width: 100%;
}

.leaflet-container {
    background: black;
    font-family: "Lucida Console", Monaco, "Courier New", Courier, monospace;
}

.leaflet-bar a,
.leaflet-bar a:hover {
    background: black;
    border-bottom: 1px solid #394839;
    color: #99cc99;
}

.leaflet-bar a:hover {
    background: #132013;
    color: #d8ffd8;
    text-decoration: none;
}

.leaflet-bar {
    border: 1px solid #394839;
    border-radius: 0;
    box-shadow: none;
}

.leaflet-bar a:first-child,
.leaflet-bar a:last-child {
    border-radius: 0;
}

.leaflet-control-attribution {
    display: none;
}

.map-hint {
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid #394839;
    color: #a8b8a8;
    font-size: 12px;
    padding: 2px 7px;
}

/* ---- controls / message ---- */

#controls {
    align-items: stretch;
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    width: 100%;
}

#controls button {
    flex: 0 0 auto;
    white-space: nowrap;
}

#confirm-button {
    flex: 1 1 auto;
}

#message {
    color: #d8ffd8;
    min-height: 1.6em;
    margin-bottom: 0;
}

/* ---- answer panel ---- */

#answer {
    border-top: 1px solid #303830;
    margin-top: 8px;
    padding-top: 10px;
}

#answer h2 {
    margin-bottom: 2px;
}

#answer-meta {
    color: #a8b8a8;
    font-size: 13px;
    margin-bottom: 10px;
}

#answer p {
    margin-bottom: 8px;
}

#answer .label {
    color: #a8b8a8;
}

#answer-literature,
#answer-source {
    color: #a8b8a8;
    font-size: 13px;
}

#answer-similar .sim + .sim::before {
    content: " · ";
    color: #607060;
}

.legend {
    color: #a8b8a8;
    font-size: 12px;
    margin: 0 0 8px 0;
}

.legend .swatch {
    border: 1px solid #99cc99;
    display: inline-block;
    height: 9px;
    margin: 0 4px 0 8px;
    vertical-align: middle;
    width: 14px;
}

.legend .swatch.core { background: rgba(216, 255, 216, 0.45); }
.legend .swatch.ext  { background: rgba(153, 204, 153, 0.18); }

@media screen and (max-width: 560px) {
    body {
        font-size: 14px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .masthead {
        display: block;
    }

    .brand,
    .bar {
        width: 100%;
        text-align: left;
    }

    .bar {
        border-top: 1px solid #303830;
        flex-wrap: wrap;
        margin-top: 13px;
    }

    .bar a {
        margin: 0 4px 0 0;
        padding-left: 9px;
        padding-right: 9px;
    }

    h1 {
        font-size: 25px;
    }

    #stats-and-faces {
        display: block;
    }

    #stats-and-faces::after {
        display: none;
    }

    #stats-block {
        margin-bottom: 12px;
    }

    .face-frame {
        height: 180px;
        width: 128px;
    }

    #map {
        height: 300px;
    }

    #controls,
    #controls button {
        display: block;
        width: 100%;
    }

    #controls button {
        margin-top: 6px;
    }
}

.leaflet-bar a.leaflet-disabled {
    background: black;
    color: #607060;
}
