/* Map Hop only — the question bar, the country card and the country list.
   The page head, HUD, board stage, overlay and panels all come from
   assets/css/game-shell.css. */

/* ---------- the question bar, between the HUD and the map ---------- */
.quest {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 50px;
    padding: 6px 12px;
    margin-bottom: 8px;
    border-radius: var(--r-md);
    border: 1.5px solid var(--line);
    background: var(--paper);
    transition:
        background 0.2s,
        border-color 0.2s;
}
.quest-flag {
    font-size: 30px;
    line-height: 1;
    flex: none;
    /* a flag is a picture, not text — keep it off the reading line */
    filter: drop-shadow(0 2px 5px rgba(27, 34, 64, 0.22));
}
.quest-text {
    font-size: 16px;
    line-height: 1.35;
    color: var(--ink-soft);
}
.quest-text b {
    color: var(--ink);
    font-weight: 700;
    font-size: 18.5px;
}
.quest-skip {
    margin-left: auto;
    flex: none;
}
.quest[data-tone="ask"] {
    background: var(--tint);
    border-color: #cfdcff;
}
.quest[data-tone="right"] {
    background: #e4faf1;
    border-color: #9fe5cb;
}
.quest[data-tone="wrong"] {
    background: #ffeee9;
    border-color: #ffc3b3;
}
.quest[data-tone="reveal"] {
    background: var(--tint-warm);
    border-color: #ffdc9b;
}

/* ---------- country card ---------- */
.ccard {
    display: flex;
    align-items: center;
    gap: 13px;
}
.ccard[data-empty="yes"] {
    opacity: 0.62;
}
.ccard-flag {
    font-size: 34px;
    line-height: 1;
    flex: none;
}
.ccard-name {
    display: block;
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.2;
}
.ccard-cap {
    display: block;
    font-size: 13.5px;
    color: var(--ink-soft);
    margin-top: 3px;
}
.ccard-cap i {
    font-style: normal;
    font-family: "DM Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--blue-deep);
}

/* ---------- continent picker, in the side panel and on the overlay ---------- */
.levels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 18px;
}
.lvl {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 9px;
    align-items: center;
    text-align: left;
    padding: 8px 11px;
    border-radius: var(--r-sm);
    border: 1.5px solid var(--line);
    background: var(--surface);
    transition:
        border-color 0.15s,
        background 0.15s,
        transform 0.15s;
}
.lvl span {
    grid-row: span 2;
    font-size: 26px;
    line-height: 1;
}
.lvl b {
    font-size: 14.5px;
    line-height: 1.15;
    color: var(--ink);
}
.lvl small {
    font-family: "DM Mono", monospace;
    font-size: 10.5px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.lvl:hover {
    border-color: var(--blue);
    transform: translateY(-1px);
}
.lvl[aria-pressed="true"] {
    background: var(--tint);
    border-color: var(--blue);
}
/* on the dark overlay the picker turns glassy */
.ov-levels {
    /* five continents: a centred row that wraps, not a lopsided grid */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 560px;
    margin: 20px auto 0;
}
.ov-levels .lvl {
    width: 128px;
}
.ov-levels .lvl {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
}
.ov-levels .lvl b {
    color: #fff;
}
.ov-levels .lvl small {
    color: rgba(255, 255, 255, 0.7);
}
.ov-levels .lvl[aria-pressed="true"] {
    background: rgba(255, 255, 255, 0.22);
    border-color: #fff;
}

/* ---------- region picker ---------- */
.regions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
}
.regions .filter {
    font-size: 12.5px;
    padding: 7px 12px;
}

/* ---------- the round's countries ---------- */
.clist {
    display: grid;
    /* minmax(0, …) so a long name ellipses instead of widening the panel */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    max-height: 268px;
    overflow-y: auto;
    /* room for the scrollbar so it never sits on top of a name */
    padding-right: 4px;
}
.cbtn {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    text-align: left;
    padding: 5px 7px;
    border-radius: 9px;
    border: 1.5px solid transparent;
    background: var(--paper);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.15;
    color: var(--ink-soft);
    transition:
        background 0.15s,
        color 0.15s,
        border-color 0.15s;
}
.cbtn em {
    font-style: normal;
    font-size: 15px;
    flex: none;
}
.cbtn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cbtn:hover {
    border-color: var(--blue);
    color: var(--ink);
}
.cbtn[data-found="yes"] {
    background: #e4faf1;
    color: #0e7a68;
}
.cbtn[data-found="no"] {
    background: #ffeee9;
    color: #b83b22;
}
/* in the quiz the names are the answers, so they stay hidden until found */
.clist[data-hide="yes"] .cbtn:not([data-found]) span {
    color: transparent;
    background: var(--tint);
    border-radius: 5px;
}
.clist[data-hide="yes"] .cbtn:not([data-found]) em {
    filter: grayscale(1);
    opacity: 0.45;
}
.clist[data-hide="yes"] .cbtn:not([data-found]) {
    pointer-events: none;
}

/* ---------- the overlay's quieter second action ---------- */
.ov-alt {
    display: block;
    margin: 14px auto 0;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: underline;
    text-underline-offset: 4px;
}
.ov-alt:hover {
    color: #fff;
}

/* ---------- board ---------- */
.game {
    --above: 236px; /* the shared allowance plus the question bar */
}
.stage {
    background: #bfe2f6; /* the sea the map sits in, until the map is drawn */
}
.stage canvas {
    cursor: crosshair;
}

@media (max-width: 560px) {
    .quest {
        min-height: 56px;
        padding: 9px 11px;
        gap: 10px;
    }
    .quest-flag {
        font-size: 25px;
    }
    .quest-text {
        font-size: 14.5px;
    }
    .quest-text b {
        font-size: 16.5px;
    }
}
