/* ==============================================
   港中坪原型 - 右侧注释面板 (通用组件)
   左：原型交互区 / 右：注释（业务规则）展示区
   切换按钮可展开/折叠
   ============================================== */

.comment-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 340px;
  background: white;
  border-left: 1px solid #fcd34d;
  z-index: 30;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.06);
}

.comment-panel.collapsed {
  transform: translateX(100%);
}

.comment-panel-header {
  padding: 12px 16px;
  background: #fffbeb;
  border-bottom: 1px solid #fcd34d;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.comment-panel-header h3 {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #92400e;
  margin: 0;
}

.comment-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: white;
  color: #d97706;
  border: 1px solid #fcd34d;
  cursor: pointer;
  transition: all 0.2s;
}

.comment-toggle-btn:hover {
  background: #fef3c7;
}

.comment-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.comment-item {
  padding: 10px 12px;
  border-left: 3px solid #1aad19;
  background: #f0fdf4;
  border-radius: 0 4px 4px 0;
  margin-bottom: 10px;
  font-size: 12px;
  color: #1f2937;
  line-height: 1.6;
}

.comment-item .num {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  background: #1aad19;
  color: white;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
  margin-right: 6px;
  vertical-align: middle;
}

.comment-item .body {
  display: inline;
}

.comment-item .body b {
  color: #1f2937;
}

.comment-empty {
  text-align: center;
  color: #9ca3af;
  padding: 40px 20px;
  font-size: 12px;
  background: #fafbfc;
  border: 1px dashed #e5e7eb;
  border-radius: 6px;
}

.comment-hint {
  margin-top: 12px;
  padding: 8px 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.5;
}

/* 折叠态下显示的浮动展开按钮 */
.floating-toggle {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 90px;
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fcd34d;
  border-right: none;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.08);
  writing-mode: vertical-rl;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  transition: background 0.2s;
}

.floating-toggle.visible {
  display: flex;
}

.floating-toggle:hover {
  background: #fde68a;
}

.floating-toggle i {
  writing-mode: horizontal-tb;
  margin-bottom: 4px;
}

/* 移动端隐藏注释面板 */
@media (max-width: 1023px) {
  .comment-panel,
  .floating-toggle {
    display: none !important;
  }
}
