/* --- grid de salas --- */
.room-grid {
  display: grid;
  /* Troque auto-fill por auto-fit aqui: */
  grid-template-columns: repeat(auto-fit, minmax(168px, 168px));
  justify-content: center;
  gap: 36px 28px;
  max-width: 756px;
  margin: 0 auto;
}

.room-card {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 168px;
}

.room-cover {
  width: 168px;
  height: 168px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

@media (hover: hover) {
  .room-card:hover .room-cover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  }
}

/* capa enviada pelo host: cobre os ladrilhos de gradiente do card */
.room-cover .room-cover-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

.room-cover.single {
  display: block;
}

.cover-tile {
  position: relative;
  overflow: hidden;
}

.cover-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.room-meta {
  margin-top: 12px;
  padding-right: 4px;
}

.room-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  position: relative;
}


.room-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.room-title.is-owner {
  color: var(--text);
}

.room-kebab {
  flex-shrink: 0;
  color: var(--text-faint);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 2px 4px;
  background: none;
  border: none;
  font-family: inherit;

  /* Adicione esta linha para empurrar o botão para baixo: */
  align-self: -4px;
}

@media (hover: hover) {
  .room-kebab:hover {
    color: var(--text-dim);
  }
}

.room-menu {
  position: fixed;
  z-index: 150;

  /* o menu passa a ter o tamanho do que tem dentro: um menu de 1 botão
     não ocupa mais a altura de um de 4 (era o `min-height: 160px` fixo) */
  width: max-content;
  min-width: 170px;
  max-width: min(280px, calc(100vw - 24px));
  height: auto;

  background: #191919;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  transform-origin: top right;
  animation: sarau-pop-in 0.16s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.room-menu[hidden] {
  display: none;
}

.room-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.room-menu button:hover {
  background: var(--surface-hover);
}

.room-menu button.danger {
  color: #ff6b6b;
}

/* Cria uma coluna para manter o título e o texto alinhados perfeitamente */
.room-title-stack {
  display: flex;
  flex-direction: column;
}

.room-sub {
  font-size: 13px; /* Reduzindo de 14px para 13px melhora a hierarquia visual por estarem mais colados */
  color: var(--text-dim);
  
  /* A mágica acontece aqui: margem negativa puxa o texto de ouvintes para cima */
  margin-top: 2px; 
}

/* --- estado vazio --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 20px 40px;
  color: var(--text-dim);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  color: #6f6f6f;
  stroke-width: 2.2;
}

.empty-state h2 {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.empty-state p {
  margin: 0;
  font-size: 14px;
  max-width: 320px;
}

/* --- botão flutuante --- */
.fab-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 32px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.fab {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(#40404080, #28282880), #282828cc;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 20px 26px;
  border-radius: 32px;              /* ← era var(--radius-full) (999px = pílula total) */
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -2px 4px rgba(0, 0, 0, 0);
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.fab:hover {
  background: #363636;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.fab:active {
  transform: scale(0.97);
}

.fab svg {
  width: 16px;
  height: 16px;
}

