/* Channel and group chat settings as a drawer beside the chat (assets/olone-settings-drawer.js). */

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer.modal-backdrop:not(.hidden) {
  display: block !important;
  padding: 0 !important;
  background: rgba(9, 6, 16, 0.38) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-modal {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  width: min(480px, 100vw) !important;
  max-width: none !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  gap: 0 !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  border: 0 !important;
  border-left: 1px solid rgba(185, 155, 255, 0.18) !important;
  background: linear-gradient(180deg, rgba(27, 19, 44, 0.985), rgba(16, 11, 28, 0.99)) !important;
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.5) !important;
  transform: none;
  animation: odr-in 0.22s ease-out;
  transition: transform 0.22s ease, height 0.22s ease;
}

@keyframes odr-in {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-modal__sidebar {
  display: none !important;
}

/* ---- header: cover, photo, name, status ---- */
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-head {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-handle {
  display: none;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-cover {
  position: relative;
  height: 118px;
  background:
    radial-gradient(260px 180px at 18% 0%, rgba(168, 85, 247, 0.7), transparent 70%),
    radial-gradient(260px 200px at 92% 30%, rgba(219, 39, 119, 0.4), transparent 70%),
    linear-gradient(135deg, #3b1670, #5b21b6);
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer.odr-chat .odr-cover {
  background:
    radial-gradient(260px 180px at 18% 0%, rgba(192, 132, 252, 0.6), transparent 70%),
    radial-gradient(260px 200px at 92% 30%, rgba(232, 121, 249, 0.45), transparent 70%),
    linear-gradient(135deg, #4a1772, #6d28d9);
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-cover .gcs-modal__close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  left: auto !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 12px !important;
  border: 0 !important;
  background: rgba(0, 0, 0, 0.3) !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-cover .gcs-modal__close svg {
  width: 16px;
  height: 16px;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-identity {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 0 20px;
  position: relative;
}

/* Only the photo rises onto the cover; the name sits below it. */
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-identity .odr-avatar {
  margin-top: -40px;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-avatar {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  padding: 4px;
  box-sizing: border-box;
  background: #1b1330;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer.odr-chat .odr-avatar {
  border-radius: 50%;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-avatar .gcs-sidebar__avatar-wrap,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-avatar .gcs-sidebar__avatar-inner {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  overflow: hidden;
  background: linear-gradient(135deg, #7c3aed, #c084fc) !important;
  box-shadow: none !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer.odr-chat .odr-avatar .gcs-sidebar__avatar-wrap,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer.odr-chat .odr-avatar .gcs-sidebar__avatar-inner {
  border-radius: 50% !important;
  background: linear-gradient(135deg, #9333ea, #e879f9) !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-avatar img,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-avatar .entity-avatar-preview,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-avatar .entity-avatar-preview--ph,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-avatar .gcs-sidebar__channel-avatar {
  width: 100% !important;
  height: 100% !important;
  border-radius: inherit !important;
  object-fit: cover;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-titles {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-name .gcs-sidebar__chat-name {
  margin: 0 !important;
  font-size: 21px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  color: #f7f3ff !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-meta .gcs-sidebar__status,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-meta .gcs-sidebar__extra {
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 3px 9px !important;
  border-radius: 99px !important;
  border: 0 !important;
  background: rgba(255, 255, 255, 0.07) !important;
  color: #d2c9ea !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-saved {
  position: absolute;
  right: 66px;
  top: -104px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(16, 11, 28, 0.75);
  color: #d2c9ea;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-saved.is-shown {
  opacity: 1;
  transform: none;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-saved.is-ok {
  color: #7ff0bf;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-saved.is-ok::before {
  content: "";
  width: 12px;
  height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---- grouped tabs and chips ---- */
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-tabs {
  margin: 16px 20px 0;
  display: grid;
  grid-template-columns: repeat(var(--odr-tabs, 4), minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(11, 8, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-tab {
  position: relative;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #b4aacb;
  font: 700 13px/1 Inter, system-ui, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  min-width: 0;
  white-space: nowrap;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-tab:hover {
  color: #ece5ff;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-tab.is-active {
  background: linear-gradient(100deg, #7c3aed, #a855f7);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-badge {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: #ffbd55;
  color: #2a1b00;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-subtabs {
  margin: 10px 20px 0;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-subtabs[hidden] {
  display: none;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-chip {
  height: 32px;
  padding: 0 13px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #d2c9ea;
  font: 700 12px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-chip.is-active {
  border-color: rgba(185, 155, 255, 0.5);
  background: rgba(150, 105, 255, 0.2);
  color: #ffffff;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-chip--danger {
  color: #ff9aa5;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-chip--danger.is-active {
  border-color: rgba(255, 107, 122, 0.45);
  background: rgba(255, 107, 122, 0.14);
  color: #ffd5da;
}

/* ---- content: one scroll, cards ---- */
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-modal__main {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 14px 20px 28px !important;
  display: block !important;
  grid-column: auto !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(175, 150, 225, 0.28) transparent;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-sheet {
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 0 !important;
  display: none !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-sheet.is-active {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-sheet[hidden] {
  display: none !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-sheet__head {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-sheet__title {
  margin: 0 !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #f7f3ff !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-field,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .oct-card,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .channel-invite-create,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-roles__list-card,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-roles__details-card {
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.045) !important;
  border: 1px solid rgba(255, 255, 255, 0.075) !important;
  box-shadow: none !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-field {
  margin: 0 !important;
  padding: 12px 14px !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-field__label {
  color: #b4aacb !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-field__input,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-field__textarea {
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(11, 8, 20, 0.5) !important;
  color: #f7f3ff !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-field__input:focus,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-field__textarea:focus {
  border-color: rgba(185, 155, 255, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(150, 100, 255, 0.18) !important;
}

/* Wide layouts of the old window become one column in the drawer. */
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-roles {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  min-height: 0 !important;
  overflow: visible !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-roles__list-card,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-roles__details-card,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-roles__list {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-type-grid,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer #groupChatSettingsAccessGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .channel-invite-fields {
  grid-template-columns: 1fr !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .channel-invite-item {
  grid-template-columns: 38px minmax(0, 1fr) auto !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer #groupChatSettingsMembersScroll,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer #groupChatSettingsBlacklistScroll,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .channel-settings-v2__subscribers-list {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* The drawer saves by itself: no footer with three buttons. */
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-modal__footer {
  display: none !important;
}

/* ---- member and subscriber actions as tiles ---- */
.odr-menu-proxied {
  visibility: hidden !important;
  pointer-events: none !important;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .group-chat-profile-member-row,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .channel-profile-subscriber-row {
  cursor: pointer;
}

:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
  margin: 2px 0 8px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(150, 105, 255, 0.1);
  border: 1px solid rgba(185, 155, 255, 0.25);
  animation: odr-tiles-in 0.16s ease-out;
}

@keyframes odr-tiles-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.odr-tile {
  min-height: 62px;
  padding: 8px 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 8, 20, 0.45);
  color: #ece5ff;
  font: 700 11px/1.25 Inter, system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.odr-tile:hover,
.odr-tile:focus-visible {
  background: rgba(150, 105, 255, 0.18);
  border-color: rgba(185, 155, 255, 0.4);
  outline: none;
}

.odr-tile svg {
  width: 20px !important;
  height: 20px !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.odr-tile--danger {
  color: #ff9aa5;
}

.odr-tile--danger:hover {
  background: rgba(255, 107, 122, 0.12);
  border-color: rgba(255, 107, 122, 0.35);
}

.odr-action-sheet {
  position: fixed;
  inset: 0;
  z-index: 30070;
  display: flex;
  align-items: flex-end;
  background: rgba(7, 4, 13, 0.45);
}

.odr-action-sheet__card {
  width: 100%;
  margin: 8px;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, #251a40, #170f2a);
  border: 1px solid rgba(185, 155, 255, 0.22);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: odr-sheet-up 0.2s ease-out;
}

.odr-action-sheet__who {
  font: 800 16px/1.3 Inter, system-ui, sans-serif;
  color: #f7f3ff;
}

.odr-action-sheet__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
}

.odr-action-sheet .odr-tile {
  min-height: 72px;
  font-size: 12px;
}

@keyframes odr-sheet-up {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ---- phone: a sheet from below ---- */
@media (max-width: 920px) {
  :is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer.modal-backdrop:not(.hidden) {
    background: rgba(7, 4, 13, 0.5) !important;
  }

  :is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-modal {
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: 74vh !important;
    height: 74dvh !important;
    border-left: 0 !important;
    border-top: 1px solid rgba(185, 155, 255, 0.22) !important;
    border-radius: 26px 26px 0 0 !important;
    animation: odr-sheet-up 0.24s ease-out;
  }

  :is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer.odr-full .gcs-modal {
    height: 100vh !important;
    height: 100dvh !important;
    border-radius: 0 !important;
  }

  :is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-handle {
    display: block;
    position: absolute;
    top: 8px;
    left: 50%;
    z-index: 3;
    width: 40px;
    height: 5px;
    margin-left: -20px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.55);
  }

  :is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-cover {
    height: 92px;
  }

  :is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-avatar {
    width: 72px;
    height: 72px;
  }

  :is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-identity {
    padding: 0 16px;
  }

  :is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-identity .odr-avatar {
    margin-top: -34px;
  }

  :is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-name .gcs-sidebar__chat-name {
    font-size: 19px !important;
  }

  :is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-tabs {
    margin: 14px 16px 0;
  }

  :is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-tab {
    height: 38px;
    font-size: 12px;
  }

  :is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-subtabs {
    margin: 10px 16px 0;
  }

  :is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-chip {
    height: 36px;
  }

  :is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-modal__main {
    padding: 12px 16px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
  }

  :is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-saved {
    top: -80px;
    right: 66px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-modal,
  .odr-action-sheet__card,
  :is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .odr-tiles {
    animation: none;
  }
}

/* ---- violet layer: the old settings parts used navy and blue; inside the drawer they turn violet and neutral ---- */
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer {
  --odr-surface: rgba(255, 255, 255, 0.045);
  --odr-surface-2: rgba(255, 255, 255, 0.075);
  --odr-line: rgba(255, 255, 255, 0.09);
  --odr-muted: rgba(200, 190, 224, 0.76);
  --odr-violet-grad: linear-gradient(135deg, #7c3aed, #a855f7);
  --odr-violet-soft: rgba(139, 92, 246, 0.16);
  --odr-violet-line: rgba(176, 140, 255, 0.5);
  --odr-violet-text: #d9c9ff;
}

/* plain surfaces: rows, panels, list items, small buttons */
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer :is(
  .group-chat-profile-members-panel, .group-chat-profile-search, .group-chat-profile-member-row,
  .group-chat-profile-member-menu-btn, .channel-profile-subscriber-row, .channel-invite-create-card,
  .channel-invite-item, .channel-invite-item__menu, .gcs-role-row, .gcs-role-perm, .gcs-type-card,
  .gcs-empty, .gcs-invite-card-block, .gcs-invite__row, .gcs-moderation-row, .advanced-chat-setting-row,
  .oct-chip, .gcs-btn--neutral, .gcs-btn--photo, .olone-gs-btn, .channel-settings-v2__desc-emoji-toggle,
  .group-chat-profile-member-role--member
) {
  background: var(--odr-surface) !important;
  border-color: var(--odr-line) !important;
}
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer :is(.group-chat-profile-member-row, .channel-profile-subscriber-row, .gcs-role-row, .channel-invite-item):hover {
  background: var(--odr-surface-2) !important;
}
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer :is(.oct-line, .gcs-divider) {
  border-color: rgba(255, 255, 255, 0.06) !important;
}
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer :is(input, textarea, select):not([type="checkbox"]):not([type="radio"]) {
  border-color: var(--odr-line) !important;
}
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer :is(input, textarea):not([type="checkbox"]):not([type="radio"]):focus {
  border-color: var(--odr-violet-line) !important;
  box-shadow: 0 0 0 3px rgba(150, 100, 255, 0.18) !important;
}

/* chosen and switched-on states */
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer :is(.gcs-type-card.is-active, .gcs-role-row.is-active, .oct-chip.is-active, .advanced-chat-setting-row--on) {
  background: var(--odr-violet-soft) !important;
  border-color: var(--odr-violet-line) !important;
}
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer :is(.gcs-type-card__check, .settings-toggle-slider) {
  border-color: var(--odr-line) !important;
}
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .gcs-type-card.is-active .gcs-type-card__check,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer input:checked + .settings-toggle-slider,
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer .is-on:not(.gcs-toggle) {
  background: var(--odr-violet-grad) !important;
  border-color: rgba(196, 160, 255, 0.55) !important;
}

/* main action buttons */
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer :is(#channelInviteCreateBtn, #groupChatCreateRoleBtn, #octInvCreate, .gcs-btn--save, .gcs-btn--create-role) {
  background: var(--odr-violet-grad) !important;
  border-color: rgba(196, 160, 255, 0.4) !important;
  color: #ffffff !important;
}
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer :is(.gcs-btn--copy, .channel-invite-item__copy, #channelInviteActiveCount) {
  background: var(--odr-violet-soft) !important;
  border-color: rgba(176, 140, 255, 0.32) !important;
  color: var(--odr-violet-text) !important;
}

/* small icon squares and badges */
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer :is(
  .oct-card__icon, .gcs-role-row__icon, .gcs-role-perm__icon, .gcs-moderation-row__icon,
  .channel-invite-item__icon, .gcs-roles__badge--system, .group-chat-profile-member-avatar.group-chat-profile-member-fallback
) {
  background: rgba(139, 92, 246, 0.13) !important;
  border-color: rgba(176, 140, 255, 0.26) !important;
  color: var(--odr-violet-text) !important;
}
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer :is(.gcs-type-card__icon, .gcs-empty__icon, .gcs-invite__row-icon, .group-chat-profile-blacklist-empty__icon) {
  color: var(--odr-violet-text) !important;
}

/* grey-blue small text becomes lavender grey */
:is(#channelSettingsV2Modal, #groupChatSettingsModal, #channelProfileModal, #groupChatProfileModal).olone-drawer :is(
  .gcs-field__help, .gcs-field__counter, .gcs-type-card__desc, .gcs-empty__text, .gcs-sheet__subtitle,
  .channel-invite-item__meta, .advanced-chat-setting-description, .oct-card__desc, .oct-muted, .oct-chevron,
  .gcs-members-hint, .group-chat-profile-hint, .group-chat-profile-member-handle, .group-chat-profile-member-role--member,
  .group-chat-profile-blacklist-empty__text, .gcs-role-row__subtitle, .gcs-roles__details-desc, .gcs-role-perm__desc,
  .gcs-invite__desc, .gcs-moderation-row__desc, .gcs-moderation-row__chevron, .advanced-chat-setting-help
) {
  color: var(--odr-muted) !important;
}

/* tiles and phone action sheet */
.odr-tile {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.09);
}

/* ---- profiles in the drawer look (channel and group chat, 28.11) ---- */
:is(#channelProfileModal, #groupChatProfileModal).olone-drawer .odr-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer .odr-name .gcs-sidebar__heading {
  margin: 0 !important;
  font-size: 21px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: #f7f3ff !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer .odr-name :is(.channel-profile-sidebar__handle, .group-chat-profile-sidebar__handle) {
  margin: 0 !important;
  font-size: 13px !important;
  color: #b4aacb !important;
  text-align: left !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer .odr-actions {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px !important;
  margin: 14px 20px 0 !important;
  padding: 0 !important;
  width: auto !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer .odr-actions > button:not(.hidden) {
  flex: 1 1 140px;
  min-height: 42px !important;
  margin: 0 !important;
  width: auto !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer .odr-actions > button.hidden {
  display: none !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer .odr-actions .gcs-btn--save {
  background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
  border-color: rgba(196, 160, 255, 0.4) !important;
  color: #ffffff !important;
}

/* One column of cards; the name and the handle are already in the header. */
:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-layout, .group-chat-profile-layout) {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  grid-template-columns: none !important;
  align-items: stretch !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-primary-col, .group-chat-profile-primary-col, .channel-profile-side-cards, .group-chat-profile-side-cards) {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  align-items: stretch !important;
  align-self: stretch !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-info-card__title, .channel-profile-info-card__handle, .group-chat-profile-info-card__title, .group-chat-profile-info-card__handle) {
  display: none !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer [data-channel-profile-sheet="overview"] > .gcs-sheet__head,
:is(#channelProfileModal, #groupChatProfileModal).olone-drawer [data-group-chat-profile-sheet="overview"] > .gcs-sheet__head {
  display: none !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-info-card, .group-chat-profile-info-card, .channel-profile-media, .group-chat-profile-media, .channel-profile-side-card, .group-chat-profile-side-card, .channel-profile-stat-card, .group-chat-profile-stat-card, .group-chat-profile-invite-card, .group-chat-profile-members-panel) {
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.045) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  align-self: stretch !important;
  box-sizing: border-box !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-info-card, .group-chat-profile-info-card) {
  padding: 12px 14px !important;
  min-height: 0 !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-media, .group-chat-profile-media) {
  padding: 12px 14px !important;
}

/* Pinned info: icon, text, arrow, all inside the card. */
:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-pinned-card, .group-chat-profile-pinned-card) {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) 16px !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 14px !important;
  text-align: left !important;
  position: relative !important;
  overflow: hidden !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-pinned-card__icon, .group-chat-profile-pinned-card__icon) {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  display: grid !important;
  place-items: center !important;
  background: rgba(139, 92, 246, 0.16) !important;
  color: #d9c9ff !important;
  margin: 0 !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-pinned-card__icon, .group-chat-profile-pinned-card__icon) svg {
  width: 18px !important;
  height: 18px !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-side-card__chevron, .group-chat-profile-side-card__chevron) {
  position: static !important;
  transform: none !important;
  margin: 0 !important;
  color: #b4aacb !important;
  font-weight: 700;
  justify-self: end;
}

/* Counts: three equal tiles; the date wraps instead of being cut. */
:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-stats, .group-chat-profile-stats) {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: auto !important;
  margin: 0 !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-stat-card, .group-chat-profile-stat-card) {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 12px 6px !important;
  text-align: center !important;
  min-height: 0 !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-stat-card__icon, .group-chat-profile-stat-card__icon) {
  width: 30px !important;
  height: 30px !important;
  border-radius: 9px !important;
  display: grid !important;
  place-items: center !important;
  background: rgba(139, 92, 246, 0.16) !important;
  color: #d9c9ff !important;
  margin: 0 !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-stat-card__icon, .group-chat-profile-stat-card__icon) svg {
  width: 16px !important;
  height: 16px !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-stat-card__content, .group-chat-profile-stat-card__content) {
  min-width: 0 !important;
  width: 100% !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-stat-card__value, .group-chat-profile-stat-card__value) {
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #f7f3ff !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-stat-card__value--small, .group-chat-profile-stat-card__value--small) {
  font-size: 13px !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-stat-card__label, .group-chat-profile-stat-card__label) {
  margin: 2px 0 0 !important;
  font-size: 11.5px !important;
  color: rgba(200, 190, 224, 0.78) !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer .group-chat-profile-members-panel {
  padding: 12px !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer .group-chat-profile-invite-card {
  padding: 14px !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-media__grid, .group-chat-profile-media__grid) {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-info-card__desc-btn, .group-chat-profile-info-card__desc-btn) {
  width: 100% !important;
  text-align: left !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer .odr-tabs[hidden] {
  display: none !important;
}

:is(#channelProfileModal, #groupChatProfileModal).olone-drawer :is(.channel-profile-side-cards, .group-chat-profile-side-cards, .channel-profile-stats, .group-chat-profile-stats, .channel-profile-primary-col, .group-chat-profile-primary-col) {
  max-width: none !important;
  grid-column: auto !important;
}
