/* ============================================================
   ON3VZ — Worked Countries Map  (subpage of /logbook/)
   Added 2026-07-20. Self-contained: delete worked-countries.{html,js,css}
   and the logbook.html link block to revert.
   ============================================================ */

.wc-wrap { padding-bottom: 5rem; }

/* ── HERO ── */
.wc-hero { padding: 2.5rem 0 1.5rem; border-bottom: 1px solid var(--c-border); }
.wc-back {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08rem;
  color: var(--c-text-3); text-decoration: none; margin-bottom: 1rem;
  transition: color var(--t);
}
.wc-back:hover { color: var(--c-primary); }
.wc-sub { color: var(--c-text-2); font-size: .9rem; max-width: 66ch; margin-top: .35rem; }

.wc-stats { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 1.5rem; }
.wc-stat { display: flex; flex-direction: column; }
.wc-stat-val {
  font-family: var(--f-display); font-size: 1.7rem; font-weight: 700;
  color: var(--c-primary); line-height: 1;
}
.wc-stat-lbl {
  font-family: var(--f-mono); font-size: .62rem; letter-spacing: .12rem;
  color: var(--c-text-3); margin-top: .4rem; text-transform: uppercase;
}

/* ── CONTROLS ── */
.wc-controls {
  display: flex; flex-wrap: wrap; gap: 1.4rem 2rem; align-items: flex-end;
  padding: 1.4rem 0; border-bottom: 1px solid var(--c-border);
}
.wc-ctrl-group { display: flex; flex-direction: column; gap: .55rem; }
.wc-ctrl-group > label {
  font-family: var(--f-mono); font-size: .6rem; letter-spacing: .14rem;
  color: var(--c-text-3); text-transform: uppercase;
}
.wc-chips { display: flex; flex-wrap: wrap; gap: .4rem; max-width: 34rem; }
.wc-chip {
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .05rem;
  padding: .3rem .65rem; border-radius: 5px; cursor: pointer;
  border: 1px solid var(--c-border-hard); background: transparent;
  color: var(--c-text-3); transition: all var(--t);
}
.wc-chip:hover { color: var(--c-text); border-color: var(--c-primary); }
.wc-chip.is-on {
  color: var(--c-primary); border-color: var(--c-primary);
  background: rgba(0,255,136,.08); box-shadow: var(--glow-sm);
}
.wc-ctrl-toggles { gap: .35rem; }
.wc-switch {
  display: flex; align-items: center; gap: .45rem;
  font-family: var(--f-mono); font-size: .7rem; color: var(--c-text-2); cursor: pointer;
}
.wc-switch input { accent-color: var(--c-primary); cursor: pointer; }
.wc-search, .wc-select {
  font-family: var(--f-mono); font-size: .75rem;
  padding: .42rem .7rem; border-radius: 6px;
  border: 1px solid var(--c-border-hard); background: var(--c-surface);
  color: var(--c-text); min-width: 14rem; transition: all var(--t);
}
.wc-select { min-width: 10rem; }
.wc-search:focus, .wc-select:focus {
  outline: none; border-color: var(--c-primary); box-shadow: var(--glow-sm);
}

/* ── MAP ── */
.wc-map-section { padding-top: 1.6rem; }
.wc-map-inner {
  position: relative;
  height: clamp(380px, 62vh, 680px);
  border: 1px solid var(--c-border-hard);
  border-radius: 10px;
  background: var(--c-surface);
  overflow: hidden;
}
.wc-map { width: 100%; height: 100%; display: block; cursor: grab; }
.wc-map:active { cursor: grabbing; }

.wc-sphere { fill: #0a1120; stroke: rgba(0,255,136,.14); stroke-width: 1; }
.wc-graticule { fill: none; stroke: rgba(0,212,255,.10); stroke-width: .5; vector-effect: non-scaling-stroke; }
.wc-country {
  fill: #16233d;
  vector-effect: non-scaling-stroke;
  stroke: rgba(0,255,136,.18);
  stroke-width: .4;
  transition: filter var(--t);
}
/* SOFT FILL (added 2026-07-20): worked countries are filled by JS as an inline
   style; this keeps that fill gentle and lets the outline stay subordinate.
   Delete this block to go back to outline-only. */
.wc-country.is-worked {
  stroke: rgba(0,255,136,.45);
  stroke-width: .45;
  fill-opacity: .82;
  transition: fill-opacity var(--t), filter var(--t);
}
.wc-country.is-worked:hover { fill-opacity: 1; }
.wc-country:hover { filter: brightness(1.35); }
.wc-country.is-found {
  stroke: var(--c-cyan); stroke-width: 1.4;
  filter: drop-shadow(0 0 6px rgba(0,212,255,.8));
}

.wc-home-ring { fill: none; stroke: var(--c-amber); stroke-width: 1.2; opacity: .85; }
.wc-home-dot { fill: var(--c-amber); }
.wc-home-lbl {
  fill: var(--c-amber); font-family: var(--f-mono); font-size: 9px; letter-spacing: .06rem;
}

/* Legend */
.wc-legend {
  position: absolute; left: 14px; bottom: 14px; z-index: 3;
  background: rgba(8,13,24,.86); border: 1px solid var(--c-border-hard);
  border-radius: 8px; padding: .6rem .75rem; backdrop-filter: blur(6px);
  font-family: var(--f-mono); font-size: .62rem; color: var(--c-text-2);
}
.wc-legend-title { letter-spacing: .1rem; color: var(--c-text-3); text-transform: uppercase; margin-bottom: .45rem; }
.wc-legend-scale { display: flex; height: 9px; width: 150px; border-radius: 3px; overflow: hidden; }
.wc-legend-scale span { flex: 1; }
.wc-legend-flat { flex: 1; background: #00ff88; }
.wc-legend-ends { display: flex; justify-content: space-between; margin-top: .25rem; color: var(--c-text-3); }
.wc-legend-row { display: flex; align-items: center; gap: .4rem; margin-top: .5rem; }
.wc-legend-swatch { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.wc-legend-swatch--none { background: #16233d; border: 1px solid rgba(0,255,136,.18); }

/* Zoom controls */
.wc-zoom { position: absolute; right: 14px; top: 14px; z-index: 3; display: flex; flex-direction: column; gap: .35rem; }
.wc-zoom-btn {
  width: 30px; height: 30px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--c-border-hard); background: rgba(8,13,24,.86);
  color: var(--c-text-2); font-family: var(--f-mono); font-size: 1rem; line-height: 1;
  transition: all var(--t);
}
.wc-zoom-btn:hover { color: var(--c-primary); border-color: var(--c-primary); box-shadow: var(--glow-sm); }
.wc-zoom-btn--reset { font-size: .85rem; }

/* Loading */
.wc-loading {
  position: absolute; inset: 0; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,13,24,.92); transition: opacity var(--t-slow);
}
.wc-loading.is-done { opacity: 0; pointer-events: none; }
.wc-loading-inner {
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  font-family: var(--f-mono); font-size: .75rem; color: var(--c-text-2);
}
.wc-loading-inner svg { animation: wc-pulse 1.4s ease-in-out infinite; }
@keyframes wc-pulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

/* Tooltip */
.wc-tip {
  position: absolute; z-index: 6; pointer-events: none; opacity: 0;
  min-width: 170px; max-width: 260px;
  background: rgba(8,13,24,.95); border: 1px solid var(--c-border-hard);
  border-radius: 8px; padding: .55rem .7rem;
  font-family: var(--f-mono); font-size: .68rem; color: var(--c-text-2);
  box-shadow: 0 6px 24px rgba(0,0,0,.55); transition: opacity var(--t);
}
.wc-tip.is-on { opacity: 1; }
.wc-tip-name {
  font-family: var(--f-display); font-size: .78rem; font-weight: 700;
  color: var(--c-primary); margin-bottom: .35rem; line-height: 1.3;
}
.wc-tip-row { display: flex; justify-content: space-between; gap: 1rem; }
.wc-tip-row b { color: var(--c-text); font-weight: 400; text-align: right; }
.wc-tip-none { color: var(--c-text-3); }
.wc-tip-ents {
  margin-top: .4rem; padding-top: .4rem; border-top: 1px solid var(--c-border);
  color: var(--c-cyan); font-size: .64rem; line-height: 1.6;
}
.wc-tip-ents i { color: var(--c-text-3); font-style: normal; }

.wc-map-note {
  font-family: var(--f-mono); font-size: .66rem; color: var(--c-text-3);
  margin-top: .7rem; max-width: 80ch; line-height: 1.7;
}

/* ── COUNTRY LIST ── */
.wc-list-section { padding-top: 2.6rem; }
.wc-list-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem;
}
.wc-list-title {
  font-family: var(--f-display); font-size: 1.1rem; font-weight: 700;
  letter-spacing: .05rem; color: var(--c-text);
}
.wc-country-grid {
  display: grid; gap: .5rem;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.wc-country-card {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: .1rem .6rem; text-align: left; cursor: pointer;
  padding: .5rem .7rem; border-radius: 7px;
  border: 1px solid var(--c-border); background: var(--c-surface);
  transition: all var(--t);
}
.wc-country-card:hover {
  border-color: var(--c-primary); box-shadow: var(--glow-sm); transform: translateY(-1px);
}
.wc-country-card.is-found { border-color: var(--c-cyan); box-shadow: var(--glow-cyan); }
.wc-cc-name { font-family: var(--f-body); font-size: .82rem; color: var(--c-text); line-height: 1.3; }
.wc-cc-meta {
  grid-column: 1; font-family: var(--f-mono); font-size: .58rem;
  letter-spacing: .08rem; color: var(--c-text-3); text-transform: uppercase;
}
.wc-cc-count {
  grid-column: 2; grid-row: 1 / span 2;
  font-family: var(--f-display); font-size: 1rem; font-weight: 700; color: var(--c-primary);
}
.wc-empty {
  grid-column: 1 / -1; font-family: var(--f-mono); font-size: .78rem;
  color: var(--c-text-3); padding: 2rem 0; text-align: center;
}

/* ── UNMAPPED ── */
.wc-unmapped {
  margin-top: 2rem; padding: 1rem 1.1rem;
  border: 1px solid var(--c-border); border-radius: 9px; background: var(--c-surface);
}
.wc-unmapped-title {
  font-family: var(--f-mono); font-size: .62rem; letter-spacing: .12rem;
  text-transform: uppercase; color: var(--c-amber); margin-bottom: .7rem;
}
.wc-unmapped-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.wc-unmapped-chip {
  font-family: var(--f-mono); font-size: .68rem; color: var(--c-text-2);
  padding: .25rem .55rem; border-radius: 5px;
  border: 1px solid var(--c-border-hard); background: rgba(240,165,0,.05);
}
.wc-unmapped-chip i { color: var(--c-text-3); font-style: normal; margin-left: .25rem; }
.wc-unmapped-note {
  font-family: var(--f-mono); font-size: .64rem; color: var(--c-text-3);
  margin-top: .7rem; line-height: 1.7; max-width: 78ch;
}

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
  .wc-stats { gap: 1.2rem; }
  .wc-stat-val { font-size: 1.35rem; }
  .wc-map-inner { height: 60vh; }
  .wc-legend { transform: scale(.9); transform-origin: left bottom; }
  .wc-search { min-width: 100%; }
  .wc-country-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
