/* ═══════════════════════════════════════════════════
   Visor PDF Colmerck — visor-pdf.css v2.1.3
   Minimalist Single-Bar Edition
   !important en todos los estilos para aislar del tema WP.
   ═══════════════════════════════════════════════════ */

/* ── Variables: Modo OSCURO (por defecto) ── */
#vpc-root {
  --vpc-bg: #1a1d23 !important;
  --vpc-bg2: rgba(30, 33, 41, 0.8) !important;
  /* Glass effect */
  --vpc-bg3: #1e2129 !important;
  --vpc-bg-area: #0f1014 !important;
  --vpc-border: rgba(255, 255, 255, .08) !important;
  --vpc-text: #e2e8f0 !important;
  --vpc-muted: #94a3b8 !important;
  --vpc-dim: #64748b !important;
  --vpc-accent: #2cc5b0 !important;
  --vpc-accent2: #0d8a79 !important;
  --vpc-accent-bg: rgba(44, 197, 176, .12) !important;
  --vpc-accent-bdr: rgba(44, 197, 176, .3) !important;
  --vpc-thumb-bg: #13161c !important;
  --vpc-modal-bg: #1e2129 !important;
  --vpc-shadow: rgba(0, 0, 0, .6) !important;
  --vpc-glass: blur(12px) !important;
}

/* ── Variables: Modo CLARO ── */
#vpc-root.vpc-light {
  --vpc-bg: #f8fafc !important;
  --vpc-bg2: rgba(255, 255, 255, 0.8) !important;
  /* Glass effect */
  --vpc-bg3: #ffffff !important;
  --vpc-bg-area: #f1f5f9 !important;
  --vpc-border: rgba(0, 0, 0, .08) !important;
  --vpc-text: #1e293b !important;
  --vpc-muted: #475569 !important;
  --vpc-dim: #64748b !important;
  --vpc-accent: #0d8a79 !important;
  --vpc-accent2: #2cc5b0 !important;
  --vpc-accent-bg: rgba(13, 138, 121, .08) !important;
  --vpc-accent-bdr: rgba(13, 138, 121, .2) !important;
  --vpc-thumb-bg: #e2e8f0 !important;
  --vpc-modal-bg: #ffffff !important;
  --vpc-shadow: rgba(0, 0, 0, .1) !important;
}

/* ── RESET LOCAL ── */
#vpc-root,
#vpc-root * {
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: 'Inter', system-ui, sans-serif !important;
}

#vpc-root {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  min-height: 400px !important;
  max-height: 90vh !important;
  background: var(--vpc-bg-area) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  position: relative !important;
  z-index: 1 !important;
  /* Bajo para no pisar menús de WP */
  color: var(--vpc-text) !important;
  box-shadow: 0 30px 60px var(--vpc-shadow) !important;
  transition: height 0.3s ease !important;
}

/* ── PÍLDORAS FLOTANTES (Compact Hubs) ── */

/* Pill Base */
.vpc-hub-tl,
.vpc-hub-tr,
.vpc-hub-bottom {
  position: absolute !important;
  z-index: 10 !important;
  /* Suficiente para estar sobre el PDF, pero bajo para el sitio */
  display: flex !important;
  align-items: center !important;
  background: var(--vpc-bg2) !important;
  backdrop-filter: var(--vpc-glass) !important;
  -webkit-backdrop-filter: var(--vpc-glass) !important;
  border: 1px solid var(--vpc-border) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
}

/* Top Left: Thumbnails Toggle */
.vpc-hub-tl {
  top: 16px !important;
  left: 16px !important;
  border-radius: 50% !important;
  width: 44px !important;
  height: 44px !important;
  justify-content: center !important;
  transition: all .3s ease !important;
}

/* Top Right: Logo & Actions */
.vpc-hub-tr {
  top: 16px !important;
  right: 16px !important;
  border-radius: 24px !important;
  padding: 6px 6px 6px 12px !important;
  gap: 12px !important;
}

/* Bottom Center: Main Controls */
.vpc-hub-bottom {
  bottom: 24px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  border-radius: 40px !important;
  padding: 8px 16px !important;
  gap: 12px !important;
}

/* ── BOTONES / ACCIONES HUB ── */
.vpc-hub-btn,
.vpc-hub-action {
  background: transparent !important;
  border: none !important;
  color: var(--vpc-text) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  transition: all .2s ease !important;
}

.vpc-hub-btn:hover,
.vpc-hub-action:not([disabled]):hover {
  background: var(--vpc-accent-bg) !important;
  color: var(--vpc-accent) !important;
  transform: scale(1.1) !important;
}

.vpc-hub-action[disabled] {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
}

/* Logo Pill */
.vpc-logo-pill {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.vpc-logo-icon {
  width: 26px !important;
  height: 26px !important;
  background: linear-gradient(135deg, #2cc5b0, #0d8a79) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.vpc-logo-icon svg {
  width: 14px !important;
  height: 14px !important;
}

.vpc-logo-text {
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  color: var(--vpc-text) !important;
  display: none !important;
}

@media (min-width: 480px) {
  .vpc-logo-text {
    display: block !important;
  }
}

/* Download Pill Button */
.vpc-dl-btn {
  background: linear-gradient(135deg, #2cc5b0, #0d8a79) !important;
  color: #fff !important;
  border: none !important;
  padding: 8px 14px !important;
  border-radius: 20px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  text-decoration: none !important;
  transition: all .2s ease !important;
  box-shadow: 0 4px 12px rgba(44, 197, 176, 0.3) !important;
}

.vpc-dl-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(44, 197, 176, 0.5) !important;
}

.vpc-dl-text {
  display: none !important;
}

@media (min-width: 600px) {
  .vpc-dl-text {
    display: inline !important;
  }
}

/* Info Text */
.vpc-hub-pageinfo,
.vpc-hub-zoom {
  font-size: 12px !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums !important;
  color: var(--vpc-text) !important;
  min-width: 45px !important;
  text-align: center !important;
}

/* Divider */
.vpc-hub-divider {
  width: 1px !important;
  height: 24px !important;
  background: var(--vpc-border) !important;
  margin: 0 2px !important;
}


/* ── MAIN CONTENT AREA ── */
.vpc-main {
  display: flex !important;
  flex: 1 !important;
  position: relative !important;
  overflow: hidden !important;
}


/* Thumbnail Panel (Overlay Mode) */
.vpc-panel {
  position: absolute !important;
  left: -240px !important;
  /* Hidden by default */
  top: 60px !important;
  /* Debajo de la barra superior */
  bottom: 0 !important;
  width: 240px !important;
  background: var(--vpc-bg) !important;
  border-right: 1px solid var(--vpc-border) !important;
  z-index: 90 !important;
  transition: left .3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2) !important;
  display: flex !important;
  flex-direction: column !important;
}

.vpc-panel.open {
  left: 0 !important;
}

.vpc-panel-hdr {
  padding: 16px !important;
  font-size: 10px !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  color: var(--vpc-dim) !important;
  border-bottom: 1px solid var(--vpc-border) !important;
}

.vpc-thumbs-wrap {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 12px !important;
}

.vpc-thumbs {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.vpc-thumb {
  cursor: pointer !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  border: 2px solid transparent !important;
  background: var(--vpc-bg3) !important;
  transition: all .2s !important;
  position: relative !important;
}

.vpc-thumb.active {
  border-color: var(--vpc-accent) !important;
  transform: scale(0.98) !important;
}

.vpc-thumb canvas {
  display: block !important;
  width: 100% !important;
}

.vpc-thumb-num {
  position: absolute !important;
  bottom: 4px !important;
  right: 6px !important;
  font-size: 9px !important;
  color: #fff !important;
  background: rgba(0, 0, 0, 0.6) !important;
  padding: 2px 5px !important;
  border-radius: 4px !important;
}

/* ── PDF VIEW AREA ── */
.vpc-area {
  flex: 1 !important;
  overflow: auto !important;
  background: var(--vpc-bg-area) !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
}

.vpc-pagewrap {
  padding: 30px !important;
  display: flex !important;
  justify-content: center !important;
}

#vpc-canvas {
  box-shadow: 0 10px 40px var(--vpc-shadow) !important;
  border-radius: 4px !important;
  max-width: 100% !important;
}

/* ── OTHER UI ── */
.vpc-loading,
.vpc-error,
.vpc-empty {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--vpc-bg-area) !important;
  z-index: 30 !important;
  gap: 15px !important;
}

.hidden {
  display: none !important;
}

.vpc-spinner {
  width: 40px !important;
  height: 40px !important;
  border: 4px solid var(--vpc-accent-bg) !important;
  border-top-color: var(--vpc-accent) !important;
  border-radius: 50% !important;
  animation: vpc-spin 1s linear infinite !important;
}

@keyframes vpc-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── SHARE MODAL ── */
.vpc-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, .65) !important;
  backdrop-filter: blur(5px) !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 200 !important;
}

.vpc-overlay.open {
  display: flex !important;
}

.vpc-modal {
  background: var(--vpc-modal-bg) !important;
  border: 1px solid var(--vpc-border) !important;
  border-radius: 20px !important;
  padding: 24px !important;
  width: 340px !important;
  max-width: 90% !important;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5) !important;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .vpc-logo-name {
    display: none !important;
  }

  .vpc-topbar {
    padding: 10px !important;
  }
}

@media (max-width: 600px) {
  .vpc-topbar {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .vpc-logo {
    flex: 0 0 auto !important;
  }

  .vpc-nav {
    order: 2 !important;
    flex: 1 0 100% !important;
    margin-top: 4px !important;
  }

  .vpc-actions {
    flex: 1 !important;
  }

  .vpc-open-btn span {
    display: none !important;
  }

  .vpc-open-btn {
    padding: 8px !important;
    border-radius: 50% !important;
    width: 34px !important;
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .vpc-open-btn::after {
    content: '⇓' !important;
    font-size: 16px !important;
  }

  .vpc-sidebar {
    top: 65px !important;
  }
}