/* Visor de webcams de Peña Txuri. Usa los mismos valores que el kit de Elementor de la web:
   negro #000, turquesa #11B1AD (--e-global-color-accent), gris claro #FAFAFA, esquinas rectas,
   Montserrat 800 para títulos e Inter para texto, pestañas como las de JetTabs de campamentos. */
.ptxw {
  --ptxw-accent: var(--e-global-color-accent, #11B1AD);
  --ptxw-ink: #000;
  --ptxw-soft: #fafafa;
  --ptxw-muted: #555;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ptxw-ink);
  margin: 0 0 30px;
}
.ptxw *, .ptxw *::before, .ptxw *::after { box-sizing: border-box; }
.ptxw button { all: unset; box-sizing: border-box; cursor: pointer; font-family: "Inter", sans-serif; }
.ptxw button:focus-visible, .ptxw a:focus-visible { outline: 2px solid var(--ptxw-accent); outline-offset: 2px; }

/* Línea de estado sobre la imagen */
.ptxw-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin: 0 0 10px; }
.ptxw-state { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.ptxw-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ptxw-accent); flex: none; }
.ptxw-state.is-live .ptxw-dot { animation: ptxw-pulse 2s ease-in-out infinite; }
.ptxw-state.is-stale .ptxw-dot { background: transparent; border: 2px solid var(--ptxw-ink); }
.ptxw-when { font-size: 14px; color: var(--ptxw-muted); font-variant-numeric: tabular-nums; }
@keyframes ptxw-pulse { 50% { opacity: .3; } }

/* Imagen */
.ptxw-stage { position: relative; background: #000; overflow: hidden; }
.ptxw-stage img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.ptxw-stage.is-stale img { filter: grayscale(.6) brightness(.7); }
.ptxw-label { position: absolute; left: 0; bottom: 0; background: rgba(0, 0, 0, .78); color: #fff; font-size: 14px; font-weight: 700; padding: 8px 14px; font-variant-numeric: tabular-nums; }
.ptxw .ptxw-btn { position: absolute; width: 46px; height: 46px; border: 0; padding: 0; background: #000; color: #fff; display: grid; place-items: center; transition: background .2s; }
.ptxw .ptxw-btn:hover { background: var(--ptxw-accent); }
.ptxw .ptxw-btn svg { width: 16px; height: 16px; fill: currentColor; }
.ptxw .ptxw-full { top: 0; right: 0; }
.ptxw .ptxw-prev, .ptxw .ptxw-next { top: 50%; transform: translateY(-50%); }
.ptxw .ptxw-prev { left: 0; } .ptxw .ptxw-next { right: 0; }
.ptxw .ptxw-back { position: absolute; top: 0; left: 0; border: 0; background: var(--ptxw-accent); color: #fff; font-size: 14px; padding: 13px 22px; }
.ptxw .ptxw-back:hover { background: #000; }

/* Pestañas de cámaras: mismo estilo que las pestañas de los campamentos */
.ptxw .ptxw-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 15px 0 0; }
.ptxw .ptxw-tab { height: 40px; padding: 0 20px; border: 1px solid var(--ptxw-ink); background: transparent; color: var(--ptxw-ink); display: inline-flex; align-items: center; font-size: 15px; font-weight: 700; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.ptxw .ptxw-tab:hover { border-color: var(--ptxw-accent); color: var(--ptxw-accent); }
.ptxw .ptxw-tab[aria-selected="true"] { background: var(--ptxw-accent); border-color: var(--ptxw-accent); color: #fff; }

/* Aviso de cámara sin imágenes: mismo recuadro que el índice de contenidos */
.ptxw-note { margin: 15px 0 0; padding: 15px 20px; background: var(--ptxw-soft); border: 1px solid var(--ptxw-ink); border-radius: 3px; }
.ptxw-note p { margin: 0 0 6px; }
.ptxw-note p:last-child { margin: 0; }
.ptxw-note a { color: var(--ptxw-accent); text-decoration: none; font-weight: 600; }
.ptxw-note a:hover { text-decoration: underline; }

/* Historial */
.ptxw-history { margin: 25px 0 0; }
.ptxw-history h3 { font-family: "Montserrat", sans-serif; font-size: 18px; font-weight: 800; line-height: 1.2; margin: 0 0 12px; }
.ptxw-strip { scrollbar-width: thin; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(96px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.ptxw .ptxw-hour { border: 0; padding: 0; background: none; display: grid; gap: 5px; text-align: center; color: var(--ptxw-ink); }
.ptxw .ptxw-hour img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; outline: 3px solid transparent; outline-offset: -3px; transition: outline-color .2s; }
.ptxw .ptxw-hour:hover img { outline-color: #000; }
.ptxw .ptxw-hour[aria-current="true"] img { outline-color: var(--ptxw-accent); }
.ptxw .ptxw-hour span { font-size: 14px; font-variant-numeric: tabular-nums; }
.ptxw .ptxw-hour[aria-current="true"] span { font-weight: 700; }

.ptxw-foot { margin: 12px 0 0; text-align: center; font-size: .9em; color: var(--ptxw-muted); }

/* Pantalla completa */
.ptxw-lightbox { position: fixed; inset: 0; z-index: 99999; background: rgba(0, 0, 0, .95); display: grid; grid-template-rows: auto 1fr; }
.ptxw-lightbox[hidden] { display: none; }
.ptxw-lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #fff; font-weight: 700; padding-left: 16px; }
.ptxw .ptxw-lb-bar .ptxw-btn { position: static; }
.ptxw-lb-stage { position: relative; min-height: 0; display: grid; place-items: center; }
.ptxw-lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }

@media (max-width: 767px) {
  .ptxw .ptxw-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ptxw .ptxw-tabs::-webkit-scrollbar { display: none; }
  .ptxw .ptxw-btn { width: 40px; height: 40px; }
  .ptxw-label { font-size: 13px; padding: 6px 10px; }
  .ptxw .ptxw-back { font-size: 13px; padding: 11px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ptxw * { animation: none !important; transition: none !important; }
}

/* Vídeo */
.ptxw-stage.is-video { background: #000; }
.ptxw-stage iframe, .ptxw-stage video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.ptxw .ptxw-play { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; color: #fff; background: #000; font-size: 15px; font-weight: 700; text-align: center; background-size: cover; background-position: center; }
.ptxw .ptxw-play svg { width: 64px; height: 64px; padding: 20px 18px 20px 22px; background: var(--ptxw-accent); fill: #fff; box-sizing: content-box; transition: background .2s; }
.ptxw .ptxw-play:hover svg { background: #fff; fill: var(--ptxw-accent); }
.ptxw-rec { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 8px; }
.ptxw .ptxw-tab[aria-selected="true"] .ptxw-rec { animation: ptxw-pulse 2s ease-in-out infinite; }
.ptxw:empty { min-height: 300px; background: #000; }

/* Selector de zonas del listado */
.ptxw.ptxw-zones { margin: 0 0 25px; }
.ptxw.ptxw-zones .ptxw-tabs { justify-content: center; margin: 0; }
.ptxw .ptxw-tab[aria-pressed="true"] { background: var(--ptxw-accent); border-color: var(--ptxw-accent); color: #fff; }
@media (max-width: 767px) { .ptxw.ptxw-zones .ptxw-tabs { justify-content: flex-start; } }
