/* ============================================
   07-VIEWER.CSS
   Visualizador de mídia (fotos/vídeos em tela cheia)
============================================ */

.nex-midia-viewer {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  background: #050b18;
  overflow: hidden;
  display: block;
  box-sizing: border-box;
}

.nex-midia-viewer::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(143,208,255,.18), transparent 42%),
    radial-gradient(circle at bottom, rgba(45,140,255,.14), transparent 45%),
    linear-gradient(180deg, rgba(5,11,24,.72), rgba(5,11,24,.92));
  pointer-events: none;
  z-index: 0;
}

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

.nex-midia-viewer .viewer-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px;
  box-sizing: border-box;
}

.nex-midia-viewer .viewer-top-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.nex-midia-viewer .viewer-title {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

.nex-midia-viewer .viewer-counter {
  position: static;
  transform: none;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
  background: rgba(255,255,255,.12);
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

/* ============================================
   BOTÃO FECHAR
============================================ */

.nex-midia-viewer .viewer-close {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border: none;
  border-radius: 16px;
  background: #2d8cff;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(45,140,255,.32);
  cursor: pointer;
  transition: .2s ease;
}

.nex-midia-viewer .viewer-close:hover {
  transform: scale(1.05);
}

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

.nex-midia-viewer .viewer-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 35;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  cursor: pointer;
  transition: .2s ease;
}

.nex-midia-viewer .viewer-arrow:hover {
  background: rgba(255,255,255,.24);
  transform: translateY(-50%) scale(1.06);
}

.nex-midia-viewer .viewer-arrow-left {
  left: 14px;
}

.nex-midia-viewer .viewer-arrow-right {
  right: 14px;
}

.nex-midia-viewer .viewer-arrow:disabled {
  opacity: .28;
  pointer-events: none;
}

/* ============================================
   ÁREA PRINCIPAL
============================================ */

.nex-midia-viewer .viewer-card {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 88px;
  padding-bottom: 110px;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

.nex-midia-viewer .viewer-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  margin: 0 auto;
}

.nex-midia-viewer .viewer-media img,
.nex-midia-viewer .viewer-media video,
.nex-midia-viewer .viewer-media iframe {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  display: block;
}

.nex-midia-viewer .viewer-media video {
  background: #000;
}

/* ============================================
   BADGE DE REAÇÃO NO CENTRO (canto inferior)
============================================ */

.nex-midia-viewer .viewer-reaction-badge {
  position: absolute;
  bottom: 110px;
  right: 22px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(13,20,36,.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  pointer-events: none;
}

.nex-midia-viewer .viewer-reaction-badge span:first-child {
  font-size: 18px;
  line-height: 1;
}

/* ============================================
   TEXTO DE ERRO
============================================ */

.nex-midia-viewer .viewer-erro {
  color: #fff;
  text-align: center;
  padding: 16px;
  font-size: 14px;
}

/* ============================================
   RODAPÉ (COMENTÁRIO)
============================================ */

.nex-midia-viewer .viewer-comment-box {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  min-height: 62px;
  border-radius: 22px;
  background: rgba(13,20,36,.92);
  backdrop-filter: blur(12px);
  box-shadow:
    0 8px 30px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.04);
  box-sizing: border-box;
}

.nex-midia-viewer .viewer-comment-input {
  flex: 1;
  min-height: 42px;
  max-height: 110px;
  resize: none;
  border: none;
  outline: none;
  background: #fff;
  border-radius: 18px;
  color: #111;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  padding: 10px 14px;
  overflow-y: auto;
}

.nex-midia-viewer .viewer-comment-input::placeholder {
  color: rgba(0,0,0,.45);
}

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

.nex-midia-viewer .viewer-reaction {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: none;
  outline: none;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .18s ease;
  position: relative;
}

.nex-midia-viewer .viewer-reaction:active {
  transform: scale(.92);
}

.nex-midia-viewer .viewer-reaction.ativo {
  background: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,.45), 0 6px 16px rgba(37,99,235,.45);
}

.nex-midia-viewer .viewer-reaction-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 2px solid rgba(13,20,36,.92);
}

/* ============================================
   BOTÃO ENVIAR COMENTÁRIO (cinza → azul)
============================================ */

.nex-midia-viewer .viewer-comment-send {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border: none;
  outline: none;
  border-radius: 50%;
  background: #475569;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .18s ease;
  opacity: .7;
}

.nex-midia-viewer .viewer-comment-send.is-active {
  background: linear-gradient(135deg, #74b9ff, #4d96ff);
  opacity: 1;
  box-shadow: 0 6px 18px rgba(77,150,255,.45);
}

.nex-midia-viewer .viewer-comment-send:active {
  transform: scale(.94);
}

.nex-midia-viewer .viewer-comment-send:disabled {
  cursor: not-allowed;
  opacity: .55;
}