/* ═══════════════════════════════════════════════════════════════════
   BUFATTY · LIGHTBOX · Stage fullscreen + panel comentarios flotante
   - Media ocupa toda la columna izquierda (fullscreen)
   - Overlays flotantes: acciones (der) + info (abajo-izq)
   - Panel derecho: comentarios + form
   - Compatible con temas claro y oscuro
   - ⭐ VIDEO: controles propios (sin controls nativos) + fullscreen
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Variables adaptativas ─── */
:root {
  --lb-bg:              #0a0a0a;
  --lb-text:            #e9eaec;
  --lb-text-muted:      #8a8f98;
  --lb-line:            rgba(255, 255, 255, 0.08);
  --lb-input-bg:        rgba(255, 255, 255, 0.04);
  --lb-input-border:    rgba(255, 255, 255, 0.10);
  --lb-hover:           rgba(255, 255, 255, 0.06);
  --lb-float-text:      #ffffff;
}

html[data-theme="light"] {
  --lb-bg:              #ffffff;
  --lb-text:            #0a0a0a;
  --lb-text-muted:      #8a8780;
  --lb-line:            rgba(20, 20, 20, 0.08);
  --lb-input-bg:        rgba(0, 0, 0, 0.03);
  --lb-input-border:    rgba(20, 20, 20, 0.10);
  --lb-hover:           rgba(0, 0, 0, 0.05);
  --lb-float-text:      #0a0a0a;
}

/* ─── Overlay ─── */
.pr-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: var(--lb-bg);
  z-index: 10000;
  display: none;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.pr-lightbox-overlay.show {
  display: flex;
  opacity: 1;
}

.pr-lightbox-close {
  position: absolute;
  top: 13px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--lb-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: transform 0.2s ease, background 0.2s ease;
}
.pr-lightbox-close svg { width: 20px; height: 20px; }
.pr-lightbox-close:hover {
  background: var(--lb-hover);
  transform: rotate(90deg);
}
.pr-lightbox-close svg { width: 22px; height: 22px; }

/* ─── Grid principal ─── */
.pr-lightbox {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  width: 100%;
  height: 100%;
  transform: scale(0.98);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}
.pr-lightbox-overlay.show .pr-lightbox {
  transform: scale(1);
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   STAGE: media que llena TODA la columna izquierda
   ═══════════════════════════════════════════════════════════════ */
.pr-lightbox-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}
html[data-theme="light"] .pr-lightbox-stage {
  background: #fff;
}

.pr-lightbox-stage-media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
html[data-theme="light"] .pr-lightbox-stage-media {
  background: #fff;
}

.pr-lightbox-stage-media .pr-lightbox-media {
  width: 100%;
  height: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 0;
  position: relative;
}

.pr-lightbox-stage-media img,
.pr-lightbox-stage-media video,
.pr-lightbox-stage-media .pr-lightbox-slide img,
.pr-lightbox-stage-media .pr-lightbox-slide video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Carrusel */
.pr-lightbox-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.pr-lightbox-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Flechas del carrusel */
.pr-lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 20;
}
.pr-lightbox-arrow svg { width: 22px; height: 22px; }
.pr-lightbox-arrow.prev { left: 15%; }
.pr-lightbox-arrow.next { right: 15%; }
.pr-lightbox-arrow:hover {
  transform: translateY(-50%) scale(1.08);
  background: rgba(0, 0, 0, 0.75);
}
.pr-lightbox-arrow:disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

/* Contador */
.pr-lightbox-counter {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  z-index: 20;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   OVERLAY FLOTANTE: acciones verticales a la derecha del media
   ═══════════════════════════════════════════════════════════════ */
.pr-lightbox-actions-float {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 30;
}

.pr-lightbox-actions-float .pr-lightbox-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  background: none;
  border: none;
  color: var(--lb-float-text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.2s ease;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.pr-lightbox-actions-float .pr-lightbox-action:hover {
  transform: scale(1.1);
}

/* El ícono de comentario es "filled" (20x20), no "stroked" (24x24) */
.pr-lightbox-actions-float .pr-lightbox-comment-stat svg {
  width: 30px;
  height: 30px;
  stroke-width: 0;
  margin-top: 1px;
}
.pr-lightbox-actions-float .pr-lightbox-action span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.pr-lightbox-actions-float .pr-lightbox-action svg {
  width: 30px;
  height: 30px;
  stroke-width: 1.8;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

/* Like activo */
.pr-lightbox-actions-float .pr-lightbox-like.is-liked {
  color: #FE2C55;
}
.pr-lightbox-actions-float .pr-lightbox-like.is-liked svg {
  fill: #FE2C55;
  stroke: #FE2C55;
}

/* Dislike activo */
.pr-lightbox-actions-float .pr-lightbox-dislike.is-disliked {
  color: #FE2C55;
}
.pr-lightbox-actions-float .pr-lightbox-dislike.is-disliked svg {
  fill: #FE2C55;
  stroke: #FE2C55;
}

.pr-lightbox-comment-stat {
  cursor: default;
}

/* Menú ⋯ dentro de la columna */
.pr-lightbox-actions-float .pr-lightbox-actions-menu {
  margin-left: 0;
  position: relative;
}
.pr-lightbox-actions-float .post-card-action-trigger {
  width: 30px;
  height: 30px;
  color: var(--lb-float-text);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  transition: transform 0.15s ease;
}
.pr-lightbox-actions-float .post-card-action-trigger:hover {
  transform: scale(1.1);
}
.pr-lightbox-actions-float .post-card-action-trigger svg {
  width: 24px;
  height: 24px;
}
.pr-lightbox-actions-float .post-card-action-panel {
  position: absolute;
  top: 0;
  right: calc(100% + 12px);
  min-width: 200px;
  background: var(--bg-card, #131519);
  border: 1px solid var(--lb-input-border);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  z-index: 20;
}

/* ═══════════════════════════════════════════════════════════════
   OVERLAY FLOTANTE: info + caption abajo-izquierda
   ═══════════════════════════════════════════════════════════════ */
.pr-lightbox-info-float {
  position: absolute;
  left: 24px;
  bottom: 24px;
  max-width: 210px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.pr-lightbox-info-float > * {
  pointer-events: auto;
}

.pr-lightbox-info-float .pr-lightbox-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: none;
  background: none;
}
.pr-lightbox-info-float .pr-lightbox-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #7c5cff 0%, #ff6ba8 100%);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.pr-lightbox-info-float .pr-lightbox-avatar img { width: 100%; height: 100%; object-fit: cover; }

.pr-lightbox-info-float .pr-lightbox-info { flex: 1; min-width: 0; }

.pr-lightbox-info-float .pr-lightbox-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  font-weight: 700;
  color: var(--lb-float-text);
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.pr-lightbox-info-float .pr-lightbox-name svg {
  width: 15px;
  height: 15px;
  color: var(--accent, #7c5cff);
  flex-shrink: 0;
}
.pr-lightbox-info-float .pr-lightbox-name svg.verified-badge {
  color: #8bc34a; /* verde verified */
}
.pr-lightbox-info-float .pr-lightbox-name svg.verified-badge:hover {
  filter: drop-shadow(0 0 12px rgba(139, 195, 74, 0.7));
}
.pr-lightbox-info-float .pr-lightbox-meta {
  font-size: 13px;
  color: var(--lb-float-text);
  opacity: 0.75;
  margin-top: 2px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.pr-lightbox-follow-btn {
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.pr-lightbox-follow-btn:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(-1px);
}

/* ─── Caption: wrapper + texto + botón "más" ─── */
.pr-lightbox-info-float .pr-lightbox-caption-wrap {
  position: relative;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.pr-lightbox-info-float .pr-lightbox-caption {
  padding: 0;
  border: none;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--lb-float-text);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  word-break: break-word;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  position: relative;
  cursor: pointer;
}

.pr-lightbox-info-float .pr-lightbox-caption::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60%;
  height: 1.4em;
  background: linear-gradient(
    to right,
    transparent,
    var(--lb-bg) 70%
  );
  pointer-events: none;
}

.pr-lightbox-info-float .pr-lightbox-caption.is-short {
  cursor: default;
}
.pr-lightbox-info-float .pr-lightbox-caption.is-short::after {
  display: none;
}

.pr-lightbox-info-float .pr-lightbox-caption-more {
  display: block;
  margin-top: 2px;
  margin-left: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--lb-float-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-align: right;
  opacity: 0.75;
  transition: opacity 0.15s ease;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.pr-lightbox-info-float .pr-lightbox-caption-more:hover {
  opacity: 1;
  text-decoration: underline;
}
.pr-lightbox-info-float .pr-lightbox-caption-more[hidden] {
  display: none;
}

/* ─── Popover del caption ─── */
.pr-lightbox-caption-popover {
  position: fixed;
  z-index: 10100;
  max-width: 360px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--lb-bg);
  border: 1px solid var(--lb-line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  color: var(--lb-text);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  animation: lbPopoverIn 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pr-lightbox-caption-popover::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 24px;
  width: 14px;
  height: 14px;
  background: var(--lb-bg);
  border-right: 1px solid var(--lb-line);
  border-bottom: 1px solid var(--lb-line);
  transform: rotate(45deg);
}
@keyframes lbPopoverIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   PANEL DERECHO: comentarios + form
   ═══════════════════════════════════════════════════════════════ */
.pr-lightbox-side {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--lb-bg);
  border-left: 1px solid var(--lb-line);
}

.pr-lightbox-thumbs { display: none; }

.pr-lightbox-comments {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER DE COMENTARIOS · IG-level
   ═══════════════════════════════════════════════════════════════ */
.pr-lightbox-comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 16px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--lb-line);
  background: var(--lb-bg);
}

.pr-lightbox-comments-title {
  font-family: var(--font-sans, inherit);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--lb-text);
  margin: 0;
  line-height: 1;
}

.pr-lightbox-comments-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  border-radius: 100px;
  background: var(--lb-hover);
  color: var(--lb-text);
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
  margin-right: 12%;
}

.pr-lightbox-comments-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(128, 128, 128, 0.25) transparent;
  overscroll-behavior: contain;
}
.pr-lightbox-comments-list::-webkit-scrollbar { width: 6px; }
.pr-lightbox-comments-list::-webkit-scrollbar-track { background: transparent; }
.pr-lightbox-comments-list::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.25);
  border-radius: 100px;
}
.pr-lightbox-comments-list::-webkit-scrollbar-thumb:hover {
  background: rgba(128, 128, 128, 0.4);
}

.pr-lightbox-comments-loading,
.pr-lightbox-comments-empty {
  padding: 24px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--lb-text-muted);
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════
   COMENTARIOS · estilos pulidos (IG-level) + replies anidadas
   ═══════════════════════════════════════════════════════════════ */

.pr-lightbox-comments-list .comment {
  display: flex;
  gap: 14px;
  padding: 4px 0;
  border-radius: 0;
  background: transparent;
  transition: none;
  animation: lbCommentIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes lbCommentIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pr-lightbox-comments-list .comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c5cff 0%, #ff6ba8 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow:
    0 0 0 1px var(--lb-line),
    0 0 0 3px color-mix(in srgb, var(--lb-bg) 60%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pr-lightbox-comments-list .comment-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 2px var(--accent, #7c5cff);
}
.pr-lightbox-comments-list .comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pr-lightbox-comments-list .comment-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pr-lightbox-comments-list .comment-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  line-height: 1.35;
  margin-bottom: 4px;
}

.pr-lightbox-comments-list .comment-author {
  font-size: 14px;
  font-weight: 700;
  color: var(--lb-text);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}
.pr-lightbox-comments-list .comment-author:hover {
  color: var(--accent, #7c5cff);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.pr-lightbox-comments-list .comment-handle {
  font-size: 13px;
  color: var(--lb-text-muted);
}

.pr-lightbox-comments-list .comment-sep {
  font-size: 13px;
  color: var(--lb-text-muted);
  opacity: 0.6;
}

.pr-lightbox-comments-list .comment-time {
  font-size: 13px;
  color: var(--lb-text-muted);
}

.pr-lightbox-comments-list .comment-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--lb-text);
  letter-spacing: -0.005em;
  white-space: pre-wrap;
  word-break: break-word;
}

.pr-lightbox-comments-empty {
  padding: 32px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--lb-text-muted);
  font-style: italic;
}

/* ─── Acciones del comentario ─── */
.pr-lightbox-comments-list .comment-actions,
.comment-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
}

.pr-lightbox-comments-list .comment-action,
.comment-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: none;
  background: none;
  color: var(--lb-text-muted, var(--text-muted));
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: color 0.15s ease;
  line-height: 1;
}

.pr-lightbox-comments-list .comment-action:hover,
.comment-action:hover {
  color: var(--lb-text, var(--text-primary));
}

.pr-lightbox-comments-list .comment-action svg,
.comment-action svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
}

/* ─── Like activo (rojo) ─── */
.pr-lightbox-comments-list .comment-like-btn.is-liked,
.comment-like-btn.is-liked {
  color: #FE2C55;
}

.pr-lightbox-comments-list .comment-like-btn.is-liked svg,
.comment-like-btn.is-liked svg {
  fill: #FE2C55;
  stroke: #FE2C55;
  animation: comment-like-pop 0.28s var(--ease, ease);
}

@keyframes comment-like-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.28); }
  100% { transform: scale(1); }
}

/* ─── Replies anidadas ─── */
.pr-lightbox-comments-list .comment--reply,
.comment--reply {
  margin-top: 14px;
  margin-left: 24px;
  padding-left: 16px;
  border-left: 2px solid var(--lb-line, rgba(128, 128, 128, 0.15));
}

.pr-lightbox-comments-list .comment--reply .comment-avatar,
.comment--reply .comment-avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
  box-shadow: none;
  background: linear-gradient(135deg, #7c5cff 0%, #ff6ba8 100%);
}

.pr-lightbox-comments-list .comment--reply .comment-avatar:hover,
.comment--reply .comment-avatar:hover {
  box-shadow: none;
  transform: none;
}

.pr-lightbox-comments-list .comment--reply .comment-author,
.comment--reply .comment-author {
  font-size: 13px;
}

.pr-lightbox-comments-list .comment--reply .comment-handle,
.pr-lightbox-comments-list .comment--reply .comment-time,
.comment--reply .comment-handle,
.comment--reply .comment-time {
  font-size: 12px;
}

.pr-lightbox-comments-list .comment--reply .comment-text,
.comment--reply .comment-text {
  font-size: 13px;
  line-height: 1.45;
}

.comment-replies {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.comment-show-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 0;
  border: none;
  background: none;
  color: var(--lb-text-muted, var(--text-muted));
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
}

.comment-show-more::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.comment-show-more:hover {
  color: var(--lb-text, var(--text-primary));
}

/* ─── Input inline de reply ─── */
.comment-reply-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 100px;
  background: var(--lb-input-bg, var(--bg-elevated));
  border: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.comment-reply-form:focus-within {
  border-color: var(--accent, #7c5cff);
}

.comment-reply-form[hidden] {
  display: none;
}

.comment-reply-avatar {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c5cff 0%, #ff6ba8 100%);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  text-decoration: none;
}

.comment-reply-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.comment-reply-input {
  flex: 1;
  min-width: 0;
  padding: 4px 4px;
  background: transparent;
  border: none;
  color: var(--lb-text, var(--text-primary));
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.comment-reply-input::placeholder {
  color: var(--lb-text-muted, var(--text-muted));
}

.comment-reply-send {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent, #7c5cff);
  color: #fff;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.comment-reply-send:hover:not(:disabled) {
  transform: scale(1.06);
}

.comment-reply-send:disabled {
  opacity: 0.4;
  cursor: wait;
}

.comment-reply-send svg {
  width: 12px;
  height: 12px;
}

/* ─── Lista de comentarios ─── */
.pr-lightbox-comments-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(128, 128, 128, 0.25) transparent;
  overscroll-behavior: contain;
}
.pr-lightbox-comments-list::-webkit-scrollbar { width: 6px; }
.pr-lightbox-comments-list::-webkit-scrollbar-track { background: transparent; }
.pr-lightbox-comments-list::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.25);
  border-radius: 100px;
}
.pr-lightbox-comments-list::-webkit-scrollbar-thumb:hover {
  background: rgba(128, 128, 128, 0.4);
}

/* Text-only */
.pr-lightbox-textonly {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  background: transparent;
}
.pr-lightbox-textonly-content {
  font-family: var(--font-display, 'Fraunces', serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.4px;
  color: var(--lb-text);
  text-align: center;
  max-width: 640px;
  word-break: break-word;
}

/* ─── Items del menú ⋯ ─── */
.pr-lightbox-actions-menu {
  position: relative;
  flex-shrink: 0;
}
.pr-lightbox-actions-menu .post-card-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: none;
  border: none;
  color: var(--lb-text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.pr-lightbox-actions-menu .post-card-action-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.pr-lightbox-actions-menu .post-card-action-item:hover {
  background: var(--lb-hover);
}
.pr-lightbox-actions-menu .post-card-action-item-danger { color: #ef4444; }
.pr-lightbox-actions-menu .post-card-action-item-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}
.pr-lightbox-actions-menu .post-card-action-item-warning { color: #ffb74d; }
.pr-lightbox-actions-menu .post-card-action-item-warning:hover {
  background: rgba(255, 183, 77, 0.1);
}

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .pr-lightbox {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}
@media (max-width: 900px) {
  .pr-lightbox {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.4fr) minmax(0, 1fr);
  }
  .pr-lightbox-side {
    border-left: none;
    border-top: 1px solid var(--lb-line);
  }
  .pr-lightbox-actions-float {
    right: 16px;
    gap: 16px;
  }
  .pr-lightbox-info-float {
    left: 16px;
    bottom: 16px;
    max-width: 60%;
  }
}
@media (max-width: 480px) {
  .pr-lightbox-close {
    top: 12px; right: 12px;
    width: 36px; height: 36px;
  }
  .pr-lightbox-close svg { width: 18px; height: 18px; }
  .pr-lightbox-actions-float .pr-lightbox-comment-stat svg { width: 26px; height: 26px; }
  .pr-lightbox-info-float .pr-lightbox-name { font-size: 14px; }
  .pr-lightbox-info-float .pr-lightbox-caption { font-size: 12.5px; }

  .pr-lightbox-comments-list {
    padding: 12px 16px;
    gap: 14px;
  }
  .pr-lightbox-comments-list .comment-avatar {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
  .pr-lightbox-comments-list .comment-author {
    font-size: 13px;
  }
  .pr-lightbox-comments-list .comment-handle,
  .pr-lightbox-comments-list .comment-time {
    font-size: 12px;
  }
  .pr-lightbox-comments-list .comment-text {
    font-size: 13px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ⭐ VIDEO PLAYER · controles propios dentro del lightbox
   (los estilos de .video-play-btn, .video-mute-btn, .video-progress
    vienen de feed.css, que se carga globalmente)
   ═══════════════════════════════════════════════════════════════ */

/* El botón fullscreen: a la izquierda del mute */
.video-fullscreen-btn {
  position: absolute;
  bottom: 16px;
  right: 60px;             /* a la izquierda del botón mute (right: 16px + 36px + 8px) */
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  z-index: 3;
  opacity: 0;
}
.post-card-media:hover .video-fullscreen-btn,
.post-carousel-slide:hover .video-fullscreen-btn,
.pr-lightbox-slide:hover .video-fullscreen-btn {
  opacity: 1;
}
@media (hover: none) {
  .video-fullscreen-btn { opacity: 1; }
}
.video-fullscreen-btn:hover {
  transform: scale(1.08);
  background: rgba(0, 0, 0, 0.75);
}
.video-fullscreen-btn svg {
  width: 18px;
  height: 18px;
}
/* ═══════════════════════════════════════════════════════════════
   VIDEO PLAYER dentro del lightbox
   Reusa los estilos del feed, pero con selectores que matchean
   el lightbox (.pr-lightbox-slide en vez de .post-card-media).
   ═══════════════════════════════════════════════════════════════ */

.pr-lightbox-slide .video-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.pr-lightbox-slide .video-overlay > * {
  pointer-events: auto;
}
.pr-lightbox-slide:hover .video-overlay {
  opacity: 1;
}

.pr-lightbox-slide .video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}
.pr-lightbox-slide.is-paused .video-play-btn,
.pr-lightbox-slide:hover .video-play-btn {
  opacity: 1;
}
.pr-lightbox-slide .video-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(0, 0, 0, 0.75);
}
.pr-lightbox-slide .video-play-btn svg {
  width: 28px;
  height: 28px;
  display: block;
}
.pr-lightbox-slide:not(.is-paused) .video-icon-play { display: none; }
.pr-lightbox-slide:not(.is-paused) .video-icon-pause { display: block; }
.pr-lightbox-slide.is-paused .video-icon-play { display: block; margin-left: 4px; }
.pr-lightbox-slide.is-paused .video-icon-pause { display: none; }

.pr-lightbox-slide .video-mute-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  z-index: 3;
  opacity: 0;
}
.pr-lightbox-slide:hover .video-mute-btn {
  opacity: 1;
}
@media (hover: none) {
  .pr-lightbox-slide .video-mute-btn { opacity: 1; }
}
.pr-lightbox-slide .video-mute-btn:hover {
  transform: scale(1.08);
  background: rgba(0, 0, 0, 0.75);
}
.pr-lightbox-slide .video-mute-btn svg {
  width: 20px;
  height: 20px;
}
.pr-lightbox-slide .video-icon-sound { display: block; }
.pr-lightbox-slide .video-icon-muted { display: none; }
.pr-lightbox-slide.is-muted .video-icon-sound { display: none; }
.pr-lightbox-slide.is-muted .video-icon-muted { display: block; }

.pr-lightbox-slide .video-fullscreen-btn {
  position: absolute;
  bottom: 16px;
  right: 60px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  z-index: 3;
  opacity: 0;
}
.pr-lightbox-slide:hover .video-fullscreen-btn {
  opacity: 1;
}
@media (hover: none) {
  .pr-lightbox-slide .video-fullscreen-btn { opacity: 1; }
}
.pr-lightbox-slide .video-fullscreen-btn:hover {
  transform: scale(1.08);
  background: rgba(0, 0, 0, 0.75);
}
.pr-lightbox-slide .video-fullscreen-btn svg {
  width: 18px;
  height: 18px;
}

.pr-lightbox-slide .video-progress {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  pointer-events: auto;
  transition: height 0.15s ease, opacity 0.2s ease;
  z-index: 3;
  border-radius: 100px;
  overflow: hidden;
  opacity: 0 !important;
  visibility: hidden;
}
.pr-lightbox-slide:hover .video-progress {
  opacity: 1 !important;
  visibility: visible;
}
.pr-lightbox-slide .video-progress:hover {
  height: 5px;
}
.pr-lightbox-slide .video-progress-fill {
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: 100px;
  transition: width 0.1s linear;
}
@media (hover: none) {
  .pr-lightbox-slide .video-progress {
    opacity: 1 !important;
    visibility: visible;
  }
}
.pr-lightbox-comment-form-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c5cff 0%, #ff6ba8 100%);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}
.pr-lightbox-comment-form-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* ═══════════════════════════════════════════════════════════════
   COMENTARIOS · replies anidadas + input inline + like activo
   ═══════════════════════════════════════════════════════════════ */

/* ─── Replies anidadas ─── */
.pr-lightbox-comments-list .comment--reply,
.comment--reply {
  margin-top: 10px;
  padding-left: 12px;
  border-left: 2px solid var(--lb-line, rgba(128, 128, 128, 0.15));
  margin-left: 0;
}

.pr-lightbox-comments-list .comment--reply .comment-avatar,
.comment--reply .comment-avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.pr-lightbox-comments-list .comment--reply .comment-author,
.comment--reply .comment-author {
  font-size: 13px;
}

.pr-lightbox-comments-list .comment--reply .comment-handle,
.pr-lightbox-comments-list .comment--reply .comment-time,
.comment--reply .comment-handle,
.comment--reply .comment-time {
  font-size: 12px;
}

.pr-lightbox-comments-list .comment--reply .comment-text,
.comment--reply .comment-text {
  font-size: 13px;
  line-height: 1.45;
}

.comment-replies {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.comment-show-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 0;
  border: none;
  background: none;
  color: var(--lb-text-muted, var(--text-muted));
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
}

.comment-show-more::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.comment-show-more:hover {
  color: var(--lb-text, var(--text-primary));
}

/* ─── Input inline de reply ─── */
.comment-reply-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 100px;
  background: var(--lb-input-bg, var(--bg-elevated));
  border: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.comment-reply-form:focus-within {
  border-color: var(--accent, #7c5cff);
}

.comment-reply-form[hidden] {
  display: none;
}

.comment-reply-avatar {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c5cff 0%, #ff6ba8 100%);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  text-decoration: none;
}

.comment-reply-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.comment-reply-input {
  flex: 1;
  min-width: 0;
  padding: 4px 4px;
  background: transparent;
  border: none;
  color: var(--lb-text, var(--text-primary));
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.comment-reply-input::placeholder {
  color: var(--lb-text-muted, var(--text-muted));
}

.comment-reply-send {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent, #7c5cff);
  color: #fff;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.comment-reply-send:hover:not(:disabled) {
  transform: scale(1.06);
}

.comment-reply-send:disabled {
  opacity: 0.4;
  cursor: wait;
}

.comment-reply-send svg {
  width: 12px;
  height: 12px;
}

/* ─── Like activo (rojo) ─── */
.pr-lightbox-comments-list .comment-like-btn.is-liked,
.comment-like-btn.is-liked {
  color: #FE2C55;
}

.pr-lightbox-comments-list .comment-like-btn.is-liked svg,
.comment-like-btn.is-liked svg {
  fill: #FE2C55;
  stroke: #FE2C55;
  animation: comment-like-pop 0.28s var(--ease, ease);
}

@keyframes comment-like-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.28); }
  100% { transform: scale(1); }
}
/* ═══════════════════════════════════════════════════════════════
   FORM DE COMENTARIO PRINCIPAL (footer del lightbox)
   ═══════════════════════════════════════════════════════════════ */
.pr-lightbox-comment-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--lb-line);
  background: var(--lb-bg);
  flex-shrink: 0;
}

.pr-lightbox-comment-form-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c5cff 0%, #ff6ba8 100%);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

.pr-lightbox-comment-form-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pr-lightbox-comment-input {
  flex: 1;
  min-width: 0;
  padding: 10px 16px;
  background: var(--lb-input-bg);
  border: 1px solid var(--lb-input-border);
  border-radius: 100px;
  color: var(--lb-text);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.pr-lightbox-comment-input::placeholder {
  color: var(--lb-text-muted);
}

.pr-lightbox-comment-input:focus {
  border-color: var(--accent, #7c5cff);
  background: var(--lb-bg);
}

.pr-lightbox-comment-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent, #7c5cff);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(124, 92, 255, 0.3);
}

.pr-lightbox-comment-send:hover:not(:disabled) {
  background: var(--accent-hover, #9370ff);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.45);
}

.pr-lightbox-comment-send:disabled {
  opacity: 0.5;
  cursor: wait;
  transform: none;
}

.pr-lightbox-comment-send svg {
  width: 15px;
  height: 15px;
  display: block;
}

.pr-lightbox-comment-login {
  padding: 16px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--lb-text-muted);
  border-top: 1px solid var(--lb-line);
  flex-shrink: 0;
}

.pr-lightbox-comment-login a {
  color: var(--accent, #7c5cff);
  font-weight: 600;
  text-decoration: none;
}

.pr-lightbox-comment-login a:hover {
  text-decoration: underline;
}