/*VARIABLES*/
:root {
    --color-background: #111118;
    --color-message: #eeeef4;
    --color-message-alt: #9294a8;
    --color-message-link: #9294a8;
    --color-map-unvisited-fill: #b4bac8;
    --color-map-unvisited-fill-hover: #a4aab8;
    --color-map-unvisited-stroke: #787e96;
    --color-map-visited-fill: #00c46a;
    --color-map-visited-fill-hover: #00b060;
    --color-map-visited-stroke: #007d3f;

    --transition-hover: 50ms;
    --transition-load: 700ms ease-in-out;

    font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
    font-size: 16px;
}

/*RESET*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

/*PAGE*/
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-background);
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    overflow: hidden;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cline x1='10' y1='0' x2='10' y2='8' stroke='white' stroke-width='1'/%3E%3Cline x1='10' y1='12' x2='10' y2='20' stroke='white' stroke-width='1'/%3E%3Cline x1='0' y1='10' x2='8' y2='10' stroke='white' stroke-width='1'/%3E%3Cline x1='12' y1='10' x2='20' y2='10' stroke='white' stroke-width='1'/%3E%3C/svg%3E") 10 10, crosshair;
}

/*HEADER — thin top bar*/
.header {
    flex-shrink: 0;
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 10px 16px;
    color: var(--color-message);
    z-index: 2;
}

.header__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.header__explainer {
    display: contents;
}

/*BODY TEXT*/
p {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    color: var(--color-message-alt);
    letter-spacing: 0.02em;
}

/*COMPLETION*/
.header__completion {
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: auto;
}

/*MAP*/
.map-container {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
}

.map-container svg {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/*COUNTIES*/
.map-container svg:focus {
    outline: none;
}

.county {
    fill: url(#unvisited-hatch);
    stroke: var(--color-map-unvisited-stroke);
    stroke-width: 0.75;
    fill-opacity: 1;
    fill-rule: evenodd;
    stroke-linejoin: round;
    stroke-miterlimit: 4;
    stroke-dasharray: none;
    transition: var(--transition-load);
}

.county--visited {
    fill: var(--color-map-visited-fill);
    stroke: var(--color-map-visited-stroke);
}

.county:hover,
.county--keyboard-focus {
    fill: var(--color-map-unvisited-fill-hover);
    transition: var(--transition-hover) !important;
}

.county--visited:hover,
.county--visited.county--keyboard-focus {
    fill: var(--color-map-visited-fill-hover);
    transition: var(--transition-hover) !important;
}

/*TOOLTIP*/
.mouse-label {
    position: fixed;
    z-index: 10;
    color: #1a0812;
    margin: 0;
    padding: 7px 14px;
    background: #f0407a;
    opacity: 0;
    transition: opacity 250ms ease;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    pointer-events: none;
    white-space: nowrap;
}

.mouse-label.shown {
    opacity: 1;
}
