/* ============================================================
   FluidLab AI — AI引导气泡样式 (BEM命名, fl-前缀)
   非侵入式右上角浮层通知
   ============================================================ */

/* 气泡容器 */
.fl-guidance-bubble {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 320px;
  background: rgba(18, 22, 32, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 242, 255, 0.2);
  border-radius: 12px;
  z-index: 9997;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: fl-bubble-slide-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transition: opacity 0.3s, transform 0.3s;
}

.fl-guidance-bubble--leaving {
  opacity: 0;
  transform: translateX(120%);
}

@keyframes fl-bubble-slide-in {
  from {
    opacity: 0;
    transform: translateX(120%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 气泡头部 */
.fl-guidance-bubble__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(0, 242, 255, 0.08), transparent);
  border-bottom: 1px solid rgba(0, 242, 255, 0.1);
}

.fl-guidance-bubble__icon {
  font-size: 18px;
  flex-shrink: 0;
}

.fl-guidance-bubble__title {
  font-size: 13px;
  font-weight: 600;
  color: #00f2ff;
  flex: 1;
}

.fl-guidance-bubble__close {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 14px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.fl-guidance-bubble__close:hover {
  background: rgba(255, 77, 77, 0.15);
  color: #ff4d4d;
}

/* 气泡内容 */
.fl-guidance-bubble__body {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #e2e8f0;
  max-height: 120px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.fl-guidance-bubble--expanded .fl-guidance-bubble__body {
  max-height: 400px;
  overflow-y: auto;
}

.fl-guidance-bubble__body p {
  margin: 0 0 6px 0;
}

.fl-guidance-bubble__body p:last-child {
  margin-bottom: 0;
}

/* 严重程度颜色 */
.fl-guidance-bubble--warning {
  border-color: rgba(255, 159, 67, 0.3);
}

.fl-guidance-bubble--warning .fl-guidance-bubble__header {
  background: linear-gradient(135deg, rgba(255, 159, 67, 0.1), transparent);
}

.fl-guidance-bubble--warning .fl-guidance-bubble__title {
  color: #ff9f43;
}

.fl-guidance-bubble--error {
  border-color: rgba(255, 77, 77, 0.3);
}

.fl-guidance-bubble--error .fl-guidance-bubble__header {
  background: linear-gradient(135deg, rgba(255, 77, 77, 0.1), transparent);
}

.fl-guidance-bubble--error .fl-guidance-bubble__title {
  color: #ff4d4d;
}

/* 操作按钮区 */
.fl-guidance-bubble__actions {
  display: flex;
  gap: 8px;
  padding: 8px 14px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.fl-guidance-action {
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: #94a3b8;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.fl-guidance-action:hover {
  border-color: rgba(0, 242, 255, 0.3);
  color: #00f2ff;
}

.fl-guidance-action--accept {
  border-color: rgba(0, 230, 118, 0.3);
  color: #00e676;
}

.fl-guidance-action--accept:hover {
  background: rgba(0, 230, 118, 0.1);
  color: #00e676;
}

.fl-guidance-action--dismiss:hover {
  border-color: rgba(255, 77, 77, 0.3);
  color: #ff4d4d;
}

/* 引导开关 */
.fl-guidance-toggle {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(18, 22, 32, 0.9);
  border: 1px solid rgba(0, 242, 255, 0.2);
  color: #00f2ff;
  font-size: 18px;
  cursor: pointer;
  z-index: 9996;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.fl-guidance-toggle:hover {
  background: rgba(0, 242, 255, 0.1);
}

.fl-guidance-toggle--off {
  opacity: 0.4;
  color: #64748b;
}

/* 气泡队列容器 */
.fl-guidance-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9997;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.fl-guidance-container .fl-guidance-bubble {
  position: relative;
  top: auto;
  right: auto;
  pointer-events: auto;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .fl-guidance-bubble {
    width: calc(100% - 32px);
    right: 16px;
    top: 70px;
  }

  .fl-guidance-container {
    right: 16px;
    top: 70px;
  }

  .fl-guidance-toggle {
    top: 70px;
    right: 16px;
  }
}
