/* ========== 08-chat-extras.css ========== */
/* Glass Morphism Unified Theme */

/* ===== Transfer Bubble ===== */
.msg-bubble.transfer-msg {
  min-width: 200px;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 18px !important;
}

.transfer-card {
  padding: 16px;
  border-radius: 18px;
}

.msg-row.sent .transfer-card {
  background: linear-gradient(135deg, #b8b8b8, #A0A0A0);
  color: #fff;
}

.msg-row.received .transfer-card {
  background: linear-gradient(135deg, #f5f5f7, #E9E9EA);
  color: #000;
}

.transfer-card .tc-label {
  font-size: 11px;
  opacity: .6;
  margin-bottom: 4px;
}

.transfer-card .tc-amount {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.5px;
}

.transfer-card .tc-note {
  font-size: 12px;
  opacity: .5;
  margin-top: 6px;
}

.transfer-actions {
  display: flex;
  border-top: 1px solid rgba(0, 0, 0, .06);
  margin-top: 12px;
  padding-top: 10px;
  gap: 8px;
}

.transfer-actions button {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}

.transfer-actions button:active {
  transform: scale(.96);
}

.transfer-actions .ta-accept {
  background: rgba(52, 199, 89, .12);
  color: #28a745;
}

.transfer-actions .ta-accept:active {
  background: rgba(52, 199, 89, .22);
}

.transfer-actions .ta-decline {
  background: rgba(255, 59, 48, .08);
  color: #ff3b30;
}

.transfer-actions .ta-decline:active {
  background: rgba(255, 59, 48, .16);
}

.transfer-status {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 6px;
  border-radius: 8px;
}

.transfer-status.accepted {
  background: rgba(52, 199, 89, .12);
  color: #28a745;
}

.transfer-status.declined {
  background: rgba(255, 59, 48, .08);
  color: #ff3b30;
}

.transfer-status.pending {
  background: rgba(142, 142, 147, .08);
  color: #8e8e93;
}

.transfer-status.requesting {
  background: rgba(142, 142, 147, .08);
  color: #8e8e93;
}

/* ===== Image Type Selector ===== */
.img-type-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.img-type-btn {
  flex: 1;
  padding: 10px 8px;
  border: 1.5px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
  cursor: pointer;
  text-align: center;
  transition: all .2s;
}

.img-type-btn:active {
  transform: scale(.96);
}

.img-type-btn.active {
  border-color: #111;
  background: rgba(0, 0, 0, 0.04);
}

.img-type-btn svg {
  width: 24px;
  height: 24px;
  stroke: #3a3a3c;
  fill: none;
  stroke-width: 1.5;
  display: block;
  margin: 0 auto 4px;
}

.img-type-btn span {
  font-size: 12px;
  color: #111;
  font-weight: 500;
}

/* ===== Plus Menu — Glass Morphism ===== */
.plus-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .15);
  z-index: 200;
  display: none;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.plus-menu-overlay.show {
  display: block;
}

.plus-menu {
  position: absolute;
  bottom: 52px;
  left: 8px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  z-index: 201;
  min-width: 195px;
  display: none;
}

.plus-menu.show {
  display: block;
  animation: menuIn .18s ease;
}

@keyframes menuIn {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.plus-menu-item {
  display: flex;
  align-items: center;
  padding: 13px 18px;
  gap: 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background .15s;
}

.plus-menu-item:last-child {
  border: none;
}

.plus-menu-item:active {
  background: rgba(0, 0, 0, 0.04);
}

.plus-menu-item svg {
  width: 22px;
  height: 22px;
  stroke: #111;
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.plus-menu-item span {
  font-size: 15px;
  color: #111;
  font-weight: 500;
}

/* ===== Sticker Panel — Glass Morphism ===== */
.sticker-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: none;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
  z-index: 150;
  max-height: 300px;
  display: none;
  flex-direction: column;
}

.sticker-panel.show {
  display: flex;
  animation: panelUp .25s ease;
}

@keyframes panelUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.sticker-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sticker-panel-header span {
  font-size: 15px;
  font-weight: 600;
  color: #111;
}

.sticker-panel-header button {
  background: rgba(0, 0, 0, 0.04);
  border: none;
  font-size: 13px;
  color: #111;
  cursor: pointer;
  padding: 5px 12px;
  font-weight: 500;
  border-radius: 12px;
  transition: background .15s;
}

.sticker-panel-header button:active {
  background: rgba(0, 0, 0, 0.08);
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  overflow-y: auto;
  flex: 1;
}

.sticker-item {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.04);
  gap: 2px;
  transition: transform .1s;
}

.sticker-item:active {
  transform: scale(.94);
}

.sticker-item img {
  width: 80%;
  height: 70%;
  object-fit: contain;
}

.sticker-item .sticker-name {
  font-size: 9px;
  color: #8e8e93;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 90%;
  text-align: center;
}

.sticker-item .sticker-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: #ff3b30;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}

.sticker-item .sticker-del svg {
  width: 10px;
  height: 10px;
  stroke: #fff;
  stroke-width: 3;
}

.sticker-panel.manage .sticker-item .sticker-del {
  display: flex;
}

.sticker-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #8e8e93;
  font-size: 14px;
  padding: 30px;
}

/* ===== Chat Menu — Glass Morphism ===== */
.chat-menu-overlay {
  position: absolute;
  inset: 0;
  z-index: 180;
  display: none;
}

.chat-menu-overlay.show {
  display: block;
}

.chat-menu {
  position: absolute;
  top: 52px;
  right: 12px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  min-width: 210px;
  z-index: 181;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(.96);
  transition: all .18s;
  overflow: hidden;
}

.chat-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.chat-menu-item {
  display: flex;
  align-items: center;
  padding: 13px 18px;
  gap: 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background .15s;
}

.chat-menu-item:last-child {
  border-bottom: none;
}

.chat-menu-item:active {
  background: rgba(0, 0, 0, 0.04);
}

.chat-menu-item svg {
  width: 18px;
  height: 18px;
  stroke: #3a3a3c;
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.chat-menu-item span {
  font-size: 15px;
  color: #111;
  font-weight: 500;
}

/* ===== Msg Popover — Glass Morphism ===== */
.msg-popover-overlay {
  position: absolute;
  inset: 0;
  z-index: 250;
  display: none;
}

.msg-popover-overlay.show {
  display: block;
}

.msg-popover {
  position: absolute;
  z-index: 260;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  min-width: 140px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px) scale(.96);
  transition: all .15s;
  overflow: hidden;
}

.msg-popover.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.msg-popover .pop-item {
  padding: 11px 16px;
  font-size: 14px;
  color: #111;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background .15s;
}

.msg-popover .pop-item:last-child {
  border: none;
}

.msg-popover .pop-item:active {
  background: rgba(0, 0, 0, 0.04);
}

.msg-popover .pop-item.danger {
  color: #ff3b30;
}

.msg-popover .pop-item svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

/* ========== Call Bubble ========== */
.msg-bubble.call-msg {
  min-width: 210px;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 18px !important;
}

.call-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
}

.msg-row.sent .call-card {
  background: linear-gradient(135deg, #b8b8b8, #A0A0A0);
  color: #fff;
}

.msg-row.received .call-card {
  background: linear-gradient(135deg, #f5f5f7, #E9E9EA);
  color: #000;
}

.call-icon-wrap {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .04);
  border-radius: 12px;
}

.msg-row.sent .call-icon-wrap {
  background: rgba(255, 255, 255, .15);
}

.call-type-icon {
  width: 20px;
  height: 20px;
  stroke: #3a3a3c;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.msg-row.sent .call-type-icon {
  stroke: #fff;
}

.call-info {
  flex: 1;
  min-width: 0;
}

.call-label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.call-status {
  font-size: 12px;
  margin-top: 4px;
  font-weight: 500;
}

.call-status.accepted { color: #28a745; }
.msg-row.sent .call-status.accepted { color: rgba(255, 255, 255, .85); }
.call-status.declined { color: #ff3b30; }
.call-status.requesting { color: #8e8e93; }
.msg-row.sent .call-status.requesting { color: rgba(255, 255, 255, .6); }

.call-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.call-accept-btn,
.call-decline-btn {
  flex: 1;
  padding: 7px 12px;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}

.call-accept-btn:active,
.call-decline-btn:active {
  transform: scale(.96);
}

.call-accept-btn {
  background: rgba(52, 199, 89, .12);
  color: #28a745;
}

.call-decline-btn {
  background: rgba(255, 59, 48, .08);
  color: #ff3b30;
}

/* ========== Center Modal — Glass Morphism ========== */
.center-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .2);
  z-index: 300;
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.center-modal-overlay.show { display: flex; }

@keyframes modalZoomIn {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* ========== Call Modal ========== */
.call-modal {
  max-width: 300px;
  width: 85%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  animation: modalZoomIn .22s ease;
}

.call-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 0;
}

.call-modal .modal-header span {
  font-size: 17px;
  font-weight: 700;
  color: #111;
}

.call-options {
  display: flex;
  gap: 14px;
  padding: 24px 20px 28px;
  justify-content: center;
}

.call-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 24px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: all .2s;
  min-width: 100px;
}

.call-option-btn:active {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(.96);
}

.call-option-icon {
  width: 40px;
  height: 40px;
  stroke: #3a3a3c;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.call-option-btn span {
  font-size: 13px;
  font-weight: 500;
  color: #111;
}

/* ========== Return Confirm Modal ========== */
.return-confirm-modal {
  max-width: 300px;
  width: 85%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  animation: modalZoomIn .22s ease;
  overflow: hidden;
}

.return-confirm-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 0;
}

.return-confirm-modal .modal-header span {
  font-size: 17px;
  font-weight: 700;
  color: #111;
}

.return-confirm-body {
  padding: 24px 20px 16px;
  text-align: center;
}

.return-confirm-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: block;
}

.return-confirm-text {
  font-size: 15px;
  color: #3a3a3c;
  line-height: 1.5;
  margin: 0;
}

.return-confirm-actions {
  display: flex;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.return-cancel-btn,
.return-ok-btn {
  flex: 1;
  padding: 14px;
  border: none;
  background: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}

.return-cancel-btn:active,
.return-ok-btn:active {
  background: rgba(0, 0, 0, 0.04);
}

.return-cancel-btn {
  color: #8e8e93;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.return-ok-btn {
  color: #111;
}

/* ========== Heart Voice Panel — Glass Morphism ========== */
.heart-voice-card {
  width: 88%;
  max-width: 340px;
  max-height: 70vh;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: scale(.92) translateY(12px);
  transition: opacity .25s ease, transform .25s ease;
}

.heart-voice-card.show {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.hv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
  flex-shrink: 0;
}

.hv-title {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  letter-spacing: -.3px;
}

.hv-close {
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, 0.04);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s;
}

.hv-close:active { background: rgba(0, 0, 0, 0.08); }

.hv-close svg {
  width: 12px;
  height: 12px;
}

.hv-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 20px 16px;
  gap: 8px;
  flex-shrink: 0;
}

.hv-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #e5e5ea;
  background-size: cover;
  background-position: center;
  border: 2.5px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.hv-char-name {
  font-size: 15px;
  font-weight: 600;
  color: #111;
}

.hv-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 22px 24px;
}

.hv-section { padding: 12px 0; }

.hv-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.hv-section-label span {
  font-size: 12px;
  font-weight: 600;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.hv-section-text {
  font-size: 15px;
  line-height: 1.7;
  color: #3a3a3c;
  margin: 0;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 12px;
  border-left: 3px solid rgba(0, 0, 0, 0.06);
}

.hv-section-text.hv-thought {
  font-style: italic;
  border-left-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
}

.hv-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.05);
  margin: 2px 0;
}

/* ===== Modal Close Button — Glass ===== */
.modal-close {
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.04);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s;
}

.modal-close:active { background: rgba(0, 0, 0, 0.08); }

.modal-close svg {
  width: 12px;
  height: 12px;
  stroke: #3a3a3c;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.ch-avatar {
  cursor: pointer;
  transition: opacity .15s;
}

.ch-avatar:active { opacity: .7; }

.calling-toast {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calling-toast .calling-dot {
  width: 6px;
  height: 6px;
  background: #34c759;
  border-radius: 50%;
  animation: callingPulse 1s ease infinite;
}

@keyframes callingPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.7); }
}

.ch-notes {
  font-size: 11px;
  color: #8e8e93;
  font-weight: 400;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== Quote Bar — Glass ===== */
.chat-quote-bar {
  display: none;
  align-items: center;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 12px;
  color: #8e8e93;
  gap: 8px;
}

.chat-quote-bar.show { display: flex; }

.cqb-close {
  margin-left: auto;
  background: rgba(0, 0, 0, 0.04);
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #8e8e93;
  cursor: pointer;
  padding: 0;
  transition: background .15s;
}

.cqb-close:active {
  background: rgba(0, 0, 0, 0.08);
}

/* ===== Multi-select Action Bar — Glass ===== */
.bubble-action-bar {
  display: none;
  align-items: center;
  padding: 8px 16px;
  gap: 12px;
  width: 100%;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.bubble-action-bar.show { display: flex; }

.bubble-action-bar button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  color: #111;
}

.bubble-action-bar button:active { opacity: .6; }

#babCount {
  font-size: 14px;
  font-weight: 600;
  color: #111;
}

/* ===== Bubble Menu — Glass ===== */
.bm-overlay {
  position: absolute;
  inset: 0;
  z-index: 290;
  display: none;
}

.bm-overlay.show { display: block; }

.bm-menu {
  position: absolute;
  z-index: 291;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  min-width: 160px;
  max-width: 200px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px) scale(.96);
  transition: all .15s;
  overflow: hidden;
}

.bm-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.bm-item {
  display: flex;
  align-items: center;
  padding: 11px 14px;
  gap: 10px;
  font-size: 14px;
  color: #111;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background .1s;
}

.bm-item:last-child { border-bottom: none; }
.bm-item:active { background: rgba(0, 0, 0, 0.04); }
.bm-item.danger { color: #ff3b30; }

.bm-item svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.msg-row.selected {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 12px;
}

/* ===== Recalled Bubble ===== */
.recalled-bubble {
  opacity: .5 !important;
  font-style: italic !important;
  font-size: 12px !important;
  color: #8e8e93 !important;
  background: rgba(0, 0, 0, 0.03) !important;
}

/* ===== Message Extra Actions ===== */
.msg-extra-actions {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  padding-bottom: 4px;
  flex-shrink: 0;
}

.msg-translate-btn,
.msg-recall-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
  padding: 0;
}

.msg-translate-btn:active,
.msg-recall-btn:active {
  background: rgba(0, 0, 0, 0.08);
  transform: scale(.9);
}

.msg-translate-btn svg,
.msg-recall-btn svg {
  stroke: #8e8e93;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== Recalled View Button ===== */
.recalled-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
  padding: 2px 8px;
  border: none;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  font-size: 11px;
  color: #636366;
  cursor: pointer;
  transition: background .15s;
  vertical-align: middle;
}

.recalled-view-btn:active {
  background: rgba(0, 0, 0, 0.08);
}

.recalled-view-btn svg {
  stroke: #636366;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== Moment Bubble ===== */
.moment-bubble {
  display: flex !important;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.03) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  font-size: 13px !important;
  color: #636366 !important;
  font-style: italic;
  border-radius: 16px !important;
}

.moment-bubble svg {
  stroke: #8e8e93;
  fill: none;
  stroke-width: 1.3;
  flex-shrink: 0;
}

/* ===== Old .cs-num-input (legacy, keep for safety) ===== */
.cs-num-input {
  width: 60px !important;
  text-align: center;
  -moz-appearance: textfield;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
}

.cs-num-input::-webkit-outer-spin-button,
.cs-num-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}


/* =========================================================
   CHAT SETTINGS — Refined Card Layout
   Matches Memory Settings visual language
   ========================================================= */

/* ---- Section Headers ---- */
.cs-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 8px;
}

.cs-section-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f2f2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cs-section-icon svg {
  width: 16px;
  height: 16px;
  stroke: #636366;
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cs-section-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cs-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  letter-spacing: -.1px;
}

.cs-section-sub {
  font-size: 11px;
  color: #888;
  font-weight: 400;
  letter-spacing: .1px;
  line-height: 1.4;
}

/* Danger section accent */
.cs-section-danger .cs-section-icon {
  background: #fff5f5;
}

.cs-section-danger .cs-section-icon svg {
  stroke: #ff3b30;
}

.cs-section-danger .cs-section-title {
  color: #ff3b30;
}

/* ---- Card Container ---- */
.cs-card {
  margin: 0 16px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #ececec;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .03);
}

.cs-card-danger {
  border-color: #ffe0de;
}

/* ---- Row ---- */
.cs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #f2f2f7;
  min-height: 48px;
  gap: 12px;
}

.cs-row-last {
  border-bottom: none;
}

.cs-row-label {
  font-size: 15px;
  color: #333;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Label with sub-description (stacked) */
.cs-row-label-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.cs-row-sublabel {
  font-size: 12px;
  color: #888;
  font-weight: 400;
  line-height: 1.3;
}

/* ---- Danger Row (clickable) ---- */
.cs-row-danger {
  cursor: pointer;
  transition: background .12s;
}

.cs-row-danger:active {
  background: #fff8f8;
}

.cs-danger-text {
  color: #ff3b30 !important;
  font-weight: 600 !important;
}

.cs-danger-arrow {
  width: 16px;
  height: 16px;
  stroke: #ff3b30;
  fill: none;
  stroke-width: 1.8;
  flex-shrink: 0;
  opacity: .6;
}

/* ---- Number Input (stepper style) ---- */
.cs-num-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  background: #f5f5f5;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  flex-shrink: 0;
}

.cs-num-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
  flex-shrink: 0;
}

.cs-num-btn:active {
  background: #e8e8e8;
}

.cs-num-btn svg {
  width: 14px;
  height: 14px;
  stroke: #636366;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.cs-num-display {
  width: 40px;
  text-align: center;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  color: #333;
  -moz-appearance: textfield;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cs-num-display::-webkit-inner-spin-button,
.cs-num-display::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ---- Range Group (slider + value) ---- */
.cs-range-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  max-width: 200px;
}

.cs-range-group input[type=range] {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  outline: none;
}

.cs-range-group input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  cursor: pointer;
  border: 1px solid #e0e0e0;
}

.cs-range-val {
  width: 28px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #333;
  flex-shrink: 0;
  background: #f5f5f5;
  padding: 4px 6px;
  border-radius: 6px;
}

/* ---- Select Dropdown ---- */
.cs-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.cs-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #e0e0e0;
  background: #f5f5f5;
  padding: 8px 32px 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  outline: none;
  cursor: pointer;
  min-width: 120px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: border-color .15s, background .15s;
}

.cs-select:focus {
  border-color: #bbb;
  background: #fff;
}

.cs-select-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  stroke: #888;
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}

/* ---- Action Button (Force Publish) ---- */
.cs-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 16px 4px;
  padding: 12px 20px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: background .12s, transform .1s;
  width: calc(100% - 32px);
}

.cs-action-btn:hover {
  background: #efefef;
}

.cs-action-btn:active {
  background: #e8e8e8;
  transform: scale(.98);
}

.cs-action-btn svg {
  width: 15px;
  height: 15px;
  stroke: #636366;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---- Hint Text ---- */
.cs-hint {
  margin: 6px 32px 4px;
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  letter-spacing: .05px;
}

/* ---- Responsive ---- */
@media (max-width: 380px) {
  .cs-range-group {
    max-width: 160px;
  }

  .cs-select {
    min-width: 100px;
    font-size: 13px;
  }

  .cs-num-display {
    width: 32px;
    font-size: 15px;
  }
}

/* ===== Quote inside Message Bubble — 修复文字颜色 ===== */
.msg-quote {
  background: rgba(0, 0, 0, 0.05);
  border-left: 3px solid rgba(0, 0, 0, 0.10);
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 6px;
  font-size: 12px;
  color: #aaa;
  line-height: 1.4;
}

.msg-quote .mq-name {
  font-weight: 600;
  color: #999;
  font-size: 11px;
}

/* 发送方气泡（深灰背景）中的引用 — 用更亮的颜色 */
.msg-row.sent .msg-quote {
  background: rgba(255, 255, 255, 0.12);
  border-left-color: rgba(255, 255, 255, 0.25);
  color: #ccc;
}

.msg-row.sent .msg-quote .mq-name {
  color: #ddd;
}

/* 接收方气泡（浅灰背景）中的引用 */
.msg-row.received .msg-quote {
  background: rgba(0, 0, 0, 0.04);
  border-left-color: rgba(0, 0, 0, 0.12);
  color: #aaa;
}

.msg-row.received .msg-quote .mq-name {
  color: #999;
}
