/* Dataset atlas — a self-contained, navigable SVG cartographic workspace. */

.dataset-map-page { --map-blue:#0057a8; --map-deep:#003b70; --map-yellow:#f3c400; background: #f3f7fb; }
.map-masthead { position: relative; overflow: hidden; padding: 54px 0 58px; color: #fff; background: var(--map-blue); }
.map-masthead::before { content: ""; position: absolute; inset: 0; opacity: .45; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(90deg, #000, transparent 75%); }
.map-masthead::after { content: ""; position: absolute; width: 520px; height: 520px; right: -120px; top: -330px; border: 1px solid rgba(243,196,0,.24); border-radius: 50%; box-shadow: 0 0 0 60px rgba(243,196,0,.025), 0 0 0 120px rgba(243,196,0,.018); }
.map-masthead-inner { position: relative; z-index: 1; display: flex; align-items: end; justify-content: space-between; gap: 48px; }
.map-title-block { max-width: 850px; }
.map-kicker { margin: 0 0 15px; display: flex; align-items: center; gap: 9px; color: var(--map-yellow); font-size: 12px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.map-title-block h1 { margin: 0; color: #fff; font-size: clamp(42px, 5.4vw, 76px); line-height: .98; letter-spacing: -.055em; }
.map-title-block h1 em { color: var(--map-yellow); font-style: normal; }
.map-title-block > p:last-child { max-width: 680px; margin: 20px 0 0; color: #c9cee9; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.55; }
.map-catalogue-link { min-width: 260px; padding: 15px 17px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; border: 1px solid rgba(255,255,255,.24); border-radius: 14px; background: rgba(255,255,255,.1); color: #fff; text-decoration: none; backdrop-filter: blur(10px); transition: background .2s ease, transform .2s ease; }
.map-catalogue-link:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.map-catalogue-link span:first-child { display: grid; font-size: 13px; font-weight: 800; }
.map-catalogue-link > span:last-child {color:var(--map-yellow);font-size:22px;font-weight:900}
.map-catalogue-link small { color: #aeb5dc; font-size: 10px; font-weight: 600; }
.unified-module-hero .map-masthead-side .map-catalogue-link{min-width:0;padding:0;border:0;border-radius:0;background:transparent;backdrop-filter:none}
.unified-module-hero .map-masthead-side .map-catalogue-link:hover{background:transparent}

.map-shell { position: relative; z-index: 3; max-width: 1640px; margin: 0 auto; padding: 32px 28px 80px; }
.map-workspace { overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.map-workspace:fullscreen { width: 100vw; height: 100vh; border: 0; border-radius: 0; display: flex; flex-direction: column; background: #fff; }
.map-workspace:fullscreen .map-body { flex: 1; min-height: 0; }
.map-workspace:fullscreen .map-stage, .map-workspace:fullscreen .map-side { min-height: 0; height: auto; }

.map-toolbar { min-height: 76px; margin-bottom:18px; padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #d6e0eb; border-radius:16px; background: rgba(255,255,255,.97); box-shadow:0 8px 24px rgba(24,54,91,.06); }
.map-search-wrap { position: relative; width: min(440px, 42vw); height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 15px; border: 1px solid #d9ddec; border-radius: 13px; background: #f6f7fb; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.map-search-wrap:focus-within { border-color: #1e28a5; background: #fff; box-shadow: 0 0 0 4px rgba(30,40,165,.08); }
.map-search-wrap > .material-symbols-outlined { color: #626a91; font-size: 21px; }
.map-search-wrap input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #11184f; font: 700 14px "Source Sans 3", sans-serif; }
.map-search-wrap input::placeholder { color: #7e85a4; }
.map-search-wrap kbd { padding: 4px 7px; border: 1px solid #d6d9e7; border-radius: 6px; background: #fff; color: #777e9c; font: 600 9px "IBM Plex Mono", monospace; }
.map-search-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; overflow: hidden; padding: 7px; border: 1px solid #dce0ed; border-radius: 14px; background: #fff; box-shadow: 0 18px 45px rgba(17,24,79,.18); }
.map-search-result { width: 100%; min-height: 43px; padding: 7px 9px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 9px; background: transparent; color: #11184f; text-align: left; cursor: pointer; }
.map-search-result:hover, .map-search-result:focus-visible { outline: 0; background: #eef0fa; }
.map-search-result i { width: 8px; height: 8px; border-radius: 50%; background: #1e28a5; box-shadow: 0 0 0 4px rgba(30,40,165,.1); }
.map-search-result span { flex: 1; font-size: 13px; font-weight: 800; }
.map-search-result small { color: #69708f; font-size: 11px; }
.map-search-empty { padding: 12px; color: #69708f; font-size: 12px; text-align: center; }
.map-summary { display: flex; align-items: center; gap: 0; color: #69708f; font-size: 11px; font-weight: 700; white-space: nowrap; }
.map-summary > span { padding: 0 16px; display: flex; align-items: center; gap: 6px; border-left: 1px solid #e1e4f0; }
.map-summary > span:first-child { border-left: 0; }
.map-summary strong { color: #11184f; font-size: 14px; }
.summary-dot, .map-live i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #1e28a5; }
.map-live { color: #315f4c; }
.map-live i { background: #56c98b; box-shadow: 0 0 0 4px rgba(86,201,139,.13); }

.map-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap:18px; min-height: 690px; }
.map-stage { position: relative; min-width: 0; overflow: hidden; border:1px solid #d6e0eb;border-radius:18px;background: #eef0f7; box-shadow:0 8px 24px rgba(24,54,91,.06);touch-action: none; }
.map-canvas { position: absolute; inset: 0; display: grid; cursor: grab; user-select: none; }
.map-canvas.is-dragging { cursor: grabbing; }
.map-svg { width: 100%; height: 100%; display: block; outline: none; }
.map-bg { fill: #e9edf5; }
.map-water-glow { fill: url(#waterGlow); }
.map-graticule line { stroke: rgba(30,40,165,.1); stroke-width: 1; stroke-dasharray: 3 7; vector-effect: non-scaling-stroke; }
.map-country-shape { fill: #cfd6e5; stroke: #fff; stroke-width: 1.2; vector-effect: non-scaling-stroke; cursor: pointer; outline: none; transition: fill .16s ease, filter .16s ease; }
.map-country-shape:hover, .map-country-shape:focus-visible { fill: #aeb8d5; filter: drop-shadow(0 2px 3px rgba(17,24,79,.18)); }
.map-country-shape.is-selected { fill: #fad741; stroke: #11184f; stroke-width: 2; filter: drop-shadow(0 6px 8px rgba(17,24,79,.22)); }
.map-marker { cursor: pointer; outline: none; }
.map-marker-halo { fill: rgba(30,40,165,.13); stroke: rgba(30,40,165,.25); stroke-width: 1; vector-effect: non-scaling-stroke; }
.map-marker-core { fill: #1e28a5; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; transition: fill .16s ease, transform .16s ease; transform-box: fill-box; transform-origin: center; }
.map-marker:hover .map-marker-core, .map-marker:focus-visible .map-marker-core { fill: #11184f; transform: scale(1.12); }
.map-marker.is-selected .map-marker-halo { fill: rgba(250,215,65,.42); stroke: #11184f; }
.map-marker.is-selected .map-marker-core { fill: #11184f; }
.map-bubble-count { fill: #fff; font-size: 12px; font-weight: 900; pointer-events: none; }
.map-bubble-label { paint-order: stroke; stroke: #eef0f7; stroke-width: 4px; stroke-linejoin: round; fill: #11184f; font-size: 11px; font-weight: 900; letter-spacing: .01em; pointer-events: none; }

.map-loading { place-self: center; display: grid; justify-items: center; color: #11184f; }
.map-loading strong { margin-top: 16px; font-size: 15px; }
.map-loading small { margin-top: 4px; color: #707795; font-size: 11px; }
.map-loading-mark { height: 30px; display: flex; align-items: end; gap: 4px; }
.map-loading-mark i { width: 7px; border-radius: 4px 4px 2px 2px; background: #1e28a5; animation: map-loading 1s ease-in-out infinite alternate; }
.map-loading-mark i:nth-child(1) { height: 14px; }
.map-loading-mark i:nth-child(2) { height: 28px; animation-delay: -.45s; background: #fad741; }
.map-loading-mark i:nth-child(3) { height: 20px; animation-delay: -.2s; }
@keyframes map-loading { to { height: 9px; opacity: .55; } }

.map-navigation { position: absolute; z-index: 12; top: 18px; right: 18px; overflow: hidden; display: grid; border: 1px solid rgba(17,24,79,.13); border-radius: 13px; background: rgba(255,255,255,.94); box-shadow: 0 10px 30px rgba(17,24,79,.14); backdrop-filter: blur(10px); }
.map-navigation button { width: 43px; height: 42px; display: grid; place-items: center; border: 0; border-top: 1px solid #e2e4ee; background: transparent; color: #11184f; cursor: pointer; }
.map-navigation button:first-child { border-top: 0; }
.map-navigation button:hover { background: #f5d943; }
.map-navigation button .material-symbols-outlined { font-size: 20px; }
.map-navigation > span { height: 7px; border-top: 1px solid #e2e4ee; border-bottom: 1px solid #e2e4ee; background: #f0f1f6; }
.map-gesture-hint { position: absolute; z-index: 10; left: 18px; top: 18px; padding: 9px 12px; display: flex; align-items: center; gap: 7px; border: 1px solid rgba(17,24,79,.1); border-radius: 10px; background: rgba(255,255,255,.86); color: #5f6685; font-size: 10px; font-weight: 750; box-shadow: 0 7px 18px rgba(17,24,79,.08); backdrop-filter: blur(10px); transition: opacity .3s ease; pointer-events: none; }
.map-gesture-hint .material-symbols-outlined { color: #1e28a5; font-size: 16px; }
.map-gesture-hint i { width: 3px; height: 3px; border-radius: 50%; background: #a8aec4; }
.map-gesture-hint.is-hidden { opacity: 0; }
.map-legend { position: absolute; z-index: 10; left: 18px; bottom: 18px; padding: 10px 12px; display: flex; align-items: center; gap: 14px; border: 1px solid rgba(17,24,79,.1); border-radius: 11px; background: rgba(255,255,255,.9); color: #5f6685; font-size: 9px; font-weight: 750; box-shadow: 0 8px 22px rgba(17,24,79,.08); backdrop-filter: blur(10px); pointer-events: none; }
.map-legend span { display: flex; align-items: center; gap: 6px; }
.map-legend i { display: inline-grid; place-items: center; font-style: normal; }
.legend-area, .legend-selected { width: 13px; height: 13px; border: 1px solid #fff; border-radius: 4px; background: #cfd6e5; box-shadow: 0 0 0 1px #c1c7d8; }
.legend-selected { background: #fad741; box-shadow: 0 0 0 1px #11184f; }
.legend-count { width: 19px; height: 19px; border-radius: 50%; background: #1e28a5; color: #fff; font-size: 8px; font-weight: 900; }

.map-side { min-width: 0; height: 690px; padding: 26px 24px 20px; display: flex; flex-direction: column; border:1px solid #d6e0eb;border-radius:18px;background: #fff;box-shadow:0 8px 24px rgba(24,54,91,.06); }
.map-side-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.map-side-eyebrow { margin: 0 0 6px; color: #1e28a5; font: 700 9px "IBM Plex Mono", monospace; letter-spacing: .1em; text-transform: uppercase; }
.map-side h2 { margin: 0; color: #11184f; font-size: 27px; line-height: 1.1; letter-spacing: -.035em; }
.map-side-head button { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 1px solid #dfe2ed; border-radius: 10px; background: #f7f7fa; color: #11184f; cursor: pointer; }
.map-side-head button:hover { background: #fad741; }
.map-side-hint { margin: 12px 0 0; color: #68708e; font-size: 12px; line-height: 1.5; }
.map-side-content { min-height: 0; margin-top: 20px; overflow-y: auto; padding-right: 5px; scrollbar-color: #c8ccdc transparent; scrollbar-width: thin; }
.coverage-heading { margin: 0 0 9px; color: #8288a1; font: 700 9px "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.coverage-heading-row { display: flex; align-items: center; justify-content: space-between; }
.coverage-heading-row strong { min-width: 25px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: #11184f; color: #fff; font-size: 8px; }
.coverage-ranking { display: grid; gap: 7px; }
.all-country-list { padding-bottom: 3px; }
.coverage-country { width: 100%; padding: 11px 12px; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; border: 1px solid #e3e5ef; border-radius: 12px; background: #fff; color: #11184f; text-align: left; cursor: pointer; transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.coverage-country:hover { border-color: #bbc0d9; background: #f8f8fc; transform: translateX(2px); }
.coverage-country > i { color: #737b9a; font: 700 9px "IBM Plex Mono", monospace; font-style: normal; letter-spacing: .04em; }
.coverage-country strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.coverage-country span { min-width: 31px; height: 25px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px; background: #eef0f8; color: #1e28a5; font-size: 10px; font-weight: 900; }
.coverage-tip { margin-top: 18px; padding: 15px; border-radius: 13px; background: #f0f1f8; }
.coverage-tip span { color: #1e28a5; font-size: 19px; }
.coverage-tip strong { display: block; margin-top: 6px; color: #11184f; font-size: 12px; }
.coverage-tip p { margin: 4px 0 0; color: #6d7490; font-size: 10px; line-height: 1.45; }
.selection-stat { margin-bottom: 14px; padding: 14px; display: flex; align-items: center; gap: 12px; border-radius: 14px; background: #11184f; color: #fff; }
.selection-stat strong { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 12px; background: #fad741; color: #11184f; font-size: 20px; }
.selection-stat span { display: grid; font-size: 12px; font-weight: 800; }
.selection-stat small { margin-top: 2px; color: #adb4d8; font-size: 9px; font-weight: 600; }
.map-dataset-row { margin-top: 8px; padding: 11px; display: grid; grid-template-columns: 35px minmax(0,1fr) auto; align-items: center; gap: 10px; border: 1px solid #e2e5ef; border-radius: 13px; color: #11184f; text-decoration: none; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.map-dataset-row:hover { border-color: #aeb4d2; transform: translateY(-1px); box-shadow: 0 7px 18px rgba(17,24,79,.08); }
.map-dataset-row > .material-symbols-outlined:first-child { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; background: #eef0f8; color: #1e28a5; font-size: 18px; }
.map-dataset-text { min-width: 0; display: grid; gap: 3px; }
.map-dataset-text > span:first-child { overflow-wrap: anywhere; font-size: 11px; font-weight: 800; line-height: 1.3; }
.map-dataset-region { color: #737a96; font-size: 9px; font-weight: 700; }
.map-dataset-go { color: #949ab1; font-size: 17px; }
.map-dataset-row:hover .map-dataset-go { color: #1e28a5; }

.map-statusbar { min-height: 48px; margin-top:14px;padding: 10px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border:1px solid #d6e0eb;border-radius:12px;background: #fff; color: #65788d; }
.map-statusbar p { margin: 0; display: flex; align-items: center; gap: 7px; font-size: 9px; line-height: 1.35; }
.map-statusbar .material-symbols-outlined { color: #1e28a5; font-size: 15px; }
.map-error { place-self: center; max-width: 420px; padding: 25px; color: #11184f; text-align: center; }
.map-error .material-symbols-outlined { color: #bd4058; font-size: 32px; }
.map-error a { color: #1e28a5; font-weight: 800; }

@media (max-width: 1100px) {
  .map-masthead-side { display: none; }
  .map-body { grid-template-columns: minmax(0,1fr) 320px; }
  .map-summary > span:nth-child(2) { display: none; }
}

@media (max-width: 820px) {
  .map-masthead { padding: 40px 0 44px; }
  .map-title-block h1 { font-size: clamp(38px, 11vw, 58px); }
  .map-shell { margin-top: 0; padding: 22px 12px 54px; }
  .map-workspace { border-radius: 0; }
  .map-toolbar { align-items: stretch; flex-direction: column; gap: 10px; padding: 12px; }
  .map-search-wrap { width: 100%; }
  .map-summary { justify-content: space-between; }
  .map-summary > span { flex: 1; justify-content: center; }
  .map-summary > span:nth-child(2) { display: flex; }
  .map-body { grid-template-columns: 1fr; }
  .map-stage { min-height: 560px; }
  .map-side { height: auto; max-height: 620px; }
  .map-side-content { max-height: 440px; }
  .map-statusbar { align-items: flex-start; flex-direction: column; gap: 5px; }
}

@media (max-width: 520px) {
  .map-masthead { padding-top: 30px; }
  .map-title-block h1 br { display: none; }
  .map-title-block h1 br + em::before { content: " "; }
  .map-title-block > p:last-child { font-size: 15px; }
  .map-search-wrap kbd, .map-summary > span:nth-child(2), .map-live { display: none; }
  .map-summary > span { border: 0; }
  .map-stage { min-height: 500px; }
  .map-gesture-hint { right: 70px; line-height: 1.2; }
  .map-gesture-hint i, .map-gesture-hint i + * { display: none; }
  .map-legend { right: 14px; left: 14px; justify-content: center; gap: 9px; }
  .map-legend span { font-size: 0; }
  .map-legend i { font-size: 8px; }
  .map-navigation { top: 14px; right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .map-loading-mark i { animation: none; }
  .map-country-shape, .map-marker-core, .coverage-country, .map-dataset-row { transition: none; }
}

/* `.map-side-head button` fija display: grid, y eso gana al atributo hidden:
   el aspa de "quitar el pais elegido" se veia tambien sin pais elegido. */
.map-side-head button[hidden] { display: none; }
