/* artists-map.css — the music map on /artists/ (artists-map.js). Uses seo.css's tokens (--flame, --bone, --pixel, --line…);
   no colour of its own except the genres', which come with the data. Runs full width in the hero; the readable list of
   artists by country sits below it in the page and needs none of this. */
.amap { position: relative; margin: 6px 0 6px; column-span: all; break-inside: avoid; }
.more > h2.amap-h { column-span: all; }   /* the map spans both content columns on a wide screen */
.amap-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 0 0 8px; }
.amap-total { color: var(--bone-dim); font-size: .85em; margin: 0; }
/* jump to a country: filled by the script (hidden until the planet is up — without JS the list below does the job) */
.amap-jump { font: inherit; font-size: .82em; color: var(--bone); background: var(--box); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 6px 30px 6px 12px; max-width: 100%; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--flame) 50%), linear-gradient(135deg, var(--flame) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
[dir="rtl"] .amap-jump { padding: 6px 12px 6px 30px; background-position: 15px 52%, 10px 52%; }
.amap:not(.amap-ready) .amap-jump { visibility: hidden; }   /* its room held until the planet is up (no shift) */
.amap-failed .amap-jump, .amap-nojs .amap-jump { display: none; }
.amap-gsel { display: none; }   /* the genre filter as a dropdown: phones only (below) */
.amap-stage { position: relative; width: 100%; min-height: 320px; border-radius: 18px; overflow: hidden; direction: ltr;   /* the globe's overlay is placed from the left: an RTL page would push the pins off */
  background: radial-gradient(circle at 50% 46%, rgba(255,196,78,.07), rgba(0,0,0,0) 58%); }
.amap-stage canvas { display: block; outline: none; cursor: grab; }
.amap-stage canvas:active { cursor: grabbing; }
/* before the globe arrives: a quiet ring, so the hero does not jump (the stage keeps its height) */
.amap:not(.amap-ready) .amap-stage { aspect-ratio: 1 / .92; min-height: 340px; max-height: min(86vh, 860px); }   /* = the globe's own size (artists-map.js: w × .92, 340 … 86vh, 860) */
.amap:not(.amap-ready) .amap-stage::after { content: ""; position: absolute; top: 8%; left: 50%; translate: -50% 0; width: min(64%, 480px); aspect-ratio: 1;
  border-radius: 50%; border: 1px solid var(--line); box-shadow: 0 0 60px rgba(255,196,78,.08) inset; }
.amap-loading .amap-stage::after { animation: amap-breathe 2.4s ease-in-out infinite; }
@keyframes amap-breathe { 50% { box-shadow: 0 0 90px rgba(255,196,78,.18) inset; border-color: var(--line-strong); } }
.amap-failed .amap-stage, .amap-nojs .amap-stage { display: none; }
.amap-failed .amap-genres, .amap-failed .amap-panel { display: none; }   /* no planet (no WebGL): its filter chips and "tap a country" mean nothing — the list by country below carries it */

/* the genre chips — the filter (one per genre that has placed artists, in its colour) */
.amap-genres { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; }
.amap-chip { font: inherit; font-size: .78em; color: var(--text); background: var(--box); border: 1px solid var(--hair); border-radius: 999px;
  padding: 3px 10px 3px 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.amap-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--g, var(--flame)); box-shadow: 0 0 6px var(--g, var(--flame)); }
.amap-chip[aria-pressed="true"] { border-color: var(--g, var(--flame)); color: var(--bone); }
.amap-chip:hover { border-color: var(--line-strong); }

/* the pins on the globe (HTML over the canvas: Arabic and accented names render) */
.amap-pin { font: inherit; font-size: 11px; line-height: 1; display: inline-flex; align-items: center; gap: 5px; translate: -50% -50%;
  background: rgba(5,5,8,.78); color: var(--bone); border: 1px solid var(--pin, var(--flame)); border-radius: 999px; padding: 3px 8px 3px 3px;
  cursor: pointer; white-space: nowrap; transition: opacity .25s; backdrop-filter: blur(2px); }
.amap-pin span { unicode-bidi: plaintext; }
.amap-pin i { font-style: normal; font-family: var(--pixel); min-width: 18px; height: 18px; display: inline-grid; place-items: center; border-radius: 999px;
  background: var(--pin, var(--flame)); color: #050508; font-size: 10px; padding: 0 4px; }
.amap-pin:hover, .amap-pin:focus-visible { background: #000; }
/* a pin is its count; the name opens on hover, focus or when picked (the Levant's pins sit on top of each other) */
.amap-pin { padding: 2px; gap: 0; }
.amap-pin span { display: none; }
.amap-pin:hover, .amap-pin:focus-visible, .amap-pin.on { gap: 5px; padding: 2px 8px 2px 2px; z-index: 2; position: relative; }
.amap-pin:hover span, .amap-pin:focus-visible span, .amap-pin.on span { display: inline; }

/* the panel: the picked country's artists */
.amap-panel { margin: 10px 0 0; min-height: 2.4em; }
.amap-hint { color: var(--bone-faint); margin: 0; }
.amap-country { margin: 0 0 6px; color: var(--bone-dim); }
.amap-country b { color: var(--bone); font-family: var(--pixel); font-weight: 400; font-size: 1.15em; }
.amap-artists { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 4px 18px; }
.amap-artists li { padding: 3px 0; border-bottom: 1px solid var(--hair); }
.amap-artists small { color: var(--bone-faint); }
.amap-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-inline-start: 6px; vertical-align: middle; }
.amap-tags i { font-style: normal; font-size: .7em; color: var(--g); border: 1px solid var(--g); border-radius: 999px; padding: 0 6px; opacity: .85; }

/* the readable list below (no JS needed): countries, each with its artists */
.by-country h3 { margin: 14px 0 2px; font-weight: 400; color: var(--bone); }
.by-country h3 small { color: var(--bone-faint); }
.by-country p { margin: 0; }
@media (prefers-reduced-motion: reduce) { .amap-loading .amap-stage::after { animation: none; } }

/* the globe's hover tips (countries and artists) */
.amap-tip { font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--bone); background: rgba(5,5,8,.92); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 6px 9px; max-width: 260px; }
.amap-tip b { font-weight: 600; }
.amap-tip i { font-style: normal; font-size: 10.5px; color: var(--g); border: 1px solid var(--g); border-radius: 999px; padding: 0 6px; display: inline-block; margin: 3px 3px 0 0; }
.amap-stage .float-tooltip-kap { background: none !important; padding: 0 !important; }

/* the picked country's card on the globe: its name, then its artists stacked (each with its genre's colour) */
.amap-card { display: flex; flex-direction: column; gap: 1px; translate: 14px -50%; min-width: 150px; max-width: 220px; padding: 7px 10px 8px;
  background: rgba(5,5,8,.86); border: 1px solid var(--pin, var(--flame)); border-radius: 10px; box-shadow: 0 0 24px rgba(0,0,0,.6);
  font-size: 11.5px; line-height: 1.45; backdrop-filter: blur(3px); transition: opacity .25s; }
.amap-card b { color: var(--pin, var(--flame)); font-family: var(--pixel); font-weight: 400; font-size: 12px; margin-bottom: 3px; }
.amap-card a, .amap-card span { color: var(--bone); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-inline-start: 8px; border-inline-start: 2px solid var(--g, var(--flame)); }
.amap-card a:hover, .amap-card a:focus-visible { color: var(--flame); }
.amap-card small { color: var(--bone-faint); padding-inline-start: 10px; }

/* the planet's own buttons: zoom in / out, the whole world, spin — big enough for a thumb */
.amap-ctl { position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; flex-direction: column; gap: 6px; }
.amap-ctl button { width: 40px; height: 40px; border-radius: 50%; font: 600 18px/1 var(--mono); color: var(--bone); cursor: pointer;
  background: rgba(5,5,8,.8); border: 1px solid var(--line-strong); display: grid; place-items: center; backdrop-filter: blur(3px); }
.amap-ctl button:hover { border-color: var(--flame); color: var(--flame); }
.amap-ctl button[aria-pressed="true"] { color: var(--flame); }
.amap-ctl button:last-child { font-size: 12px; }
/* a passing hint ("⌘ / Ctrl + scroll to zoom") */
.amap-toast { position: absolute; left: 50%; bottom: 14px; translate: -50% 6px; z-index: 3; pointer-events: none; opacity: 0;
  font-size: 12px; color: var(--bone); background: rgba(5,5,8,.9); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px;
  white-space: nowrap; transition: opacity .2s, translate .2s; }
.amap-toast.on { opacity: 1; translate: -50% 0; }
/* phones: the controls in a row along the bottom (off the planet's middle), the genres one swipeable line */
@media (max-width: 700px) {
  .amap-ctl { top: auto; bottom: 10px; right: 10px; flex-direction: row; gap: 6px; }
  .amap-ctl button { width: 36px; height: 36px; font-size: 16px; }
  .amap-toast { bottom: 54px; }
  .amap-genres { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-inline: calc(-1 * var(--gutter, 12px));
    padding-inline: var(--gutter, 12px); -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 22px), transparent);
            mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 22px), transparent); }
  .amap-genres::-webkit-scrollbar { display: none; }
  .amap-chip { flex: 0 0 auto; white-space: nowrap; }
  .amap-genres { display: none; }   /* 10-15: one dropdown instead (artists-map.js .amap-gsel) */
  .amap-gsel { display: block; width: 100%; height: 33px; margin: 10px 0 0; }
  .amap:not(.amap-ready):not(.amap-failed) .amap-genres { display: block; height: 33px; padding: 0; overflow: hidden; }   /* the dropdown's room, held until the planet is up (no shift) */
  .amap-jump { flex: 1 1 auto; }
  .amap-bar .amap-jump { flex-basis: 100%; }   /* its own line from the start: filled with country names it wrapped late (a shift) */
}
