/* Rooms: WhatsApp-like list density and layout */

/* Row density (WhatsApp Chats list): compact 40px avatar, tight spacing */
#roomsTab .roomsRow {
  min-height: 56px;
  padding: 8px var(--pad-r) 8px var(--pad-l);
}

#roomsTab .roomsRowAvatar {
  width: 40px;
  height: 40px;
}

#roomsTab .roomsRowAvatarLetter {
  font-size: 17px;
}

/* Row divider removed: room rows are now standalone cards with their own border */

/* Discover: sticky header with search + radius (WhatsApp-style) */
#roomsTab .roomsDiscoveryToolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 10px var(--pad-r) 10px var(--pad-l);
  gap: 8px;
  max-width: var(--app-max-w, 100%);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

#roomsTab .roomsDiscoverySearch {
  padding: 8px 12px;
  font-size: 15px;
  border-radius: 10px;
}

#roomsTab .roomsDiscoveryRadiusGroup {
  width: 100%;
  max-width: var(--app-max-w);
}

#roomsTab .roomsDiscoverySortHint {
  font-size: 12px;
  font-weight: 800;
  color: rgba(17,24,39,.56);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#roomsTab .roomsDiscoveryList {
  padding-bottom: calc(var(--pad) + 8px);
}

#roomsTab .roomsDiscoveryList .roomsListCard.roomsDiscoveryCard {
  align-items: flex-start;
  min-height: 0;
  margin-bottom: 10px;
  padding: 12px 13px;
  gap: 11px;
  border-radius: 18px;
  border: 1px solid rgba(17,24,39,.07);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96)),
    radial-gradient(circle at top right, rgba(27,149,11,.06), transparent 42%);
  box-shadow: 0 8px 18px rgba(15,23,42,.05);
}

#roomsTab .roomsDiscoveryList .roomsListCard.roomsDiscoveryCard::after {
  display: none;
}

#roomsTab .roomsDiscoveryList .roomsListCard.roomsDiscoveryCard:active {
  background:
    linear-gradient(180deg, rgba(252,253,252,.98), rgba(244,248,244,.96)),
    radial-gradient(circle at top right, rgba(27,149,11,.08), transparent 42%);
}

#roomsTab .roomsDiscoveryList .roomsDiscoveryCard .roomsRowAvatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  margin-top: 1px;
}

#roomsTab .roomsDiscoveryList .roomsDiscoveryCardBody {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#roomsTab .roomsDiscoveryList .roomsDiscoveryCardHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

#roomsTab .roomsDiscoveryList .roomsDiscoveryCardTitleWrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#roomsTab .roomsDiscoveryList .roomsDiscoveryCard .roomsRowTitle {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

#roomsTab .roomsDiscoveryList .roomsDiscoveryCard .roomsRowTitleLine {
  gap: 0;
}

#roomsTab .roomsDiscoveryList .roomsDiscoveryCardPreview {
  font-size: 12px;
  line-height: 1.32;
  color: #667085;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

#roomsTab .roomsDiscoveryList .roomsDiscoveryActionChip {
  min-width: 76px;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 11px;
  flex-shrink: 0;
  box-shadow: none;
}

#roomsTab .roomsDiscoveryList .roomsDiscoveryActionChip.roomsRowActionChipSecondary {
  background: rgba(148,163,184,.10);
  color: #667085;
  border: 1px solid rgba(148,163,184,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

#roomsTab .roomsDiscoveryList .roomsDiscoveryMetaWrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#roomsTab .roomsDiscoveryList .roomsDiscoveryMetaPill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(17,24,39,.05);
  border: 1px solid rgba(17,24,39,.06);
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

#roomsTab .roomsDiscoveryList .roomsDiscoveryMetaPillPrivacy {
  background: rgba(27,149,11,.08);
  border-color: rgba(27,149,11,.12);
  color: #1f7a13;
}

#roomsTab .roomsDiscoveryList .roomsDiscoveryMetaPillStatus {
  background: rgba(148,163,184,.13);
  border-color: rgba(148,163,184,.18);
  color: #667085;
}

#roomsTab .roomsDiscoveryList .roomsDiscoveryMetaPillActivity {
  color: #475467;
}

/* Discover empty state: balanced, with optional Enable location CTA */
#roomsTab .roomsDiscoveryEmptyState {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 12px var(--pad) 24px;
}

#roomsTab .roomsDiscoveryEmptyState .roomsEmptyCard {
  text-align: center;
  max-width: 304px;
  padding: 22px 18px 18px;
  border-radius: 22px;
  border: 1px solid rgba(17,24,39,.06);
  background:
    linear-gradient(180deg, rgba(255,255,255,.99), rgba(248,250,252,.97)),
    radial-gradient(circle at top, rgba(27,149,11,.06), transparent 48%);
  box-shadow: 0 14px 30px rgba(15,23,42,.08);
}

#roomsTab .roomsDiscoveryEmptyState .roomsEmptyIcon {
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  background: rgba(27,149,11,.08);
  color: #1f7a13;
}

#roomsTab .roomsDiscoveryEmptyState .roomsEmptyTitle {
  font-size: 16px;
  line-height: 1.25;
}

#roomsTab .roomsDiscoveryEmptyState .roomsEmptySub {
  max-width: 26ch;
  margin-left: auto;
  margin-right: auto;
}

#roomsTab .roomsDiscoveryEmptyState .roomsEmptyActions {
  margin-top: 16px;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

#roomsTab .roomsDiscoveryEmptyState .roomsEmptyActions .btn {
  min-width: 128px;
}

#roomsTab .roomsDiscoveryEmptyState .roomsDiscoveryEmptyEnableLoc {
  margin-top: 0;
}

#roomsTab .roomsRowActionChip {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
}

@media (max-width: 430px) {
  #roomsTab .roomsDiscoverySortHint {
    padding-top: 8px;
    padding-bottom: 10px;
  }

  #roomsTab .roomsDiscoveryList .roomsListCard.roomsDiscoveryCard {
    padding: 12px 13px;
    gap: 10px;
    border-radius: 17px;
  }

  #roomsTab .roomsDiscoveryList .roomsDiscoveryCardHeader {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
  }

  #roomsTab .roomsDiscoveryList .roomsDiscoveryActionChip {
    width: auto;
    min-width: 72px;
    justify-content: center;
  }
}

/* My Rooms: section labels */
#roomsTab .roomsSectionLabel {
  font-size: 12px;
  font-weight: 700;
  color: var(--wa-muted, rgba(60,60,67,.6));
  padding: 12px var(--pad-l) 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Create room CTA when no owned room */
#roomsTab .roomsRowCreate {
  min-height: 56px;
}

/* Empty state: prominent CTA when no rooms at all */
#roomsTab .roomsEmptyState.roomsEmptyStateCreate {
  padding: 18px var(--pad) 28px;
  text-align: center;
}

#roomsTab .roomsEmptyStateCreate .roomsEmptyCard{
  max-width: 380px;
  padding: 18px 16px 16px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top center, rgba(38,171,51,.12), transparent 54%),
    linear-gradient(180deg, rgba(255,255,255,1), rgba(248,250,248,1));
  box-shadow: 0 16px 40px rgba(15,23,42,.08);
}

#roomsTab .roomsWelcomeArt{
  position: relative;
  width: 108px;
  height: 74px;
  margin: 0 auto 10px;
}

#roomsTab .roomsWelcomeOrb{
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(27,149,11,.14);
}

#roomsTab .roomsWelcomeOrb svg{ width: 22px; height: 22px; fill: currentColor; }

#roomsTab .roomsWelcomeOrbMain{
  left: 50%;
  top: 0;
  width: 58px;
  height: 58px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(226,247,224,1), rgba(212,240,207,1));
  color: #1B950B;
}

#roomsTab .roomsWelcomeOrbLeft{
  left: 8px;
  bottom: 6px;
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,.98);
  color: rgba(15,23,42,.68);
}

#roomsTab .roomsWelcomeOrbRight{
  right: 6px;
  bottom: 0;
  width: 34px;
  height: 34px;
  background: linear-gradient(180deg, rgba(44,181,70,1), rgba(27,149,11,1));
  color: #fff;
}

#roomsTab .roomsWelcomeEyebrow{
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(27,149,11,.78);
}

#roomsTab .roomsEmptyStateCreate .roomsEmptyTitle{
  font-size: 22px;
  line-height: 1.08;
  font-weight: 950;
  margin-top: 8px;
  margin-bottom: 0;
}

#roomsTab .roomsEmptyStateCreate .roomsEmptySub{
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--wa-muted);
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

#roomsTab .roomsWelcomePrimary{
  margin-top: 16px;
}

#roomsTab .roomsWelcomePrimary .btn{
  width: 100%;
  max-width: none;
  min-height: 48px;
}

#roomsTab .roomsWelcomeQuickGrid{
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#roomsTab .roomsWelcomeQuickAction{
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 92px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.92);
  padding: 12px 10px 10px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15,23,42,.04);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

#roomsTab .roomsWelcomeQuickAction:active{
  transform: scale(.985);
  box-shadow: 0 4px 14px rgba(15,23,42,.05);
}

#roomsTab .roomsWelcomeQuickActionIcon{
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: rgba(27,149,11,.10);
  color: #1B950B;
}

#roomsTab .roomsWelcomeQuickActionIcon svg{ width: 18px; height: 18px; fill: currentColor; }

#roomsTab .roomsWelcomeQuickActionTitle{
  font-size: 13px;
  font-weight: 850;
  color: var(--text);
  line-height: 1.2;
}

#roomsTab .roomsWelcomeQuickActionSub{
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--wa-muted);
}

@media (max-width: 360px){
  #roomsTab .roomsWelcomeQuickGrid{
    grid-template-columns: 1fr;
  }
  #roomsTab .roomsWelcomeQuickAction{
    min-height: 76px;
  }
}

/* No joined rooms hint (under "Your room" when user has no joined rooms) */
#roomsTab .roomsJoinedEmpty {
  padding: 12px var(--pad-l);
  font-size: 13px;
  color: var(--wa-muted, rgba(60,60,67,.6));
}
