/* ═══════════════════════════════════════════════════════════════════
   WORLD MARKETS  —  market-map/world/world.css
   Usa la base de marketMap.css (layout, hero, switch, pills, barra de índices).
   Aquí: la nota de la categoría, el detalle (precio + gráfica + datos) y la lista.
   ═══════════════════════════════════════════════════════════════════ */

.wm-page { gap: 18px; }

.mk-hero .mm-pill i { font-size: 11px; margin-right: 3px; opacity: .85; }
.wm-catnote { margin: 14px auto 0; max-width: 640px; font: 500 13.5px/1.55 'Inter', sans-serif; color: #6b7b80; }
.wm-catnote b { color: #16242a; font-weight: 700; }

/* ── Layout: detalle a la izquierda (ancho), lista a la derecha ── */
.wm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}
.wm-card {
  background: #fff;
  border: 1px solid rgba(22, 36, 42, 0.09);
  border-radius: 22px;
  box-shadow: 0 6px 18px rgba(22, 36, 42, 0.05);
  padding: 22px 24px;
  min-width: 0;
}

/* ── Encabezado del detalle ── */
.wm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.wm-head__id { min-width: 0; flex: 1 1 320px; }
.wm-kicker { display: flex; align-items: center; gap: 8px; font: 600 12px 'Inter', sans-serif; color: #6b7b80; }
.wm-chip { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #285260; background: #dcebec; padding: 3px 7px; border-radius: 999px; }
.wm-name { margin: 6px 0 0; font: 800 clamp(22px, 2.6vw, 28px)/1.1 'Inter', sans-serif; letter-spacing: -0.03em; color: #16242a; }
.wm-name small { font-size: .6em; font-weight: 600; color: #8a979b; letter-spacing: 0; margin-left: 6px; }
.wm-desc { margin: 8px 0 0; font: 500 13.5px/1.55 'Inter', sans-serif; color: #5c6b70; max-width: 560px; }
.wm-head__price { text-align: right; flex: 0 0 auto; }
.wm-price { font: 800 clamp(26px, 3vw, 34px)/1 'Inter', sans-serif; letter-spacing: -0.03em; color: #16242a; font-variant-numeric: tabular-nums; }
.wm-price small { font-size: .45em; font-weight: 600; color: #8a979b; margin-left: 4px; letter-spacing: 0; }
.wm-change { margin-top: 6px; font: 700 14px 'Inter', sans-serif; font-variant-numeric: tabular-nums; }
.wm-asof { margin-top: 4px; font: 500 11.5px 'Inter', sans-serif; color: #8a979b; }
.wm-asof .wm-live { display: inline-flex; align-items: center; gap: 5px; color: #1a9e5c; font-weight: 700; }
.wm-asof .wm-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #1a9e5c; animation: wmPulse 1.6s ease-in-out infinite; }
@keyframes wmPulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.pos { color: #1a9e5c; }
.neg { color: #e0393e; }
.neutro { color: #6b7b80; }

/* ── Gráfica (misma forma que la del ETF / Summary) ── */
.wm-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 8px; }
.wm-range-change { font: 700 15px 'Inter', sans-serif; font-variant-numeric: tabular-nums; min-height: 20px; }
.wm-range-change__l { color: #6b7b80; font-weight: 500; font-size: 13px; }
.wm-ranges { display: flex; gap: 2px; flex-wrap: wrap; }
.wm-ranges button {
  border: 0; background: transparent; cursor: pointer; border-radius: 8px;
  padding: 6px 10px; font: 700 12px 'Inter', sans-serif; color: #6b7b80; transition: background .15s, color .15s;
}
.wm-ranges button:hover { background: #f1f4f5; color: #16242a; }
.wm-ranges button.on { background: #16242a; color: #fff; }
.wm-ranges button[hidden] { display: none; }
.wm-chart-box { position: relative; height: 340px; }
.wm-chart-msg {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 500 13px 'Inter', sans-serif; color: #8a979b; background: rgba(255,255,255,.7); border-radius: 12px; pointer-events: none;
}
.wm-chart-msg[hidden] { display: none; }
.wm-tip {
  position: absolute; z-index: 5; pointer-events: none; opacity: 0; transition: opacity .12s;
  background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.10);
  padding: 8px 11px; display: flex; flex-direction: column; min-width: 120px;
}
.wm-tip__d { font-size: 10px; font-weight: 500; color: #9aa0a6; letter-spacing: .03em; text-transform: uppercase; margin-bottom: 4px; white-space: nowrap; }
.wm-tip__p { font-size: 16px; font-weight: 700; color: #202124; letter-spacing: -.02em; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.wm-tip__c { font-size: 12px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── Datos clave ── */
.wm-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.wm-fact { background: #f6f8f8; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wm-fact__l { font-size: 11.5px; color: #6b7b80; font-weight: 600; }
.wm-fact__v { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; color: #16242a; }
.wm-fact__v--range { font-size: 15px; letter-spacing: -0.01em; white-space: normal; line-height: 1.3; }
.wm-fact__s { font-size: 11.5px; color: #6b7b80; line-height: 1.3; }
.wm-learn { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: #f3f8f8; border: 1px dashed rgba(84, 140, 146, .45); font: 500 13px/1.55 'Inter', sans-serif; color: #3c4f55; }
.wm-learn:empty { display: none; }
.wm-learn b { color: #285260; }

/* ── Lista ── */
.wm-list-card { padding: 16px 12px 12px; position: sticky; top: 92px; }
.wm-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 10px 10px; }
.wm-list-title { margin: 0; font: 800 15px 'Inter', sans-serif; letter-spacing: -0.01em; color: #16242a; }
.wm-list-sub { font: 500 11.5px 'Inter', sans-serif; color: #8a979b; white-space: nowrap; }
.wm-list { display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 200px); overflow: auto; padding-right: 2px; }
.wm-list::-webkit-scrollbar { width: 6px; }
.wm-list::-webkit-scrollbar-thumb { background: rgba(22,36,42,.14); border-radius: 999px; }
.wm-group { padding: 10px 10px 4px; font: 800 10.5px 'Inter', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #8a979b; }
.wm-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 64px auto; align-items: center; gap: 10px;
  width: 100%; text-align: left; border: 0; cursor: pointer; background: transparent;
  padding: 9px 10px; border-radius: 12px; font-family: 'Inter', sans-serif; transition: background .12s;
}
.wm-row:hover { background: #f3f6f7; }
.wm-row.is-on { background: #e7f0f1; box-shadow: inset 3px 0 0 #285260; }
.wm-row__txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wm-row__n { font-size: 13.5px; font-weight: 700; color: #16242a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wm-row__c { font-size: 11px; font-weight: 600; color: #8a979b; }
.wm-row__spark { width: 64px; height: 26px; }
.wm-row__spark polyline { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.wm-row__num { text-align: right; min-width: 78px; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; gap: 1px; }
.wm-row__p { font-size: 13.5px; font-weight: 700; color: #16242a; }
.wm-row__ch { font-size: 11.5px; font-weight: 700; }
.wm-row.is-skel { height: 46px; background: linear-gradient(90deg, #f3f6f7 25%, #e9eeef 50%, #f3f6f7 75%); background-size: 200% 100%; animation: wmSkel 1.3s linear infinite; }
@keyframes wmSkel { to { background-position: -200% 0; } }
.wm-empty { padding: 20px 10px; font: 500 13px 'Inter', sans-serif; color: #8a979b; text-align: center; }
.wm-note { text-align: center; }

/* ── Teléfono / tablet ── */
@media (max-width: 980px) {
  .wm-layout { grid-template-columns: 1fr; }
  .wm-list-card { position: static; }
  .wm-list { max-height: none; }
}
@media (max-width: 600px) {
  .wm-card { padding: 16px 14px; border-radius: 18px; }
  .wm-head__price { text-align: left; }
  .wm-chart-box { height: 260px; }
  .wm-ranges { width: 100%; justify-content: space-between; }
  .wm-ranges button { padding: 7px 7px; }
  .wm-facts { grid-template-columns: 1fr 1fr; }
  .wm-fact__v { font-size: 16px; }
  .wm-list-card { padding: 12px 8px 8px; }
}
