.mapa-calor-marco *, #university-tooltip * { box-sizing: border-box; }
[hidden] { display: none !important; }
#map { width: 100%; height: calc(100vh - 210px); min-height: 480px; }
#university-tooltip { position: fixed; display: none; width: min(340px, calc(100vw - 24px)); padding: 20px; color: #1F2937; background: rgba(255,255,255,.98); border: 1px solid rgba(0,0,0,.1); border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,.18); backdrop-filter: blur(12px); z-index: 1000; pointer-events: auto; }
.tooltip-back { position: absolute; top: 10px; left: 10px; width: 30px; height: 30px; padding: 0; color: #374151; background: rgba(0,0,0,.05); border: 1px solid rgba(0,0,0,.1); border-radius: 9px; font-size: 20px; line-height: 1; cursor: pointer; }
.tooltip-back:hover, .tooltip-back:focus-visible { color: #111827; background: rgba(59,130,246,.15); outline: none; }
.tooltip-header { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 18px; text-align: center; }
#university-tooltip.has-back .tooltip-header { padding: 0 42px; }
.tooltip-title { max-width: 100%; font-size: 16px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
#university-tooltip.has-back .tooltip-title { max-width: 100%; }
.tooltip-location, .metric-label { color: #6B7280; }
.tooltip-location { margin-top: 4px; font-size: 13px; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.metric { padding: 13px; background: rgba(0,0,0,.04); border-radius: 13px; }
.metric-enlace { cursor: pointer; }
.metric-enlace:hover { background: rgba(0,0,0,.07); }
.metric-value { margin-bottom: 4px; font-size: 21px; font-weight: 700; }
.metric-label { font-size: 10px; letter-spacing: .05em; }
.institution-selector { margin-bottom: 14px; }
.selector-label { margin-bottom: 7px; color: #6B7280; font-size: 10px; letter-spacing: .05em; }
.selector-list { display: grid; gap: 6px; max-height: 180px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: rgba(59,130,246,.45) transparent; }
.selector-list::-webkit-scrollbar { width: 8px; }
.selector-list::-webkit-scrollbar-track { background: transparent; }
.selector-list::-webkit-scrollbar-thumb { background: rgba(59,130,246,.35); border: 2px solid rgba(255,255,255,.98); border-radius: 999px; }
.selector-list::-webkit-scrollbar-thumb:hover { background: rgba(59,130,246,.6); }
.institution-option { width: 100%; padding: 9px 10px; color: #1F2937; background: rgba(0,0,0,.04); border: 1px solid rgba(0,0,0,.08); border-radius: 8px; font: inherit; font-size: 12px; line-height: 1.25; text-align: left; cursor: pointer; }
.institution-option:hover, .institution-option:focus-visible { background: rgba(59,130,246,.12); outline: none; }
.openalex { padding-top: 13px; border-top: 1px solid rgba(0,0,0,.08); }
.openalex-label { margin-bottom: 5px; color: #6B7280; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.openalex-id { color: #1D4ED8; font-family: monospace; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.tooltip-logo { width: 48px; height: 48px; object-fit: contain; background: white; border-radius: 12px; padding: 6px; flex-shrink: 0; }
.mapa-calor-marco { position: relative; }
.mapa-calor-marco .leaflet-container { background: #f5f7fa; font: inherit; }
.map-attribution { position: absolute; right: 0; bottom: 0; padding: 2px 8px; color: #333; background: rgba(255,255,255,.8); font-size: 11px; z-index: 800; pointer-events: none; }
.map-attribution a { color: #0078A8; text-decoration: none; pointer-events: auto; font-size: inherit; }
.map-attribution a:hover { text-decoration: underline; }
.tarjeta-8 .map-attribution { font-size: 9px; padding: 1px 5px; }
.mapa-calor-zoom { position: absolute; top: 48px; right: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 800; }
.mapa-calor-zoom-btn { width: 30px; height: 30px; padding: 0; border: 1px solid rgba(0,0,0,.15); border-radius: 8px; background: rgba(255,255,255,.9); color: #333; font-size: 18px; line-height: 1; cursor: pointer; }
.mapa-calor-zoom-btn:hover { background: #fff; }
.tarjeta-8 .mapa-calor-zoom-btn { width: 24px; height: 24px; font-size: 15px; }
.mapa-calor-etiqueta { background: transparent; border: none; box-shadow: none; color: #fff; font-size: 12px; font-weight: 700; padding: 0; pointer-events: none; }
.mapa-calor-etiqueta::before { display: none; }
.tarjeta-8 .mapa-calor-etiqueta { font-size: 10px; }
