/* In-room header tabs, magic search, media panel */
.sl-room-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 8px;
}

.sl-room-header-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sl-room-header-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: #b8c2d6;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.sl-room-header-tab.is-active,
.sl-room-header-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sl-room-magic-search {
  position: relative;
  flex: 1 1 220px;
  max-width: 320px;
  min-width: 140px;
}

.sl-room-magic-search input {
  width: 100%;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #eef2ff;
  padding: 0 14px 0 34px;
  font-size: 12px;
  outline: none;
}

.sl-room-magic-search input:focus {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

.sl-room-magic-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 12px;
  pointer-events: none;
}

.sl-room-magic-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1000002;
  background: #0d111a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.sl-room-magic-results[hidden] {
  display: none !important;
}

.sl-room-magic-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #e8edf7;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.sl-room-magic-result:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sl-room-magic-result img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  background: #111;
}

.sl-room-magic-result small {
  color: #94a3b8;
  margin-left: auto;
}

.sl-room-media-panel {
  position: fixed;
  top: 58px;
  left: 0;
  right: 0;
  z-index: 1000001;
  max-height: min(62vh, 520px);
  background: linear-gradient(180deg, rgba(8, 11, 18, 0.98), rgba(5, 7, 12, 0.98));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.24s ease, opacity 0.24s ease;
  display: flex;
  flex-direction: column;
}

.sl-room-media-panel.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sl-room-media-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sl-room-media-panel-head strong {
  color: #fff;
  font-size: 14px;
}

.sl-room-media-panel-close {
  appearance: none;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.sl-room-media-panel-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.sl-room-media-panel-tabs::-webkit-scrollbar {
  display: none;
}

.sl-room-panel-tab {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sl-room-panel-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sl-room-panel-tab.is-active {
  background: #f5b23b;
  border-color: #f5b23b;
  color: #121212;
}

.sl-room-media-panel-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 14px;
}

.sl-room-media-loading,
.sl-room-media-empty {
  color: #94a3b8;
  text-align: center;
  padding: 28px 12px;
  font-size: 14px;
}

.sl-room-profile-summary {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

.sl-room-profile-hero {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.sl-room-profile-hero img {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sl-room-profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sl-room-profile-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}

.sl-room-profile-bio {
  color: #dbe4f0;
  line-height: 1.55;
  font-size: 14px;
  white-space: pre-wrap;
}

.sl-room-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.sl-room-media-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #111722;
  border: 1px solid rgba(255, 255, 255, 0.08);
  aspect-ratio: 16 / 10;
}

.sl-room-media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sl-room-media-card .sl-room-media-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 18px;
}

/* When a per-item price is known, stack the lock icon over an explicit
   token price so the member sees exactly what the unlock costs. */
.sl-room-media-card .sl-room-media-lock-price {
  flex-direction: column;
  gap: 5px;
  font-size: 15px;
}

.sl-room-media-card .sl-room-media-price {
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f5b23b;
  color: #121212;
  white-space: nowrap;
}

.sl-room-media-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

body.sl-live-room-shell-enabled .sl-room-topbar {
  flex-wrap: wrap;
  gap: 8px;
}

body.sl-live-room-shell-enabled .sl-room-topbar-main {
  flex: 1 1 100%;
}

.sl-room-pip-goal-tip {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.sl-room-pip-goal-tip[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .sl-room-header-nav {
    order: 3;
    flex: 1 1 100%;
    flex-wrap: wrap;
  }

  .sl-room-magic-search {
    max-width: none;
    flex: 1 1 100%;
  }

  .sl-room-header-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .sl-room-header-tab {
    flex: 1 1 auto;
    text-align: center;
    padding: 8px 8px;
  }
}

.sl-room-header-fanclub {
  appearance: none;
  border: 0;
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.22), rgba(196, 0, 82, 0.28));
  border: 1px solid rgba(255, 51, 102, 0.35);
  color: #ffe4ec;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sl-room-header-social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sl-room-header-social-link {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  text-decoration: none;
  font-size: 14px;
}

.sl-room-header-social-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sl-room-header-tab-count {
  opacity: 0.72;
  font-weight: 600;
}

.sl-room-feed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sl-room-feed-card {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sl-room-feed-body {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}

.sl-room-feed-media {
  width: 100%;
  display: block;
  max-height: 280px;
  object-fit: cover;
  background: #0a0c12;
}

.sl-room-feed-lock {
  position: relative;
  min-height: 160px;
}

.sl-room-feed-lock img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  filter: blur(10px);
  transform: scale(1.05);
}

.sl-room-feed-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(8, 10, 18, 0.55);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
}

.sl-room-feed-meta {
  display: flex;
  gap: 14px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

