/* ========================================
   Group Chat Styles
   群聊创建页 + 群聊聊天页
   ======================================== */

/* ── 创建群聊页面 ── */

.group-create-screen {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: none;
  flex-direction: column;
  background: var(--color-bg-primary, #f7f7f7);
  z-index: 200;
}

.group-create-screen.is-active {
  display: flex;
}

.group-create-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--color-bg-secondary, #fff);
  border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.06));
  gap: 12px;
}

.group-create-header__back {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary, #1a1a1a);
  border-radius: 8px;
  transition: background 0.15s;
}

.group-create-header__back:hover {
  background: var(--color-bg-hover, rgba(0,0,0,0.04));
}

.group-create-header__back svg {
  width: 20px;
  height: 20px;
}

.group-create-header__title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary, #1a1a1a);
}

.group-create-header__done {
  padding: 6px 16px;
  border: none;
  border-radius: 16px;
  background: var(--color-accent, #07c160);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}

.group-create-header__done:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.group-create-header__done:not(:disabled):hover {
  opacity: 0.85;
}

/* 已选成员预览 */
.group-create-selected {
  padding: 10px 16px;
  background: var(--color-bg-secondary, #fff);
  border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.06));
  display: flex;
  align-items: center;
  gap: 10px;
}

.group-create-selected__list {
  display: flex;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.group-create-selected__list::-webkit-scrollbar {
  display: none;
}

.group-create-selected__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-accent, #07c160);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  position: relative;
}

.group-create-selected__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.group-create-selected__count {
  font-size: 12px;
  color: var(--color-text-secondary, #888);
  white-space: nowrap;
}

/* 搜索栏 */
.group-create-search {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--color-bg-secondary, #fff);
  gap: 8px;
  border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.06));
}

.group-create-search svg {
  width: 18px;
  height: 18px;
  color: var(--color-text-tertiary, #aaa);
  flex-shrink: 0;
}

.group-create-search__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  color: var(--color-text-primary, #1a1a1a);
}

.group-create-search__input::placeholder {
  color: var(--color-text-tertiary, #aaa);
}

/* 联系人列表 */
.group-create-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.group-create-list__item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.group-create-list__item:hover {
  background: var(--color-bg-hover, rgba(0,0,0,0.03));
}

.group-create-list__item.is-selected {
  background: var(--color-bg-hover, rgba(0,0,0,0.03));
}

.group-create-list__checkbox {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--color-border-strong, #ccc);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.group-create-list__item.is-selected .group-create-list__checkbox {
  border-color: var(--color-accent, #07c160);
  background: var(--color-accent, #07c160);
}

.group-create-list__checkbox-inner {
  width: 10px;
  height: 10px;
  display: none;
}

.group-create-list__item.is-selected .group-create-list__checkbox-inner {
  display: block;
  color: #fff;
}

.group-create-list__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-bg-tertiary, #e8e8e8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-secondary, #666);
  flex-shrink: 0;
  overflow: hidden;
}

.group-create-list__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.group-create-list__info {
  flex: 1;
  min-width: 0;
}

.group-create-list__name {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-primary, #1a1a1a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-create-list__empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-tertiary, #aaa);
  font-size: 14px;
}

/* ── 群聊聊天页面 ── */

.group-chat-screen {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: none;
  flex-direction: column;
  background: var(--color-bg-primary, #f7f7f7);
  z-index: 200;
}

.group-chat-screen.is-active {
  display: flex;
}

/* 群聊气泡 - 显示发送者名字 */
/* ── 引用块样式 ── */
.gc-quote-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  margin-bottom: 6px;
  background: rgba(0, 0, 0, 0.04);
  border-left: 3px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.4;
}

.chat-bubble--sent .gc-quote-block {
  background: rgba(255, 255, 255, 0.15);
  border-left-color: rgba(255, 255, 255, 0.4);
}

.gc-quote-block__author {
  font-weight: 500;
  color: rgba(0, 0, 0, 0.5);
}

.chat-bubble--sent .gc-quote-block__author {
  color: rgba(255, 255, 255, 0.7);
}

.gc-quote-block__text {
  color: rgba(0, 0, 0, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.chat-bubble--sent .gc-quote-block__text {
  color: rgba(255, 255, 255, 0.6);
}

.group-chat-sender-name {
  font-size: 12px;
  color: var(--color-text-tertiary, #999);
  margin-bottom: 2px;
  padding-left: 2px;
}

/* 群聊默认头像 */
.group-chat-default-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.group-chat-default-avatar svg {
  width: 60%;
  height: 60%;
  color: #fff;
}

/* 消息列表中的群聊项 - 默认群头像 */
.messages-group-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.messages-group-avatar svg {
  width: 26px;
  height: 26px;
  color: #fff;
}

/* 群聊气泡中的头像 */
.group-bubble-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-bg-tertiary, #e8e8e8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary, #666);
  flex-shrink: 0;
  overflow: hidden;
}

.group-bubble-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── 群聊设置菜单遮罩 ── */
.group-settings-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}

.group-settings-menu {
  width: 100%;
  max-width: 420px;
  background: var(--color-bg-secondary, #fff);
  border-radius: 16px 16px 0 0;
  padding: 16px 0 24px;
  animation: slideUp 0.2s ease;
}

.group-settings-menu__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary, #1a1a1a);
  padding: 0 20px 12px;
  border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.06));
  margin-bottom: 4px;
}

.group-settings-menu__item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 15px;
  color: var(--color-text-primary, #1a1a1a);
}

.group-settings-menu__item:hover {
  background: var(--color-bg-hover, rgba(0,0,0,0.03));
}

.group-settings-menu__cancel {
  text-align: center;
  padding: 14px 20px;
  margin-top: 8px;
  border-top: 1px solid var(--color-border, rgba(0,0,0,0.06));
  font-size: 15px;
  color: var(--color-text-secondary, #888);
  cursor: pointer;
  transition: background 0.15s;
}

.group-settings-menu__cancel:hover {
  background: var(--color-bg-hover, rgba(0,0,0,0.03));
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========================================
   群聊设置页面（正式全屏页面）
   ======================================== */

.group-chat-settings-screen {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: none;
  flex-direction: column;
  background: var(--color-bg-primary, #f7f7f7);
  z-index: 210;
}

.group-chat-settings-screen.is-active {
  display: flex;
}

/* 头部 */
.gcs-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--color-bg-secondary, #fff);
  border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.06));
  gap: 12px;
}

.gcs-header__back {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary, #1a1a1a);
  border-radius: 8px;
  transition: background 0.15s;
}

.gcs-header__back:hover {
  background: var(--color-bg-hover, rgba(0,0,0,0.04));
}

.gcs-header__back svg {
  width: 20px;
  height: 20px;
}

.gcs-header__title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary, #1a1a1a);
}

/* 内容区 */
.gcs-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 32px;
}

/* 卡片 */
.gcs-card {
  background: var(--color-bg-secondary, #fff);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.gcs-card__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-tertiary, #999);
  padding: 12px 16px 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* 行 */
.gcs-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.04));
}

.gcs-row:last-child {
  border-bottom: none;
}

.gcs-row--nav {
  cursor: pointer;
  transition: background 0.15s;
}

.gcs-row--nav:hover {
  background: var(--color-bg-hover, rgba(0,0,0,0.03));
}

.gcs-row__label {
  flex: 1;
  font-size: 15px;
  color: var(--color-text-primary, #1a1a1a);
}

.gcs-row__value {
  font-size: 14px;
  color: var(--color-text-secondary, #666);
  margin-right: 4px;
}

.gcs-row__badge {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  background: rgba(0,0,0,0.06);
  padding: 2px 10px;
  border-radius: 10px;
}

.gcs-row__arrow {
  width: 16px;
  height: 16px;
  color: var(--color-text-tertiary, #ccc);
  flex-shrink: 0;
}

/* 滑条行 */
.gcs-slider-row {
  padding: 4px 16px 12px;
}

.gcs-slider {
  width: 100%;
  accent-color: #1a1a1a;
}

/* 提示文字 */
.gcs-hint {
  font-size: 12px;
  color: var(--color-text-tertiary, #999);
  padding: 0 16px 12px;
  line-height: 1.4;
}

/* 开关 */
.gcs-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.gcs-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.gcs-switch__slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #ccc;
  border-radius: 24px;
  transition: 0.2s;
}

.gcs-switch__slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}

.gcs-switch input:checked + .gcs-switch__slider {
  background: #1a1a1a;
}

.gcs-switch input:checked + .gcs-switch__slider::before {
  transform: translateX(20px);
}

/* 群信息卡片 */
.gcs-group-info {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 14px;
}

.gcs-group-info__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gcs-group-info__avatar svg {
  width: 28px;
  height: 28px;
  color: #fff;
}

.gcs-group-info__detail {
  flex: 1;
}

.gcs-group-info__name {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text-primary, #1a1a1a);
  margin-bottom: 2px;
}

.gcs-group-info__count {
  font-size: 13px;
  color: var(--color-text-secondary, #888);
}

/* ── 群聊转账目标选择器 ── */
.chat-transfer-input__target-area {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.chat-transfer-input__target-label {
  font-size: 14px;
  color: var(--color-text-secondary, #666);
  white-space: nowrap;
}

.chat-transfer-input__target-select {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--color-border, rgba(0,0,0,0.1));
  border-radius: 8px;
  font-size: 14px;
  color: var(--color-text-primary, #1a1a1a);
  background: var(--color-bg-primary, #f7f7f7);
  outline: none;
  appearance: auto;
}

.chat-transfer-input__target-select:focus {
  border-color: var(--color-accent, #07c160);
}

/* ── 群聊多人通话 overlay ── */
.gc-call-overlay {
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.gc-call-bg {
  opacity: 0.15;
}

.gc-call-top {
  text-align: center;
  padding: 40px 20px 16px;
}

.gc-call-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

.gc-call-members {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.gc-call-member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.gc-call-member-more {
  background: rgba(255,255,255,0.08);
  font-size: 12px;
}

.gc-call-subtitle {
  max-height: 50vh;
}

.gc-call-speaker-name {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  margin-bottom: 2px;
}

.gc-call-text {
  white-space: pre-wrap;
  word-break: break-word;
}

/* ======== 群聊表情包导入弹窗 ======== */
.gc-sticker-import-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 600;
  display: none;
  align-items: center;
  justify-content: center;
}
.gc-sticker-import-overlay.is-active {
  display: flex;
}
.gc-sticker-import-mask {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
}
.gc-sticker-import-sheet {
  position: relative;
  width: 90%;
  max-width: 380px;
  background: var(--color-bg-secondary, #fff);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}
.gc-sticker-import-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.06));
}
.gc-sticker-import-sheet__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary, #1a1a1a);
}
.gc-sticker-import-sheet__close {
  width: 28px; height: 28px;
  border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-tertiary, #999);
  border-radius: 50%;
  transition: background 0.15s;
}
.gc-sticker-import-sheet__close:hover {
  background: var(--color-bg-hover, rgba(0,0,0,0.05));
}
.gc-sticker-import-sheet__close svg {
  width: 18px; height: 18px;
}
.gc-sticker-import-sheet__body {
  padding: 14px 16px;
}
.gc-sticker-import-sheet__cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.gc-sticker-import-sheet__cat-row label {
  font-size: 13px;
  color: var(--color-text-secondary, #666);
  white-space: nowrap;
}
.gc-sticker-import-sheet__cat-select {
  flex: 1;
  min-width: 80px;
  padding: 6px 10px;
  border: 1px solid var(--color-border, rgba(0,0,0,0.1));
  border-radius: 6px;
  font-size: 13px;
  background: var(--color-bg-primary, #f7f7f7);
  color: var(--color-text-primary, #1a1a1a);
  outline: none;
}
.gc-sticker-import-sheet__cat-new {
  width: 80px;
  padding: 6px 8px;
  border: 1px solid var(--color-border, rgba(0,0,0,0.1));
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  background: var(--color-bg-primary, #f7f7f7);
  color: var(--color-text-primary, #1a1a1a);
}
.gc-sticker-import-sheet__cat-add {
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  background: var(--color-accent, #07c160);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}
.gc-sticker-import-sheet__cat-add:hover {
  opacity: 0.85;
}
.gc-sticker-import-sheet__label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.gc-sticker-import-sheet__label-text {
  font-size: 13px;
  color: var(--color-text-secondary, #666);
}

.gc-sticker-import-sheet__textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px 12px;
  border: 1px solid var(--color-border, rgba(0,0,0,0.1));
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  background: var(--color-bg-primary, #f7f7f7);
  color: var(--color-text-primary, #1a1a1a);
  font-family: inherit;
}
.gc-sticker-import-sheet__textarea:focus {
  border-color: var(--color-accent, #07c160);
}
.gc-sticker-import-sheet__hint {
  font-size: 11px;
  color: var(--color-text-tertiary, #999);
  margin-top: 6px;
  line-height: 1.4;
}
.gc-sticker-import-sheet__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--color-border, rgba(0,0,0,0.06));
}
.gc-sticker-import-sheet__cancel {
  padding: 7px 16px;
  border: 1px solid var(--color-border, rgba(0,0,0,0.12));
  border-radius: 8px;
  background: none;
  font-size: 13px;
  color: var(--color-text-secondary, #666);
  cursor: pointer;
  transition: background 0.15s;
}
.gc-sticker-import-sheet__cancel:hover {
  background: var(--color-bg-hover, rgba(0,0,0,0.04));
}
.gc-sticker-import-sheet__submit {
  padding: 7px 20px;
  border: none;
  border-radius: 8px;
  background: var(--color-accent, #07c160);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}
.gc-sticker-import-sheet__submit:hover {
  opacity: 0.85;
}

/* 表情包面板 header actions */
.chat-sticker-panel__header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.chat-sticker-panel__manage {
  width: 28px; height: 28px;
  border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-secondary, #666);
  border-radius: 50%;
  transition: background 0.15s;
}
.chat-sticker-panel__manage:hover {
  background: var(--color-bg-hover, rgba(0,0,0,0.05));
}
.chat-sticker-panel__manage svg {
  width: 18px; height: 18px;
}

/* ── 群聊风格选择器 ── */
.gcs-style-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 14px;
}

.gcs-style-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 2px solid var(--color-border, rgba(0,0,0,0.08));
  border-radius: 12px;
  background: var(--color-bg-primary, #f7f7f7);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.gcs-style-btn:hover {
  border-color: #1a1a1a;
  background: rgba(0,0,0,0.02);
}

.gcs-style-btn.is-active {
  border-color: #1a1a1a;
  background: rgba(0,0,0,0.04);
  box-shadow: 0 0 0 1px #1a1a1a inset;
}

.gcs-style-btn__icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(0,0,0,0.03);
}

.gcs-style-btn.is-active .gcs-style-btn__icon {
  background: rgba(0,0,0,0.08);
}

.gcs-style-btn__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary, #1a1a1a);
  display: block;
  line-height: 1.3;
}

.gcs-style-btn__desc {
  font-size: 12px;
  color: var(--color-text-tertiary, #999);
  display: block;
  line-height: 1.3;
  margin-top: 1px;
}

.gcs-style-btn.is-active .gcs-style-btn__name {
  color: #1a1a1a;
}
