/* ========== 07-bubble-menu.css ========== */
/* 氣泡長按菜單、多選模式、引用欄、收藏列表 */

/* ===== Bubble Action Bar（多選） ===== */
.bubble-action-bar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(29, 29, 31, .97);
  backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  padding: 10px 16px;
  gap: 12px;
  z-index: 170;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.bubble-action-bar.show {
  display: flex;
}

.bubble-action-bar .bab-count {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  flex: 1;
}

.bubble-action-bar .bab-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, .7);
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  transition: background .15s;
}

.bubble-action-bar .bab-btn:active {
  background: rgba(255, 255, 255, .1);
}

.bubble-action-bar .bab-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.bubble-action-bar .bab-btn.danger {
  color: #ff6b6b;
}

.bubble-action-bar .bab-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 30px;
  height: 30px;
}

.bubble-action-bar .bab-close:active {
  background: rgba(255, 255, 255, .1);
}

.bubble-action-bar .bab-close svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
}

/* ===== 多選勾選框 ===== */
.msg-row.selected .msg-bubble {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .3);
  opacity: .85;
}

.msg-row .msg-check {
  display: none;
  width: 22px;
  height: 22px;
  border: 2px solid #d1d1d6;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: auto;
  transition: all .2s;
}

.msg-row.multi-mode .msg-check {
  display: flex;
}

.msg-row .msg-check.checked {
  background: #1d1d1f;
  border-color: #1d1d1f;
}

.msg-row .msg-check.checked svg {
  stroke: #fff;
}

.msg-row .msg-check svg {
  width: 12px;
  height: 12px;
  stroke: transparent;
  fill: none;
  stroke-width: 3;
}

/* ===== Bubble Menu Overlay ===== */
.bubble-menu-overlay {
  position: absolute;
  inset: 0;
  z-index: 155;
  display: none;
  background: rgba(0, 0, 0, .25);
  backdrop-filter: blur(2px);
}

.bubble-menu-overlay.show {
  display: block;
}

.bubble-menu {
  position: absolute;
  z-index: 160;
  background: #fff;
  border: 1px solid #e5e5ea;
  border-radius: 14px;
  box-shadow: 0 12px 40px -8px rgba(0, 0, 0, .18);
  min-width: 160px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px) scale(.96);
  transition: all .15s;
  overflow: hidden;
}

.bubble-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.bubble-menu .bm-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 10px;
  cursor: pointer;
  border-bottom: 1px solid #f2f2f7;
  font-size: 14px;
  color: #1d1d1f;
  transition: background .12s;
}

.bubble-menu .bm-item:last-child {
  border-bottom: none;
}

.bubble-menu .bm-item:active {
  background: #f2f2f7;
}

.bubble-menu .bm-item svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.bubble-menu .bm-item.danger {
  color: #ff3b30;
}

/* ===== Chat Quote Bar ===== */
.chat-quote-bar {
  display: none;
  align-items: center;
  padding: 8px 12px;
  background: rgba(242, 242, 247, .95);
  backdrop-filter: blur(8px);
  border-top: 1px solid #e5e5ea;
  gap: 10px;
  flex-shrink: 0;
}

.chat-quote-bar.show {
  display: flex;
}

.chat-quote-bar .cqb-line {
  width: 3px;
  height: 28px;
  border-radius: 1.5px;
  background: #8e8e93;
  flex-shrink: 0;
}

.chat-quote-bar .cqb-text {
  flex: 1;
  font-size: 12px;
  color: #8e8e93;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.chat-quote-bar .cqb-text .cqb-name {
  font-weight: 600;
  color: #3a3a3c;
}

.chat-quote-bar .cqb-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.chat-quote-bar .cqb-close svg {
  width: 16px;
  height: 16px;
  stroke: #8e8e93;
  fill: none;
  stroke-width: 2;
}

/* ===== 引用樣式（氣泡內） ===== */
.msg-bubble .msg-quote {
  padding: 6px 10px;
  margin-bottom: 6px;
  background: rgba(0, 0, 0, .04);
  border-radius: 8px;
  border-left: 3px solid #8e8e93;
  font-size: 11px;
  color: #8e8e93;
  line-height: 1.3;
}

.msg-bubble .msg-quote .mq-name {
  font-weight: 600;
  color: #6e6e73;
}

.msg-row.sent .msg-bubble .msg-quote {
  background: rgba(0, 0, 0, .06);
}

/* ===== Bookmark List ===== */
.bookmark-list-item {
  display: flex;
  align-items: flex-start;
  padding: 14px 16px;
  gap: 12px;
  border-bottom: 1px solid #f2f2f7;
  cursor: pointer;
}

.bookmark-list-item:last-child {
  border-bottom: none;
}

.bookmark-list-item:active {
  background: #f9f9fb;
}

.bookmark-list-item .bli-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e5ea;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bookmark-list-item .bli-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bookmark-list-item .bli-info {
  flex: 1;
  min-width: 0;
}

.bookmark-list-item .bli-name {
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
}

.bookmark-list-item .bli-text {
  font-size: 13px;
  color: #3a3a3c;
  margin-top: 2px;
  line-height: 1.4;
}

.bookmark-list-item .bli-time {
  font-size: 11px;
  color: #c7c7cc;
  margin-top: 4px;
}

.bookmark-list-item .bli-del {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}

.bookmark-list-item .bli-del svg {
  width: 14px;
  height: 14px;
  stroke: #ff3b30;
  fill: none;
  stroke-width: 1.5;
}
