/* ============================================
   10-NEARBY-VIEWER.CSS
   Viewer de publicação (drops do Nearby e Conectados)
============================================ */

.nearby-drop-viewer {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  overflow: hidden;
  background: #050b18;
  box-sizing: border-box;
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}

.nearby-drop-viewer .nearby-drop-media-wrap {
  touch-action: none;
}

.nearby-drop-viewer .nearby-drop-arrow,
.nearby-drop-viewer .nearby-drop-nav,
.nearby-drop-viewer .nearby-drop-close,
.nearby-drop-viewer .nearby-drop-comment-box,
.nearby-drop-viewer .nearby-drop-footer,
.nearby-drop-viewer .nearby-drop-profile-btn {
  touch-action: manipulation;
}

.nearby-drop-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(143,208,255,.16), transparent 42%),
    radial-gradient(circle at bottom, rgba(45,140,255,.12), transparent 45%),
    linear-gradient(180deg, rgba(5,11,24,.76), rgba(5,11,24,.94));
  pointer-events: none;
}

.nearby-drop-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100dvh;
}

/* ============================================
   TOPBAR DO VIEWER
============================================ */

.nearby-drop-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  box-sizing: border-box;
  background: rgba(255,255,255,.08);
  min-height: 64px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow:
    0 6px 24px rgba(0,0,0,.12),
    inset 0 1px 0 rgba(255,255,255,.12);
  border-radius: 0 0 14px 14px;
}


.nearby-drop-user {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nearby-drop-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1f2937;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  flex-shrink: 0;
}

.nearby-drop-user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}

.nearby-drop-user-meta strong {
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.2px;
}

.nearby-drop-user-meta span {
  color: rgba(255,255,255,.86);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
}

.nearby-drop-user-meta small {
  color: rgba(255,255,255,.68);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
}

.nearby-drop-top-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.nearby-drop-close {
  width: 70px;
  height: 36px;
  min-width: 70px;
  border: 1px solid rgba(0,0,0,.45);
  border-radius: 999px;
  background: #2d8cff;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 14px;
  box-shadow: none;
}

.nearby-drop-counter {
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

/* ============================================
   MÍDIA
============================================ */

.nearby-drop-media-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0 124px;
  box-sizing: border-box;
}

.nearby-drop-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nearby-drop-media img,
.nearby-drop-media video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* ============================================
   SETAS LATERAIS
============================================ */

.nearby-drop-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nearby-drop-arrow-left {
  left: 10px;
}

.nearby-drop-arrow-right {
  right: 10px;
}

/* ============================================
   NAVEGAÇÃO VERTICAL (PERFIL ANTERIOR/PRÓXIMO)
============================================ */

.nearby-drop-nav {
  position: absolute;
  right: 16px;
  z-index: 25;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nearby-drop-nav-up {
  top: 96px;
}

.nearby-drop-nav-down {
  bottom: 142px;
}

.nearby-drop-arrow:disabled,
.nearby-drop-nav:disabled {
  opacity: .28;
  pointer-events: none;
}
/* ============================================
   RODAPÉ DO VIEWER
============================================ */

.nearby-drop-footer {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nearby-drop-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nearby-drop-views {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  min-width: 88px;
}

.nearby-drop-footer-right {
  display: none;
}

/* ============================================
   STATS DE REAÇÃO
============================================ */

.nearby-drop-left-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nearby-drop-reactions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nearby-drop-reaction-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(0,0,0,.08);
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.msg-drop-reaction-stats {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(0,0,0,.08);
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

/* ============================================
   BOTÃO VISITAR PERFIL
============================================ */

.nearby-drop-profile-btn {
  border: none;
  border-radius: 14px;
  background: #fff;
  color: #111;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
  flex-shrink: 0;
}

/* ============================================
   CAIXA DE COMENTÁRIO
============================================ */

.nearby-drop-comment-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 22px;
  background: rgba(13,20,36,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.14);
}

.nearby-drop-comment-input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  border: none;
  outline: none;
  background: #fff;
  border-radius: 16px;
  color: #111;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 14px;
}

.nearby-drop-comment-input::placeholder {
  color: rgba(0,0,0,.45);
}

/* ============================================
   BOTÕES DE REAÇÃO E ENVIAR
============================================ */

.nearby-drop-reaction,
.nearby-drop-send {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
}

.nearby-drop-reaction {
  background: rgba(255,255,255,.08);
  font-size: 20px;
}

.nearby-drop-send {
  background: #9aa4b2;
  font-size: 18px;
  font-weight: 800;
  transition: .18s ease;
}

.nearby-drop-send.is-active {
  background: linear-gradient(135deg,#74b9ff,#4d96ff);
  box-shadow: 0 8px 18px rgba(77,150,255,.28);
}

.nearby-drop-send:disabled {
  opacity: .65;
  cursor: not-allowed;
}
/* ============================================
   VIEWER DO NEARBY — LAYOUT NOVO
   (palco + papel + topbar + rodapé + stats)
   Sobrescreve os estilos antigos acima
============================================ */

/* ============================================
   SHELL PRINCIPAL
============================================ */

.nearby-drop-viewer .nearby-pub-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 8px;
  box-sizing: border-box;
}

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

.nearby-drop-viewer .nearby-pub-topbar {
  flex-shrink: 0;
  padding: 2px 2px 4px;
}

.nearby-drop-viewer .nearby-pub-topbar-linha1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nearby-drop-viewer .nearby-pub-voltar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nearby-drop-viewer .nearby-pub-counter {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  line-height: 1;
}

/* Força avatar e meta a alinhar */
.nearby-drop-viewer .nearby-drop-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.nearby-drop-viewer .nearby-drop-user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.nearby-drop-viewer .nearby-drop-user-meta strong {
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.nearby-drop-viewer .nearby-drop-user-meta span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
}

.nearby-drop-viewer .nearby-drop-user-meta small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
}

.nearby-drop-viewer .nearby-drop-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1f2937;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  flex-shrink: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.nearby-drop-viewer .nearby-drop-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Botão Voltar */
.nearby-drop-viewer .nearby-drop-close {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(47, 140, 255, 0.85);
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 4px 12px rgba(47, 140, 255, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: filter 0.15s ease, transform 0.12s ease;
}

.nearby-drop-viewer .nearby-drop-close:active {
  transform: scale(0.92);
  filter: brightness(1.08);
}

/* ============================================
   PALCO + PAPEL
============================================ */

.nearby-drop-viewer .nearby-pub-palco {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nearby-drop-viewer .nearby-pub-papel {
  position: relative;
  aspect-ratio: 3 / 4;
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  background: #000000;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* Item de mídia (com animação) */
.nearby-drop-viewer .nearby-pub-midia-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.nearby-drop-viewer .nearby-pub-midia-item img,
.nearby-drop-viewer .nearby-pub-midia-item video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nearby-drop-viewer .nearby-pub-midia-item video {
  background: #000;
}

/* ============================================
   SETAS VERTICAIS (sobe/desce perfil)
============================================ */

.nearby-drop-viewer .nearby-drop-nav {
  position: absolute;
  right: 12px;
  z-index: 25;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: filter 0.15s ease, transform 0.12s ease;
  padding: 0;
}

.nearby-drop-viewer .nearby-drop-nav:active {
  transform: scale(0.9);
  filter: brightness(1.15);
}

.nearby-drop-viewer .nearby-drop-nav-up {
  top: 12px;
}

.nearby-drop-viewer .nearby-drop-nav-down {
  bottom: 12px;
}

.nearby-drop-viewer .nearby-drop-nav:disabled {
  opacity: 0.28;
  pointer-events: none;
}
/* ============================================
   RODAPÉ — SETAS + COMMENT BOX
============================================ */

.nearby-drop-viewer .nearby-pub-rodape {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
}

/* Setas horizontais (trocam drop) */
.nearby-drop-viewer .nearby-drop-arrow {
  position: relative;
  top: auto;
  transform: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(47, 140, 255, 0.85);
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  line-height: 1;
  box-shadow:
    0 6px 16px rgba(47, 140, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.nearby-drop-viewer .nearby-drop-arrow:active {
  transform: scale(0.92);
  filter: brightness(1.08);
}

.nearby-drop-viewer .nearby-drop-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

/* Comment box */
.nearby-drop-viewer .nearby-drop-comment-box {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 22px;
  background: rgba(13, 20, 36, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.nearby-drop-viewer .nearby-drop-comment-input {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  border: none;
  outline: none;
  background: #ffffff;
  border-radius: 14px;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.nearby-drop-viewer .nearby-drop-comment-input::placeholder {
  color: rgba(0, 0, 0, 0.45);
}

/* Botões de reação e enviar */
.nearby-drop-viewer .nearby-drop-reaction,
.nearby-drop-viewer .nearby-drop-send {
  width: 38px;
  height: 38px;
  min-width: 38px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffffff;
  padding: 0;
  transition: filter 0.15s ease, transform 0.12s ease;
}

.nearby-drop-viewer .nearby-drop-reaction {
  background: rgba(255, 255, 255, 0.08);
  font-size: 18px;
}

.nearby-drop-viewer .nearby-drop-reaction:active {
  transform: scale(0.9);
  filter: brightness(1.15);
}

.nearby-drop-viewer .nearby-drop-send {
  background: #9aa4b2;
  font-size: 16px;
  font-weight: 800;
}

.nearby-drop-viewer .nearby-drop-send.is-active {
  background: linear-gradient(135deg, #74b9ff, #4d96ff);
  box-shadow: 0 8px 18px rgba(77, 150, 255, 0.28);
}

.nearby-drop-viewer .nearby-drop-send:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ============================================
   STATS + VISITAR PERFIL
============================================ */

.nearby-drop-viewer .nearby-pub-stats-row {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 0;
}

.nearby-drop-viewer .nearby-pub-stats-lista {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nearby-drop-viewer .nearby-drop-views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  min-width: 0;
}

.nearby-drop-viewer .nearby-drop-reactions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nearby-drop-viewer .nearby-drop-reaction-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Botão Visitar perfil */
.nearby-drop-viewer .nearby-drop-profile-btn {
  border: none;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 14px;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: filter 0.15s ease, transform 0.12s ease;
}

.nearby-drop-viewer .nearby-drop-profile-btn:active {
  transform: scale(0.96);
  filter: brightness(0.96);
}