/* The online room keeps its own scrolling list and its actions at the bottom. */
#side-panel {
  --lounge-bg: #120f14;
  --lounge-text: #e9dce1;
  --lounge-muted: #bca6b0;
  --lounge-line: #49313d;
  --lounge-gold: #efc08d;
  width: 264px;
  padding: 0;
  flex: 0 0 264px;
  overflow: hidden;
  border-left: 1px solid var(--lounge-line);
  background: var(--lounge-bg);
  color: var(--lounge-text);
}

#side-panel .side-panel__banner {
  position: relative;
  height: 142px;
  margin: 0;
  flex: 0 0 auto;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid #755060;
  border-radius: 0;
}

#side-panel .side-panel__banner::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(18, 15, 20, .98), rgba(18, 15, 20, .75) 31%, rgba(18, 15, 20, .08) 100%);
  content: "";
}

#side-panel .side-panel__banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

#side-panel .side-panel__banner-content {
  position: absolute;
  right: 14px;
  bottom: 12px;
  left: 14px;
  z-index: 1;
  text-shadow: 0 2px 7px #000;
}

#side-panel .side-panel__banner-title {
  color: #ffe0ab;
  font: 500 19px/1.15 Georgia, serif;
  letter-spacing: .035em;
}

#side-panel .side-panel__banner-title span {
  margin-right: 4px;
  color: #ff648c;
}

#side-panel .side-panel__banner-count {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 7px 0 0 25px;
  color: #f2d8df;
  font-size: 12px;
}

#side-panel .side-panel__live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #edc082;
  box-shadow: 0 0 8px #eeb875;
}

#side-panel .side-panel__presence {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  padding: 13px 12px 5px;
  flex: 0 0 auto;
  color: var(--lounge-muted);
  font-size: 12px;
}

#side-panel .side-panel__presence strong {
  color: var(--lounge-text);
  font-weight: 500;
  white-space: nowrap;
}

#side-panel .side-panel__users {
  min-height: 0;
  padding: 0 9px 10px;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #634553 transparent;
  scrollbar-width: thin;
}

#side-panel .users-group { margin-top: 8px; }

#side-panel .g-title {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 8px 5px 6px;
  border-bottom: 1px solid var(--lounge-line);
  color: var(--lounge-gold);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .075em;
}

#side-panel .g-title span:last-child {
  color: var(--lounge-muted);
  letter-spacing: 0;
}

#side-panel .u-item {
  position: relative;
  display: flex;
  min-height: 49px;
  align-items: center;
  gap: 9px;
  padding: 6px 5px;
  border-bottom: 1px solid rgba(151, 111, 131, .17);
  border-radius: 0;
  color: var(--online-user-color-visible, var(--online-user-color, var(--lounge-text)));
  font-size: 13px;
  line-height: 1.25;
}

#side-panel .u-item:last-child { border-bottom: 0; }
#side-panel .u-item:hover { background: rgba(114, 70, 93, .17); }
#side-panel .u-item.is-self { color: var(--online-user-color-visible, var(--online-user-color, var(--accent))); }

#side-panel .u-item.is-friend::before {
  position: absolute;
  top: 4px;
  left: 25px;
  z-index: 1;
  margin: 0;
  font-size: 10px;
}

#side-panel .u-avatar {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(162, 95, 128, .25);
  color: var(--lounge-text);
  font: 500 13px/1 Georgia, serif;
}

#side-panel .u-avatar__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#side-panel .u-details {
  display: grid;
  min-width: 0;
  gap: 2px;
  flex: 1 1 auto;
}

#side-panel .u-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#side-panel .user-chat-status {
  overflow: hidden;
  color: var(--lounge-muted);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#side-panel .u-item .profile-info-link {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  margin: 0;
  flex: 0 0 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #d5b6c3;
  font-size: 17px;
}

#side-panel .u-item .profile-info-link:hover,
#side-panel .u-item .profile-info-link:focus-visible {
  border-color: #765367;
  background: #35232e;
  color: #ffe2c9;
}

#side-panel .chat-status-picker {
  margin: 0;
  padding: 12px 12px 10px;
  flex: 0 0 auto;
  border-top: 1px solid var(--lounge-line);
  color: var(--lounge-muted);
  font-size: 11px;
  letter-spacing: .05em;
}

#side-panel .chat-status-picker select {
  min-height: 34px;
  margin-top: 2px;
  padding: 7px 9px;
  border-color: #674a59;
  border-radius: 7px;
  background: #291e28;
  color: var(--lounge-text);
  font-size: 13px;
  letter-spacing: 0;
}

#side-panel .side-panel__help-links {
  gap: 7px;
  margin: 0;
  padding: 0 12px 12px;
  flex: 0 0 auto;
}

#side-panel .side-panel__help-links .side-panel__rules-link {
  min-height: 32px;
  border: 1px solid #393939;
  border-radius: 7px;
  background: #292929;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: filter .18s ease, transform .18s ease;
}

#side-panel .side-panel__help-links .side-panel__rules-link:hover,
#side-panel .side-panel__help-links .side-panel__rules-link:focus-visible {
  border-color: #b05b82;
  background: #44313d;
  color: #fff;
}
#side-panel .side-panel__help-links .side-panel__rules-link:focus-visible {
  outline: 2px solid #df00ff;
  outline-offset: 1px;
}
#side-panel .side-panel__help-links .side-panel__rules-link:active { transform: translateY(1px); }

:root[data-theme="light"] #side-panel {
  --lounge-bg: #f7f2f5;
  --lounge-text: #372b35;
  --lounge-muted: #67525e;
  --lounge-line: #d7c6cf;
  --lounge-gold: #80513c;
}

:root[data-theme="light"] #side-panel .u-item:hover { background: #ece2e8; }
:root[data-theme="light"] #side-panel .u-avatar { background: #e8d4df; }
:root[data-theme="light"] #side-panel .chat-status-picker select { background: #fffafb; color: #372b35; }
:root[data-theme="light"] #side-panel .side-panel__help-links .side-panel__rules-link { border-color: #d5ccd7; background: #f1edf2; color: #4d4650; }
:root[data-theme="light"] #side-panel .side-panel__help-links .side-panel__rules-link:hover,
:root[data-theme="light"] #side-panel .side-panel__help-links .side-panel__rules-link:focus-visible {
  border-color: #a35e80;
  background: #e5d0dc;
  color: #372b35;
}
:root[data-theme="light"] #side-panel .u-item .profile-info-link { color: #754965; }
:root[data-theme="light"] #side-panel .u-item .profile-info-link:hover { background: #ebdce5; color: #43273a; }

@media (max-width: 960px) and (min-width: 769px) {
  #side-panel { width: 220px; flex-basis: 220px; }
}

@media (max-width: 768px) {
  #side-panel { width: 100%; flex-basis: auto; border-left: 0; }
  .mobile-view-users #side-panel { flex: 1 1 auto; }
  #side-panel .side-panel__banner { height: 128px; }
}
