/* apps/social — estilos da rolagem. Mobile primeiro, sem framework, sem build. */

:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

/* `hidden` tem que vencer o `display: flex` de `.feed-state` e
   `.dialog-overlay`: sem isto o modal de denuncia abria sozinho por cima do
   primeiro video e os estados "vazio" e "erro" apareciam junto com o feed
   (visto no navegador na integracao da rede, 15/09/2026). */
[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  height: 100%;
  background: #000;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

#feedRegion {
  height: 100dvh;
}

.feed {
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  .feed {
    scroll-behavior: auto;
  }
}

.item {
  position: relative;
  height: 100dvh;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #111;
}

.item-poster,
.item-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.item-video {
  z-index: 1;
}

.item-info {
  position: relative;
  z-index: 2;
  padding: 1rem 4.5rem 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  width: 100%;
}

.item-title {
  font-size: 1.05rem;
  margin: 0;
  font-weight: 600;
  word-break: break-word;
}

.item-duration {
  font-size: 0.85rem;
  opacity: 0.8;
}

.item-sound-hint {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 999px;
  color: #fff;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

.item-actions {
  position: absolute;
  right: 0.75rem;
  bottom: 6rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.icon-action {
  background: rgba(0, 0, 0, 0.55);
  border: none;
  color: #fff;
  border-radius: 999px;
  padding: 0.6rem 0.8rem;
  font-size: 0.8rem;
  min-width: 44px;
  min-height: 44px;
}

.icon-action:focus-visible,
.btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.feed-state {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  text-align: center;
}

.btn {
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  min-height: 44px;
}

.btn-primary {
  background: #fff;
  color: #000;
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.4);
}

.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 1rem;
}

.dialog {
  background: #151515;
  border-radius: 12px;
  padding: 1.25rem;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 90dvh;
  overflow-y: auto;
}

.dialog fieldset {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dialog label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.dialog-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.dialog textarea {
  background: #0c0c0c;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 0.5rem;
  min-height: 4rem;
  resize: vertical;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

@media (min-width: 720px) {
  .item {
    justify-content: center;
  }

  .item-info,
  .item-actions {
    max-width: 480px;
  }
}
