/* mode 3: Country Names Quick, a clickable map with a panel for naming the marked countries. Builds on ../ww.css. */
.ww-place { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 980px) { .ww-place { grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; } }
.ww-mapwrap { position: relative; background: #F7F4EC; border: 2px solid #330000; display: flex; justify-content: center; overflow: hidden; }
.ww-map { display: block; width: min(100%, calc(72vh * var(--ratio, 2))); height: auto; touch-action: none; user-select: none; cursor: grab; }
.ww-mapwrap--end { margin-top: 2rem; }

.ww-map path { stroke: #EDEAE3; stroke-width: 0.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.ww-map .ctx { fill: #E4DFD2; }
.ww-map .pool { fill: #CFC8B7; }
.ww-map .mk { fill: #E72604; stroke: #330000; stroke-width: 1; cursor: pointer; }
@media (hover: hover) { .ww-map .mk:hover { fill: #ff4a26; } }
.ww-map .mk.is-named { fill: #330000; stroke: #EDEAE3; }
.ww-map .mk.is-selected { stroke: #330000; stroke-width: 3; }
.ww-map .mk:focus-visible { outline: none; stroke: #330000; stroke-width: 3; }
.ww-map .mk.is-right { fill: #330000; stroke: #EDEAE3; cursor: default; }
.ww-map .mk.is-wrong { fill: #E72604; stroke: #330000; cursor: default; }
.ww-map .badge { cursor: pointer; }
.ww-map .badge circle { fill: #F7F4EC; stroke: #330000; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.ww-map .badge text { font: 900 12px "Archivo", Arial, sans-serif; fill: #330000; pointer-events: none; }
.ww-map .badge.is-named circle { fill: #330000; }
.ww-map .badge.is-named text { fill: #EDEAE3; }
.ww-map .badge.is-selected circle { stroke-width: 3.5; }
.ww-map .badge.is-right circle { fill: #330000; }
.ww-map .badge.is-right text { fill: #EDEAE3; }
.ww-map .badge.is-wrong circle { fill: #E72604; }
.ww-map .badge.is-wrong text { fill: #330000; }
.ww-mapwrap--end .badge { cursor: default; }
.ww-zoom { position: absolute; top: 0.6rem; right: 0.6rem; display: flex; flex-direction: column; gap: 0.3rem; }
.ww-zoom button { width: 2.2rem; height: 2.2rem; padding: 0; font: 900 1.2rem/1 "Archivo", Arial, sans-serif; color: #330000; background: #F7F4EC; border: 2px solid #330000; border-radius: 0; cursor: pointer; }
.ww-zoom button:focus-visible { background: #330000; color: #EDEAE3; }
@media (hover: hover) { .ww-zoom button:hover { background: #330000; color: #EDEAE3; } }

.ww-panel { display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
.ww-pick { padding: 0.8rem; border: 2px solid #330000; }
.ww-pick .label { margin: 0 0 0.6rem; }
.ww-pick input { box-sizing: border-box; width: 100%; padding: 0.55rem 0.7rem; font: 800 1rem "Archivo", Arial, sans-serif; color: #330000; background: #fff; border: 2px solid #330000; border-radius: 0; }
.ww-pick input:disabled { background: transparent; opacity: 0.5; }
.ww-picklist { margin: 0.5rem 0 0; padding: 0; list-style: none; max-height: 13rem; overflow-y: auto; border-top: 1px solid rgba(51, 0, 0, 0.3); }
.ww-picklist .opt { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.4rem 0.5rem; font-weight: 800; cursor: pointer; border-bottom: 1px solid rgba(51, 0, 0, 0.15); }
.ww-picklist .opt.is-active { background: #330000; color: #EDEAE3; }
@media (hover: hover) { .ww-picklist .opt:hover { background: #330000; color: #EDEAE3; } }
.ww-picklist .opt.is-here { text-decoration: underline; }
.ww-picklist .used { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; opacity: 0.65; align-self: center; }
.ww-picklist .none { padding: 0.5rem; font-weight: 700; opacity: 0.7; }
.ww-pick .ww-link { margin-top: 0.7rem; }
.ww-marks { margin: 0; padding: 0; list-style: none; border-top: 2px solid #330000; }
.ww-marks .markrow { display: flex; align-items: baseline; gap: 0.7rem; width: 100%; padding: 0.35rem 0.4rem; text-align: left; font: 800 0.95rem "Archivo", Arial, sans-serif; color: #330000; background: none; border: 0; border-bottom: 1px solid rgba(51, 0, 0, 0.25); border-radius: 0; cursor: pointer; }
.ww-marks .markrow .n { flex: none; min-width: 1.4rem; font-variant-numeric: tabular-nums; }
.ww-marks .markrow:not(.is-named) .a { opacity: 0.5; font-weight: 700; }
.ww-marks .markrow:focus-visible { background: rgba(51, 0, 0, 0.1); }
@media (hover: hover) { .ww-marks .markrow:hover { background: rgba(51, 0, 0, 0.1); } }
.ww-marks .markrow.is-selected { background: #330000; color: #EDEAE3; }
.ww-panel .ww-feedback { min-height: 1.4rem; margin: 0; font-size: 0.9rem; }
.ww-panel .ww-actions { margin-top: 0; }

/* compact panel: the ten answers in two columns, so the Finish button stays on screen next to the map */
@media (min-width: 980px) { .ww-place { grid-template-columns: minmax(0, 1fr) 320px; } }
.ww-picklist { max-height: 10rem; }
.ww-marks { display: grid; grid-auto-flow: column; grid-template-rows: repeat(5, auto); column-gap: 0.6rem; }
.ww-marks .markrow { gap: 0.4rem; padding: 0.3rem 0.35rem; font-size: 0.85rem; }
.ww-marks .markrow .a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ww-marks .markrow .n { min-width: 1.1rem; }

@media (max-width: 640px) {
  .ww-place { gap: 0.5rem; }
  .ww-panel { gap: 0.45rem; }
  .ww-pick { padding: 0.5rem; }
  .ww-pick .label { margin-bottom: 0.35rem; font-size: 0.72rem; }
  .ww-pick input { padding: 0.4rem 0.55rem; }
  .ww-picklist { max-height: 7.5rem; margin-top: 0.35rem; }
  .ww-picklist .opt { padding: 0.3rem 0.45rem; }
  .ww-marks .markrow { padding: 0.22rem 0.3rem; font-size: 0.8rem; }
  .ww-zoom button { width: 1.9rem; height: 1.9rem; }
}

/* review map: a small right/wrong marker on the corner of each numbered badge */
.ww-map .badge .tick circle { stroke: #F7F4EC; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ww-map .badge .tick text { font: 900 10px "Archivo", Arial, sans-serif; pointer-events: none; }
.ww-map .badge.is-right .tick circle { fill: #330000; }
.ww-map .badge.is-right .tick text { fill: #EDEAE3; }
.ww-map .badge.is-wrong .tick circle { fill: #E72604; stroke: #330000; }
.ww-map .badge.is-wrong .tick text { fill: #330000; }

/* the big list of all countries under the map */
.ww-left { display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
.ww-biglist .label { margin: 0 0 0.5rem; }
#biglist { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0.3rem; }
#biglist .bn { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; width: 100%; padding: 0.38rem 0.55rem; text-align: left; font: 800 0.85rem/1.15 "Archivo", Arial, sans-serif; color: #330000; background: transparent; border: 1.5px solid rgba(51, 0, 0, 0.45); border-radius: 0; cursor: pointer; }
#biglist .bn .tag { flex: none; font-size: 0.68rem; font-weight: 900; opacity: 0.7; }
#biglist .bn.is-used { opacity: 0.5; }
#biglist .bn.is-here { background: #330000; color: #EDEAE3; border-color: #330000; }
@media (hover: hover) { #biglist .bn:hover { background: #330000; color: #EDEAE3; opacity: 1; } }
#biglist .bn:focus-visible { background: #330000; color: #EDEAE3; opacity: 1; }
@media (min-width: 980px) { .ww-panel { position: sticky; top: 4.2rem; } }
@media (max-width: 640px) {
  #biglist { grid-template-columns: 1fr 1fr; max-height: 36vh; overflow-y: auto; padding-right: 0.2rem; }
  #biglist .bn { padding: 0.3rem 0.45rem; font-size: 0.8rem; }
  .ww-biglist .label { font-size: 0.7rem; }
}

#biglist li[hidden] { display: none; }
@media (max-width: 640px) { .ww-picklist { display: none; } }

/* the banner after Finish was pressed with countries still unnamed, and the outline on those countries */
.ww-warn { margin: 0 0 0.8rem; padding: 0.7rem 0.9rem; border: 2px solid #E72604; background: #fff3ef; font-weight: 800; }
.ww-warn p { margin: 0 0 0.5rem; }
.ww-warn .ww-actions { margin-top: 0.3rem; min-height: 0; }
.ww-map .mk.is-missing, .ww-map .dot.is-missing circle, .ww-map .badge.is-missing circle { stroke: #330000; stroke-width: 3.5; animation: ww-missing 0.8s ease-in-out 5; }
@keyframes ww-missing { 50% { stroke-width: 6; } }
@media (prefers-reduced-motion: reduce) { .ww-map .mk.is-missing, .ww-map .dot.is-missing circle, .ww-map .badge.is-missing circle { animation: none; } }

/* result map: the right name on top of each wrong country, and a map that can be zoomed */
.ww-map .lbl rect { fill: #fff; stroke: #330000; stroke-width: 1; vector-effect: non-scaling-stroke; }
.ww-map .lbl text { font: 800 11px "Archivo", Arial, sans-serif; fill: #000; pointer-events: none; white-space: pre; }
.ww-map .labels { pointer-events: none; }
.ww-mapwrap--end .ww-map { cursor: grab; touch-action: pan-y pinch-zoom; }
.ww-mapwrap--end .ww-map.is-zoomed { touch-action: none; }
.ww-endnote { margin-top: 0.5rem; }
