/* Gasteizberri Visor — styles */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600&display=swap');

.gbv, .gbv * { box-sizing: border-box; }
.gbv {
  --accent: oklch(0.72 0.15 55);
  --bg:     oklch(0.12 0.005 260);
  --panel:  oklch(0.165 0.005 260);
  --text:   oklch(0.95 0 0);
  --muted:  oklch(0.7 0 0);
  --border: oklch(1 0 0 / 0.08);
  position: fixed; inset: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, system-ui, sans-serif;
  display: flex;
  z-index: 99999;
}
.gbv .gbv-edit { outline: none; border-radius: 2px; cursor: text; transition: background 140ms, box-shadow 140ms; padding: 2px 6px; margin: 0 -6px; display: inline-block; width: 100%; }
.gbv .gbv-edit.is-readonly { cursor: default; padding: 0; margin: 0; }
.gbv .gbv-edit:hover:not(.is-readonly) { background: oklch(1 0 0 / 0.04); }
.gbv .gbv-edit.is-focused { background: oklch(0.22 0.005 260); box-shadow: 0 0 0 1.5px var(--accent); }

/* ───── DESKTOP ───── */
.gbv--desktop .gbv__stage { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gbv__topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 28px 16px; }
.gbv__brand { display: flex; align-items: center; gap: 14px; }
.gbv__brand-logo { height: 20px; width: auto; display: block; filter: brightness(0) invert(1); /* logo blanco sobre fondo oscuro */ }
.gbv__brand-text { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 22px; letter-spacing: -0.015em; }
.gbv__brand-accent { color: var(--accent); }
.gbv__sep { width: 1px; height: 16px; background: oklch(1 0 0 / 0.15); }
.gbv__mono { font-family: ui-monospace, Menlo, monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.gbv__counter { font-family: ui-monospace, Menlo, monospace; font-size: 12px; display: flex; align-items: center; gap: 12px; letter-spacing: 0.08em; color: oklch(0.55 0 0); }
.gbv__counter b { color: oklch(1 0 0); font-weight: normal; }
.gbv__counter-ad { color: var(--accent); letter-spacing: 0.18em; }
.gbv__progress { width: 140px; height: 2px; background: oklch(1 0 0 / 0.1); border-radius: 1px; overflow: hidden; }
.gbv__progress > span { display: block; height: 100%; background: var(--accent); transition: width 280ms cubic-bezier(.2,.7,.2,1); }

.gbv__image-wrap { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 0 28px; }
.gbv__image { max-width: 100%; max-height: 100%; border-radius: 3px; box-shadow: 0 30px 80px -20px oklch(0 0 0 / 0.6); object-fit: contain; }
.gbv__arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 999px; background: oklch(0.1 0 0 / 0.5); backdrop-filter: blur(6px); border: 1px solid oklch(1 0 0 / 0.1); color: var(--text); font-size: 24px; cursor: pointer; line-height: 1; }
.gbv__arrow:disabled { opacity: 0.3; cursor: default; }
.gbv__arrow--l { left: 10px; } .gbv__arrow--r { right: 10px; }

.gbv__caption { padding: 18px 28px 10px; max-width: 820px; }
.gbv__caption-html { color: oklch(0.86 0 0); font-size: 15px; line-height: 1.5; }
.gbv__caption-html a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.gbv__caption-html a:hover { color: oklch(0.92 0.04 60); }
.gbv__caption-html em, .gbv__caption-html i { font-style: italic; color: oklch(0.92 0 0); }
.gbv__caption-html strong, .gbv__caption-html b { font-weight: 600; color: oklch(0.98 0 0); }
.gbv__credit-link { color: inherit; text-decoration: none; border-bottom: 1px dotted oklch(0.45 0 0); }
.gbv__credit-link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.gbv__eyebrow { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 500; margin-bottom: 6px; }
.gbv__meta { margin-top: 8px; font-size: 12px; color: oklch(0.62 0 0); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.gbv__dot { color: oklch(0.4 0 0); }
.gbv__alt { font-style: italic; }

.gbv__thumbs { padding: 10px 28px 20px; display: flex; gap: 8px; overflow-x: auto; }
.gbv__thumb { position: relative; flex: 0 0 auto; width: 92px; height: 60px; border: 1px solid oklch(1 0 0 / 0.08); border-radius: 2px; padding: 0; overflow: hidden; cursor: pointer; background: none; opacity: 0.72; }
.gbv__thumb.is-active { outline: 2px solid var(--accent); outline-offset: 2px; opacity: 1; }
.gbv__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gbv__thumb-n { position: absolute; left: 4px; top: 4px; font-family: ui-monospace, Menlo, monospace; font-size: 9px; color: white; background: oklch(0 0 0 / 0.55); padding: 1px 4px; border-radius: 1px; }

.gbv__panel { width: 460px; min-width: 380px; max-width: 38vw; flex-shrink: 0; background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.gbv__panel-scroll { flex: 1; overflow-y: auto; padding: 22px 30px 24px; }
.gbv__kicker { display: flex; align-items: center; gap: 10px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; font-weight: 500; }
.gbv__rule { width: 18px; height: 1px; background: var(--accent); }
.gbv__byline { display: flex; align-items: center; gap: 10px; font-size: 12px; color: oklch(0.6 0 0); padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.gbv__body { padding-top: 18px; }
.gbv__p { font-family: Fraunces, Georgia, serif; font-size: 16px; line-height: 1.6; margin: 0 0 14px; color: oklch(0.72 0 0); border-left: 2px solid transparent; padding-left: 0; transition: all 240ms; }
.gbv__p.is-active { color: oklch(0.98 0 0); padding-left: 12px; margin-left: -12px; border-left-color: var(--accent); }

/* ───── AD ───── */
.gbv-ad { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; max-width: 100%; max-height: 100%; gap: 10px; padding: 20px; }
.gbv-ad__label { font-family: ui-monospace, Menlo, monospace; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: oklch(0.55 0 0); }
.gbv-ad__inner { background: oklch(0.18 0.005 260); border: 1px dashed oklch(1 0 0 / 0.15); min-width: 300px; min-height: 250px; display: flex; align-items: center; justify-content: center; color: oklch(0.6 0 0); padding: 20px; }

/* ───── MOBILE ───── */
.gbv--mobile { flex-direction: column; }
.gbv-m__photo { position: absolute; inset: 0; touch-action: pan-y; transition: transform 260ms cubic-bezier(.2,.7,.2,1); }
.gbv-m__photo img { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.gbv-m__photo::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 260px; background: linear-gradient(to top, oklch(0 0 0 / 0.55), transparent); pointer-events: none; }

.gbv-m__top { position: absolute; top: env(safe-area-inset-top, 18px); left: 0; right: 0; display: flex; justify-content: center; padding: 18px; z-index: 5; }
.gbv-m__chip { background: oklch(0.1 0 0 / 0.55); backdrop-filter: blur(14px); border: 1px solid oklch(1 0 0 / 0.15); color: var(--text); padding: 6px 14px; border-radius: 999px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; letter-spacing: 0.08em; }

.gbv-m__dots { position: absolute; top: calc(env(safe-area-inset-top, 18px) + 58px); left: 0; right: 0; display: flex; justify-content: center; gap: 4px; z-index: 4; pointer-events: none; }
.gbv-m__dot { width: 5px; height: 3px; border-radius: 2px; background: oklch(1 0 0 / 0.35); transition: all 260ms; }
.gbv-m__dot.is-on { width: 18px; background: var(--accent); }
.gbv-m__dot.is-ad { background: oklch(1 0 0 / 0.55); }

.gbv-m__sheet { position: absolute; left: 0; right: 0; bottom: 0; background: oklch(0.15 0.005 260 / 0.92); backdrop-filter: blur(22px) saturate(180%); border-top-left-radius: 22px; border-top-right-radius: 22px; border-top: 1px solid var(--border); transition: height 280ms cubic-bezier(.2,.7,.2,1); display: flex; flex-direction: column; z-index: 10; overflow: hidden; }
.gbv--snap-peek .gbv-m__sheet { height: 170px; }
.gbv--snap-half .gbv-m__sheet { height: 440px; }
.gbv--snap-full .gbv-m__sheet { height: calc(100vh - 60px); }
.gbv-m__handle { display: block; width: 38px; height: 4px; border-radius: 2px; background: oklch(1 0 0 / 0.22); border: none; padding: 0; margin: 10px auto; cursor: pointer; }
.gbv-m__sheet-inner { flex: 1; overflow-y: auto; padding: 2px 20px 22px; }
.gbv-m__article { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.gbv-m__article h1 { font-family: Fraunces, Georgia, serif; font-weight: 500; font-size: 22px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 8px; color: oklch(0.99 0 0); }
.gbv-m__dek { font-size: 14px; line-height: 1.5; color: oklch(0.78 0 0); margin: 0 0 12px; }

/* responsive: if desktop viewport shrinks, stack panel below */
@media (max-width: 900px) {
  .gbv--desktop { flex-direction: column; }
  .gbv__panel { width: 100%; max-width: none; border-left: none; border-top: 1px solid var(--border); height: 40vh; }
}

/* ───── LAUNCHER (dentro del artículo, fuera del overlay) ───── */
.gb-visor-launcher {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 720px;
  margin: 28px auto;
  background: #111;
  color: #fff;
  border: 1px solid #222;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  font-family: Inter, -apple-system, system-ui, sans-serif;
  text-align: left;
  padding: 0;
  transition: transform 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}
.gb-visor-launcher:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(0,0,0,0.25); }
.gb-visor-launcher__cover {
  width: 180px;
  min-height: 120px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  position: relative;
}
.gb-visor-launcher__cover::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 60%, #111);
}
.gb-visor-launcher__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 18px 22px;
  flex: 1;
  min-width: 0;
}
.gb-visor-launcher__kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c8402a;
  font-weight: 600;
  font-family: ui-monospace, Menlo, monospace;
}
.gb-visor-launcher__title {
  font-family: Fraunces, Georgia, serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #fff;
}
.gb-visor-launcher__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 13px;
  color: #c8402a;
  font-weight: 600;
}
@media (max-width: 560px) {
  .gb-visor-launcher { flex-direction: column; }
  .gb-visor-launcher__cover { width: 100%; height: 180px; }
  .gb-visor-launcher__cover::after {
    background: linear-gradient(180deg, transparent 50%, #111);
  }
}

/* ───── CLOSE buttons ───── */
.gbv__close {
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid oklch(1 0 0 / 0.15);
  background: oklch(1 0 0 / 0.04);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 14px;
  transition: background 140ms, border-color 140ms;
  font-family: inherit;
}
.gbv__close:hover { background: oklch(1 0 0 / 0.1); border-color: oklch(1 0 0 / 0.25); }

.gbv-m__top { position: absolute; top: env(safe-area-inset-top, 14px); left: 0; right: 0; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; z-index: 5; pointer-events: none; }
.gbv-m__top > * { pointer-events: auto; }
.gbv-m__close {
  width: 40px; height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}


/* ─── Share menu (1.2.0) ───────────────────────────────────────── */
.gbv__share { position: relative; }
.gbv__share-btn {
  background: oklch(0.22 0.005 260); border: 1px solid oklch(0.28 0.005 260);
  color: oklch(0.85 0 0); width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 120ms, color 120ms, transform 120ms;
  margin-right: 8px;
}
.gbv__share-btn:hover { background: var(--accent); color: oklch(0.15 0 0); transform: scale(1.05); }
.gbv__share-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 20;
  background: oklch(0.18 0.005 260); border: 1px solid oklch(0.28 0.005 260);
  border-radius: 10px; min-width: 240px; padding: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.55);
  display: flex; flex-direction: column; gap: 2px;
}
.gbv__share-url {
  font-size: 11px; color: oklch(0.62 0 0); padding: 8px 10px 6px;
  word-break: break-all; font-family: ui-monospace, Menlo, monospace;
  border-bottom: 1px solid oklch(0.24 0.005 260); margin-bottom: 4px;
}
.gbv__share-menu button {
  background: transparent; border: 0; color: oklch(0.88 0 0);
  padding: 9px 12px; text-align: left; border-radius: 6px; cursor: pointer;
  font: inherit; font-size: 13px;
}
.gbv__share-menu button:hover { background: oklch(0.24 0.005 260); color: var(--accent); }

/* ─── Zoom / Pan (1.2.0) ───────────────────────────────────────── */
.gbv__zoom-wrap { position: relative; width: 100%; height: 100%; overflow: hidden; }
.gbv__zoom-wrap.is-zoomed { cursor: grab; }
.gbv__zoom-wrap.is-zoomed:active { cursor: grabbing; }
.gbv__zoom-inner { width: 100%; height: 100%; transform-origin: center center; will-change: transform; }
.gbv__zoom-inner img, .gbv__zoom-inner picture, .gbv__zoom-inner picture img {
  width: 100%; height: 100%; object-fit: contain;
}
.gbv__zoom-reset {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: oklch(0.18 0.005 260 / 0.92); color: oklch(0.95 0 0);
  border: 1px solid oklch(0.3 0.005 260); border-radius: 999px;
  padding: 6px 14px; font-size: 11px; letter-spacing: 0.08em;
  cursor: pointer; backdrop-filter: blur(8px);
  text-transform: uppercase; font-weight: 600;
}
.gbv__zoom-reset:hover { border-color: var(--accent); color: var(--accent); }


/* ─── Icon buttons (1.2.0) ───────────────────────────────────────── */
.gbv__icon-btn {
  background: oklch(0.22 0.005 260); border: 1px solid oklch(0.28 0.005 260);
  color: oklch(0.85 0 0); width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; margin-right: 8px; font-size: 12px; font-weight: 600;
  transition: background 120ms, color 120ms, transform 120ms;
}
.gbv__icon-btn:hover { background: var(--accent); color: oklch(0.15 0 0); transform: scale(1.05); }
