/* ==========================================================================
   Nexus · Shared Rooms (#14)
   ========================================================================== */

.nx-rooms-mount {
  display: inline-flex;
  align-items: center;
  margin-left: 12px;
}

/* ---- Pill ---- */
.nx-rooms-pill,
.nx-rooms-pill-empty {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--rule, #DBCFB5);
  background: var(--surface, #FBF6EB);
  border-radius: var(--r-pill, 999px);
  font-family: var(--font-ui, sans-serif);
  font-size: 12.5px;
  color: var(--ink, #1A1814);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.nx-rooms-pill:hover,
.nx-rooms-pill-empty:hover {
  background: var(--surface-2, #F2EBDB);
  border-color: var(--ink-3, #807565);
  transform: translateY(-0.5px);
}
.nx-rooms-pill-empty {
  padding: 6px 12px;
  color: var(--ink-3, #807565);
  background: transparent;
  border: 1px dashed var(--rule, #DBCFB5);
}
.nx-rooms-pill-ico {
  font-size: 14px;
  opacity: 0.7;
}

/* ---- Avatar stack ---- */
.nx-rooms-stack {
  display: inline-flex;
  align-items: center;
  position: relative;
}
.nx-rooms-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-soft, rgba(95,126,99,0.15));
  color: var(--primary-deep, #44604A);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  border: 2px solid var(--surface, #FBF6EB);
  margin-right: -8px;
  overflow: hidden;
  flex-shrink: 0;
}
.nx-rooms-avatar:last-child { margin-right: 0; }
.nx-rooms-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.nx-rooms-avatar-more {
  background: var(--surface-3, #E5DDC8);
  color: var(--ink-2, #4D453B);
}

/* ---- Pill meta ---- */
.nx-rooms-pill-meta {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.15;
  gap: 1px;
  margin-left: 4px;
}
.nx-rooms-pill-name {
  font-weight: 600;
  font-size: 12.5px;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nx-rooms-pill-sub {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3, #807565);
  font-family: var(--font-mono, monospace);
}
.nx-rooms-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-soft, #A89C88);
}
.nx-rooms-live-dot.live {
  background: var(--primary, #5F7E63);
  box-shadow: 0 0 0 0 rgba(95,126,99,0.55);
  animation: nx-rooms-pulse 1.6s ease-out infinite;
}
@keyframes nx-rooms-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(95,126,99,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(95,126,99,0); }
  100% { box-shadow: 0 0 0 0 rgba(95,126,99,0); }
}

.nx-rooms-pill-btn {
  background: transparent;
  border: none;
  color: var(--ink-3, #807565);
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  transition: background 120ms ease, color 120ms ease;
}
.nx-rooms-pill-btn:hover {
  background: var(--surface-2, #F2EBDB);
  color: var(--ink, #1A1814);
}

/* ---- Typing indicator ---- */
.nx-rooms-typing {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--ink-3, #807565);
  font-style: italic;
}
.nx-rooms-typing.hidden { display: none; }
.nx-rooms-typing-dots {
  display: inline-flex;
  gap: 3px;
}
.nx-rooms-typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-soft, #A89C88);
  animation: nx-rooms-typing-bounce 1.2s ease-in-out infinite;
}
.nx-rooms-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.nx-rooms-typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes nx-rooms-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-3px); opacity: 1; }
}

/* ---- Invite modal ---- */
.nx-rooms-invite-modal {
  position: fixed;
  inset: 0;
  z-index: 9001;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nx-rooms-invite-modal.hidden { display: none; }
.nx-rooms-invite-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20,16,12,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.nx-rooms-invite-shell {
  position: relative;
  z-index: 1;
  width: min(540px, 92vw);
  background: var(--bg, #F4EEE2);
  border: 1px solid var(--rule, #DBCFB5);
  border-radius: var(--r-lg, 18px);
  padding: 22px 24px 22px;
  box-shadow: var(--shadow-lg, 0 8px 24px -4px rgba(0,0,0,0.12), 0 20px 60px -12px rgba(0,0,0,0.28));
}
.nx-rooms-invite-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.nx-rooms-invite-head h3 {
  font-family: var(--font-display, 'Fraunces', serif);
  font-weight: 600;
  margin: 0;
  font-size: 22px;
}
.nx-rooms-invite-close {
  background: transparent;
  border: none;
  font-size: 26px;
  color: var(--ink-3, #807565);
  cursor: pointer;
  line-height: 1;
}
.nx-rooms-invite-close:hover { color: var(--ink, #1A1814); }
.nx-rooms-invite-hint {
  font-size: 13px;
  color: var(--ink-2, #4D453B);
  margin: 0 0 16px;
}

.nx-rooms-invite-link {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--rule, #DBCFB5);
  border-radius: var(--r-md, 14px);
  overflow: hidden;
  background: var(--surface, #FBF6EB);
  margin-bottom: 12px;
}
.nx-rooms-invite-link input {
  flex: 1;
  padding: 14px 16px;
  border: none;
  background: transparent;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 13px;
  color: var(--ink, #1A1814);
  min-width: 0;
}
.nx-rooms-invite-link input:focus { outline: none; }
.nx-rooms-invite-copy {
  padding: 0 22px;
  border: none;
  border-left: 1px solid var(--rule, #DBCFB5);
  background: var(--primary, #5F7E63);
  color: #FBF6EB;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 120ms ease;
}
.nx-rooms-invite-copy:hover { background: var(--primary-deep, #44604A); }

.nx-rooms-invite-tg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-pill, 999px);
  background: var(--surface-2, #F2EBDB);
  border: 1px solid var(--rule, #DBCFB5);
  color: var(--ink, #1A1814);
  font-size: 12.5px;
  text-decoration: none;
  margin-bottom: 16px;
  transition: background 120ms ease;
}
.nx-rooms-invite-tg:hover {
  background: var(--surface-3, #E5DDC8);
}

.nx-rooms-invite-members {
  border-top: 1px solid var(--rule-2, #E8DFC8);
  padding-top: 14px;
}
.nx-rooms-invite-members-label {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3, #807565);
  margin-bottom: 8px;
}
.nx-rooms-invite-members-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.nx-rooms-invite-member {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--r-pill, 999px);
  background: var(--surface, #FBF6EB);
  border: 1px solid var(--rule-2, #E8DFC8);
  font-size: 12px;
}
.nx-rooms-invite-member .nx-rooms-avatar {
  width: 22px;
  height: 22px;
  margin: 0;
  border-width: 0;
  font-size: 9.5px;
}
