/* ============================================================
 * editorial-premium.css · 2026-05-10
 * Bundle premium UI: NProgress · reading progress · anchor # · skeletons
 * Tippy theme override
 * Pair: editorial-premium.js
 * ============================================================ */

/* ─── NProgress: barra de carga top-of-page (estilo YouTube/Medium) ─── */
#nprogress {
  pointer-events: none;
  position: relative;
  z-index: 99999;
}
#nprogress .bar {
  background: var(--oc-navy);
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  z-index: 99999;
}
#nprogress .peg {
  display: block;
  position: absolute;
  right: 0px;
  width: 100px;
  height: 100%;
  box-shadow: 0 0 10px var(--oc-navy), 0 0 5px var(--oc-navy-800);
  opacity: 1.0;
  transform: rotate(3deg) translate(0px, -4px);
}
.nprogress-custom-parent { overflow: hidden; position: relative; }
.nprogress-custom-parent #nprogress .bar { position: absolute; }

/* ─── Reading progress bar (solo /fallo/* y /oficio/*) ─── */
.nv-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--oc-navy);
  z-index: 99998;
  transition: width .12s linear;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(15,33,71,0.15);
}

/* ─── Anchor # on hover (h2/h3/h4) ─── */
.nv-h-anchor {
  position: relative;
  scroll-margin-top: 84px;
}
.nv-h-anchor .nv-anchor-link {
  position: absolute;
  left: -22px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  color: var(--oc-line-2);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.85em;
  font-family: var(--font-sans);
  padding: 0 4px;
  transition: opacity .15s, color .15s;
}
.nv-h-anchor:hover .nv-anchor-link,
.nv-h-anchor:focus-within .nv-anchor-link {
  opacity: 1;
}
.nv-h-anchor .nv-anchor-link:hover {
  color: var(--oc-navy);
}
.nv-h-anchor .nv-anchor-link.copied::after {
  content: " ¡copiado!";
  font-size: 11px;
  color: var(--oc-ok-strong);
  font-family: var(--oc-font-sans);
  margin-left: 4px;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .nv-h-anchor .nv-anchor-link { left: auto; right: 0; opacity: 0.4; position: static; transform: none; margin-left: 6px; }
}

/* ─── Skeleton loaders shimmer ─── */
.nv-skeleton {
  display: inline-block;
  height: 1em;
  width: 100%;
  background: linear-gradient(
    90deg,
    var(--oc-bg-alt) 0%,
    var(--oc-bg) 50%,
    var(--oc-bg-alt) 100%
  );
  background-size: 200% 100%;
  animation: nv-skel-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--oc-r-sm);
  vertical-align: middle;
}
.nv-skeleton-block {
  display: block;
  width: 100%;
  height: 14px;
  margin: 6px 0;
  background: linear-gradient(90deg, var(--oc-bg-alt) 0%, var(--oc-bg) 50%, var(--oc-bg-alt) 100%);
  background-size: 200% 100%;
  animation: nv-skel-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--oc-r-sm);
}
.nv-skeleton-block.short { width: 60%; }
.nv-skeleton-block.tall { height: 22px; }
.nv-skeleton-block.title { height: 28px; width: 70%; margin-bottom: 14px; }
@keyframes nv-skel-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .nv-skeleton, .nv-skeleton-block { animation: none; background: var(--oc-bg-alt); }
}

/* ─── Tippy.js theme override (navy + serif + sin border genérico) ─── */
.tippy-box[data-theme~='nv'] {
  background-color: var(--oc-navy);
  color: var(--oc-bg);
  font-family: var(--oc-font-sans);
  font-size: 12.5px;
  line-height: 1.5;
  border-radius: var(--oc-r);
  padding: 4px 2px;
  box-shadow: 0 4px 14px rgba(15,33,71,0.25), 0 1px 4px rgba(11,30,63,0.08);
  letter-spacing: 0.01em;
}
.tippy-box[data-theme~='nv'] .tippy-content {
  padding: 6px 10px;
  max-width: 320px;
}
.tippy-box[data-theme~='nv'] .tippy-arrow { color: var(--oc-navy); }
.tippy-box[data-theme~='nv'] strong {
  color: var(--oc-warn);
  font-weight: 600;
}
.tippy-box[data-theme~='nv'] .nv-tt-meta {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  color: rgba(246,247,250,0.65);
  font-variant-numeric: tabular-nums slashed-zero;
}
.tippy-box[data-theme~='nv'] code {
  font-family: var(--oc-font-mono);
  font-size: 11.5px;
  background: rgba(255,255,255,0.08);
  padding: 1px 5px;
  border-radius: var(--oc-r-sm);
}

/* RIT badge subtle hover hint */
.nv-rit-tt { cursor: help; border-bottom: 1px dotted var(--oc-line-2); transition: border-color .15s; }
.nv-rit-tt:hover { border-bottom-color: var(--oc-navy); }
