.glpdf-wrap{
  width: 100%;
  max-width: 500px;
  margin: 18px auto 22px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  position: relative;
}

/* ================= VISOR ================= */

.glpdf-viewer{
  position: relative !important;
  background: #0f1020;
  border-radius: 14px;
  overflow: hidden !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

/* ================= TOPBAR ================= */

.glpdf-topbar{
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(0,0,0,.18);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.glpdf-progress{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.glpdf-progress-text{
  color: rgba(255,255,255,.92);
  font-weight: 700;
  font-size: 13px;
}

.glpdf-tools{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.glpdf-tool{
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;

  /* blindaje contra el theme */
  transform: none !important;
  transition: none !important;
  animation: none !important;
}
.glpdf-tool:hover{
  background: rgba(255,255,255,.16);
}

/* ================= CONTENIDO ================= */

.glpdf-loading{
  padding: 18px 14px;
  color: #fff;
  opacity: .85;
}

.glpdf-track{
  display: flex;
  width: 100%;
  transition: transform .25s ease;
  position: relative !important;
  z-index: 1 !important;

}

.glpdf-slide{
  min-width: 100%;
  padding: 14px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.glpdf-canvas{
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  background: #fff;
}

.glpdf-badge{
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0,0,0,.55);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

/* ================= FLECHAS (FIX DEFINITIVO) ================= */

.glpdf-nav{
  position: absolute !important;
  top: 50% !important;

  /* ❌ NUNCA transform */
  transform: none !important;

  /* centrado manual (44px / 2) */
  margin-top: -22px !important;

  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.9);
  cursor: pointer;
  font-size: 28px;
  line-height: 44px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);

  z-index: 99999 !important;

  /* blindaje contra el theme */
  transition: none !important;
  animation: none !important;
}

.glpdf-nav:active,
.glpdf-nav:focus{
  transform: none !important;
  margin-top: -22px !important;
}

.glpdf-nav:disabled{
  opacity: .4;
  cursor: not-allowed;
}

.glpdf-prev{ left: 12px !important; }
.glpdf-next{ right: 12px !important; }

/* ================= DOTS ================= */

.glpdf-dots{
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 10px 12px 12px;
  background: #0f1020;
}
.glpdf-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.35);
  cursor: pointer;
}
.glpdf-dot.is-active{
  background: rgba(255,255,255,.95);
}

/* ================= MINIATURAS ================= */

.glpdf-thumbs-wrap{
  padding: 10px 10px 0px;
  background: #0f1020;
  border-top: 1px solid rgba(255,255,255,.06);
}
.glpdf-thumbs{
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}
.glpdf-thumbs::-webkit-scrollbar{ height: 8px; }
.glpdf-thumbs::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.18);
  border-radius: 10px;
}

.glpdf-thumb{
  flex: 0 0 auto;
  width: 86px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  padding: 8px;
  cursor: pointer;
  position: relative;
  scroll-snap-align: center;
}
.glpdf-thumb.is-active{
  outline: 2px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.12);
}
.glpdf-thumb-canvas{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  background: #fff;
}
.glpdf-thumb-label{
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 7px;
  border-radius: 999px;
}

/* ================= BOTONES ================= */

.glpdf-actions{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.glpdf-btn{
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  height: 56px;
  border-radius: 10px;
  font-weight: 900;
  letter-spacing: .3px;
  border: 1px solid rgba(0,0,0,.12);
}
.glpdf-download{ background: #ffffff; color: #111; }
.glpdf-subscribe{ background: #16b958; color: #fff; }
.glpdf-spacer{ background: transparent; border: 0; }

/* ================= TOAST ================= */

.glpdf-toast{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -8px;
  background: rgba(0,0,0,.78);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, bottom .2s ease;
}
.glpdf-toast.is-show{
  opacity: 1;
  bottom: 10px;
}

/* ================= FULLSCREEN ================= */

.glpdf-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.78);
  display: none;
  z-index: 999999;
  padding: 18px;
}
.glpdf-wrap.is-fullscreen .glpdf-overlay{ display: block; }

.glpdf-overlay-inner{
  max-width: 1200px;
  margin: 0 auto;
  height: calc(100vh - 36px);
  background: #0f1020;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

.glpdf-overlay-close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.92);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  z-index: 10;
}

.glpdf-overlay-content{
  height: 100%;
}
.glpdf-overlay-content .glpdf-viewer{
  border-radius: 0;
  height: 100%;
}
.glpdf-overlay-content .glpdf-slide{
  padding: 16px;
}
.glpdf-overlay-content .glpdf-canvas{
  max-height: calc(100vh - 240px);
  width: auto;
}
/* Evita que el navegador mueva la página por scroll anchoring */
.glpdf-wrap,
.glpdf-viewer,
.glpdf-thumbs-wrap,
.glpdf-thumbs{
  overflow-anchor: none !important;
}

/* Evita que el theme meta smooth scroll global afecte */
.glpdf-thumbs{
  scroll-behavior: auto !important;
  scrollbar-gutter: stable both-edges;
}


/* ================= RESPONSIVE ================= */

@media (max-width: 640px){
  .glpdf-actions{ grid-template-columns: 1fr; }
  .glpdf-nav{
    width: 40px;
    height: 40px;
    font-size: 26px;
    line-height: 40px;
    margin-top: -20px !important; /* mitad de 40 */
  }
  .glpdf-tool{ padding: 7px 9px; }
  .glpdf-thumb{ width: 76px; }
}