/* Channel settings v2 — extends gcs-* from chat-settings-modal.css */

#channelSettingsV2Modal .channel-settings-v2__desc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#channelSettingsV2Modal .channel-settings-v2__desc-field,
#channelSettingsV2Modal .channel-settings-v2__desc-input-wrap {
  overflow: visible;
}

#channelSettingsV2Modal .channel-settings-v2__desc-input-wrap {
  position: relative;
}

#channelSettingsV2Modal .channel-settings-v2__desc-emoji-wrap {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 6;
}

#channelSettingsV2Modal .channel-settings-v2__desc-emoji-toggle {
  width: 34px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(134, 162, 205, 0.22);
  background: color-mix(in srgb, rgba(12, 20, 36, 0.92) 85%, transparent);
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}

#channelSettingsV2Modal .channel-settings-v2__desc-emoji-picker.emoji-picker {
  position: fixed;
  top: auto;
  bottom: auto;
  left: auto;
  right: auto;
  margin-bottom: 0;
  z-index: 1400;
  width: min(300px, calc(100vw - 48px));
  pointer-events: auto;
}

#channelSettingsV2Modal .channel-settings-v2__desc-emoji-picker.emoji-picker:not(.hidden) {
  display: grid;
}

#channelSettingsV2Modal .channel-settings-v2__nav-hidden {
  display: none !important;
}

#channelSettingsV2Modal .gcs-field--toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

#channelSettingsV2Modal .gcs-field--toggle .gcs-field__help {
  flex: 1 1 100%;
}

#channelSettingsV2Modal .gcs-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
}

#channelSettingsV2Modal .gcs-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

#channelSettingsV2Modal .gcs-toggle__track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease;
  position: relative;
}

#channelSettingsV2Modal .gcs-toggle__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

#channelSettingsV2Modal .gcs-toggle input:checked + .gcs-toggle__track {
  background: rgba(52, 211, 153, 0.45);
  border-color: rgba(52, 211, 153, 0.55);
}

#channelSettingsV2Modal .gcs-toggle input:checked + .gcs-toggle__track::after {
  transform: translateX(20px);
}

#channelSettingsV2Modal .channel-settings-v2__avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#channelSettingsV2Modal .channel-settings-v2__subscribers,
#channelSettingsV2Modal .channel-settings-v2__roles,
#channelSettingsV2Modal .channel-settings-v2__audit {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#channelSettingsV2Modal .channel-settings-v2__subscribers-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 420px;
  overflow: auto;
}

#channelSettingsV2Modal .channel-profile-subscriber-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  max-height: 56px;
  padding: 0 4px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  box-sizing: border-box;
}

#channelSettingsV2Modal .channel-profile-subscriber-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

#channelSettingsV2Modal .channel-profile-subscriber-row__open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 10px 12px;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

#channelSettingsV2Modal .channel-profile-subscriber-row__open:hover {
  background: transparent;
}

#channelSettingsV2Modal .channel-subscriber-actions {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}

#channelSettingsV2Modal .channel-subscriber-menu-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: color-mix(in srgb, var(--muted, #9ca3af) 88%, #8c92a1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.72;
  transition: opacity 140ms ease, background-color 140ms ease, color 140ms ease;
}

#channelSettingsV2Modal .channel-profile-subscriber-row:hover .channel-subscriber-menu-btn,
#channelSettingsV2Modal .channel-profile-subscriber-row.channel-subscriber-menu-open .channel-subscriber-menu-btn,
#channelSettingsV2Modal .channel-profile-subscriber-row:focus-within .channel-subscriber-menu-btn {
  opacity: 1;
}

#channelSettingsV2Modal .channel-subscriber-menu-btn:hover {
  background: color-mix(in srgb, var(--muted, #9ca3af) 14%, transparent);
  color: var(--text, #e8eaed);
}

#channelSettingsV2Modal .channel-subscriber-menu-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

#channelSettingsV2Modal .channel-subscriber-menu {
  position: absolute;
  top: calc(100% - 4px);
  right: 0;
  z-index: 40;
  min-width: 220px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: color-mix(in srgb, var(--panel, #1a1d24) 94%, #0f1115);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

#channelSettingsV2Modal .channel-subscriber-menu.hidden {
  display: none;
}

#channelSettingsV2Modal .channel-subscriber-menu-item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#channelSettingsV2Modal .channel-subscriber-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

#channelSettingsV2Modal .channel-subscriber-menu-item--danger {
  color: #f87171;
}

#channelSettingsV2Modal .channel-profile-subscriber-row__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
  flex-shrink: 0;
}

#channelSettingsV2Modal .channel-profile-subscriber-row__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#channelSettingsV2Modal .channel-profile-subscriber-row__name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#channelSettingsV2Modal .channel-profile-subscriber-row__meta {
  font-size: 12px;
  opacity: 0.7;
}

#channelSettingsV2Modal .channel-settings-v2__role-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

#channelSettingsV2Modal .channel-settings-v2__role-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0;
}

#channelSettingsV2Modal .channel-settings-v2__role-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.15);
}

#channelSettingsV2Modal .channel-settings-v2__role-add {
  display: flex;
  gap: 8px;
  align-items: center;
}

#channelSettingsV2Modal .channel-settings-v2__role-add .gcs-field__input {
  flex: 1;
}

#channelSettingsV2Modal .channel-settings-v2__audit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}

#channelSettingsV2Modal .channel-settings-v2__audit-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

#channelSettingsV2Modal .channel-settings-v2__audit-row time {
  opacity: 0.65;
  white-space: nowrap;
}

#channelSettingsV2Modal .channel-invite-sheet-subtitle {
  margin: 6px 0 0;
  color: rgba(164, 183, 213, 0.75);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}

#channelSettingsV2Modal .channel-invite-create-card {
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(23, 36, 57, 0.94), rgba(16, 27, 45, 0.94));
  border: 1px solid rgba(91, 132, 198, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

#channelSettingsV2Modal .channel-invite-create-card__header h3 {
  margin: 0;
  color: #f5f8ff;
  font-size: 16px;
  line-height: 21px;
  font-weight: 700;
}

#channelSettingsV2Modal .channel-invite-create-card__header p {
  margin: 4px 0 0;
  color: rgba(164, 183, 213, 0.75);
  font-size: 12px;
  line-height: 17px;
}

#channelSettingsV2Modal .channel-invite-create-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

#channelSettingsV2Modal .channel-invite-field > span {
  display: block;
  margin-bottom: 7px;
  color: rgba(180, 196, 220, 0.84);
  font-size: 11px;
  line-height: 15px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

#channelSettingsV2Modal .channel-invite-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 11px;
  color: #edf3ff;
  background: rgba(11, 20, 34, 0.86);
  border: 1px solid rgba(85, 126, 192, 0.23);
  outline: none;
  font: inherit;
}

#channelSettingsV2Modal .channel-invite-create-btn {
  min-height: 46px;
  margin-top: 14px;
  padding: 0 18px;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(100deg, #377fff, #635aff 55%, #8b48f1);
  border: 1px solid rgba(134, 151, 255, 0.27);
  box-shadow: 0 9px 22px rgba(73, 68, 238, 0.2);
  cursor: pointer;
  font-family: inherit;
}

#channelSettingsV2Modal .channel-invite-create-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#channelSettingsV2Modal .channel-invite-list-section {
  margin-top: 18px;
}

#channelSettingsV2Modal .channel-invite-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

#channelSettingsV2Modal .channel-invite-list-header h3 {
  margin: 0;
  color: #eef4ff;
  font-size: 15px;
  font-weight: 700;
}

#channelSettingsV2Modal #channelInviteActiveCount {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(186, 210, 255, 0.92);
  background: rgba(40, 68, 118, 0.55);
  border: 1px solid rgba(90, 136, 210, 0.28);
  font-size: 12px;
  font-weight: 700;
}

#channelSettingsV2Modal .channel-invite-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#channelSettingsV2Modal .channel-invite-item {
  min-height: 70px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 38px;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 13px;
  background: rgba(18, 30, 49, 0.82);
  border: 1px solid rgba(83, 123, 187, 0.18);
  position: relative;
}

#channelSettingsV2Modal .channel-invite-item.is-disabled {
  opacity: 0.68;
}

#channelSettingsV2Modal .channel-invite-item__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #68aaff;
  background: rgba(29, 62, 107, 0.5);
  border: 1px solid rgba(77, 133, 216, 0.25);
}

#channelSettingsV2Modal .channel-invite-item__icon svg {
  width: 18px;
  height: 18px;
}

#channelSettingsV2Modal .channel-invite-item__content {
  min-width: 0;
}

#channelSettingsV2Modal .channel-invite-item__url {
  display: block;
  min-width: 0;
  color: #edf4ff;
  font-size: 13px;
  line-height: 17px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#channelSettingsV2Modal .channel-invite-item__meta {
  display: block;
  margin-top: 4px;
  color: rgba(151, 173, 207, 0.7);
  font-size: 11px;
  line-height: 15px;
}

#channelSettingsV2Modal .channel-invite-item__badge {
  display: inline-flex;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(252, 186, 186, 0.95);
  background: rgba(90, 30, 36, 0.55);
  border: 1px solid rgba(248, 113, 113, 0.28);
}

#channelSettingsV2Modal .channel-invite-item::before,
#channelSettingsV2Modal .channel-invite-item::after {
  pointer-events: none;
}

#channelSettingsV2Modal .channel-invite-item__copy,
#channelSettingsV2Modal .channel-invite-item__menu {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
}

#channelSettingsV2Modal .channel-invite-item__copy {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 10px;
  color: rgba(188, 215, 255, 0.95);
  background: rgba(24, 51, 91, 0.56);
  border: 1px solid rgba(75, 134, 224, 0.32);
  font: inherit;
  font-weight: 650;
}

#channelSettingsV2Modal .channel-invite-item__menu {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(83, 123, 187, 0.22);
  background: rgba(18, 30, 49, 0.7);
  color: rgba(200, 216, 240, 0.9);
  font-size: 18px;
  line-height: 1;
}

#channelSettingsV2Modal .channel-invite-empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 15px;
  color: rgba(156, 177, 210, 0.76);
  background: rgba(16, 27, 44, 0.54);
  border: 1px dashed rgba(82, 124, 190, 0.22);
  gap: 6px;
  padding: 24px 16px;
}

#channelSettingsV2Modal .channel-invite-empty strong {
  color: rgba(214, 226, 246, 0.92);
  font-size: 14px;
}

#channelSettingsV2Modal .channel-invite-empty p,
#channelSettingsV2Modal .channel-invite-error p {
  margin: 0;
  font-size: 13px;
}

#channelSettingsV2Modal .channel-invite-empty.hidden,
#channelSettingsV2Modal .channel-invite-error.hidden,
#channelSettingsV2Modal .channel-invite-delete-confirm.hidden {
  display: none !important;
}

#channelSettingsV2Modal .channel-invite-error {
  min-height: 120px;
  display: grid;
  place-items: center;
  gap: 12px;
  text-align: center;
  border-radius: 15px;
  color: rgba(252, 165, 165, 0.92);
  background: rgba(48, 22, 28, 0.45);
  border: 1px solid rgba(248, 113, 113, 0.28);
  padding: 20px;
}

#channelSettingsV2Modal .channel-invite-delete-confirm {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(6, 10, 18, 0.55);
  backdrop-filter: blur(6px);
}

#channelSettingsV2Modal .gcs-modal__main {
  position: relative;
}

#channelSettingsV2Modal .channel-invite-delete-confirm__card {
  width: min(380px, calc(100% - 32px));
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(24, 36, 56, 0.98), rgba(14, 22, 36, 0.98));
  border: 1px solid rgba(96, 136, 198, 0.28);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

#channelSettingsV2Modal .channel-invite-delete-confirm__card h4 {
  margin: 0;
  color: #f4f7ff;
  font-size: 16px;
}

#channelSettingsV2Modal .channel-invite-delete-confirm__card p {
  margin: 8px 0 0;
  color: rgba(170, 188, 216, 0.8);
  font-size: 13px;
  line-height: 18px;
}

#channelSettingsV2Modal .channel-invite-delete-confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 800px) {
  #channelSettingsV2Modal .channel-invite-create-card__grid {
    grid-template-columns: 1fr;
  }

  #channelSettingsV2Modal .channel-invite-item {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }

  #channelSettingsV2Modal .channel-invite-item__copy {
    grid-column: 2 / -1;
    width: 100%;
  }
}

#channelInviteActionsMenu.channel-invite-actions-menu {
  z-index: 1850;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 24px));
  padding: 6px;
  border-radius: 12px;
  background: rgba(14, 24, 40, 0.98);
  border: 1px solid rgba(90, 132, 198, 0.28);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
  display: grid;
  gap: 2px;
}

#channelInviteActionsMenu.channel-invite-actions-menu.hidden,
#channelInviteActionsMenu.channel-invite-actions-menu[hidden] {
  display: none !important;
}

#channelInviteActionsMenu .channel-invite-actions-menu__divider {
  height: 1px;
  margin: 4px 6px;
  background: rgba(90, 132, 198, 0.22);
}

#channelInviteActionsMenu [data-invite-menu-action] {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #e8f0ff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

#channelInviteActionsMenu [data-invite-menu-action]:hover,
#channelInviteActionsMenu [data-invite-menu-action]:focus-visible {
  background: rgba(55, 90, 150, 0.35);
  outline: none;
}

#channelInviteActionsMenu .channel-invite-actions-menu__item--danger {
  color: #fda4a4;
}

