/**
 * airead-actions.css
 * 公共交互操作模块样式
 */

/* ── 操作按钮基础样式 ─────────────────────────────── */
.action-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.action-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fff;
  color: #aaa;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.action-trigger:hover {
  background: #f5f5f5;
  border-color: #ccc;
  color: #333;
}

.action-trigger .action-icon {
  font-size: 14px;
  line-height: 1;
}

/* ── 关注按钮特殊样式 ─────────────────────────────── */
.action-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border: 1px solid #0070f3;
  border-radius: 20px;
  background: #fff;
  color: #0070f3;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.action-follow-btn:hover {
  background: #e6f0ff;
}

.action-follow-btn.followed {
  background: #0070f3;
  color: #fff;
  border-color: #0070f3;
}

.action-follow-btn.followed:hover {
  background: #005fcc;
}

/* ── 浮层子面板 ───────────────────────────────────── */
.actions-sub-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 9990;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  min-width: 126px;
  overflow: hidden;
  display: none;
  cursor: default;
}

/* ── 分享按钮列 ───────────────────────────────────── */
.share-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.share-btn:hover {
  background: #f5f7ff;
}

.share-btn + .share-btn {
  border-top: 1px solid #f0f0f0;
}

/* ── 问AI面板 ─────────────────────────────────────── */
#askai-panel {
  width: 480px;
  max-width: 90vw;
  padding: 16px;
  box-sizing: border-box;
}

.askai-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: #888;
}

.askai-tmpl-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.askai-tmpl {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 38px 8px 10px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.askai-tmpl:hover {
  border-color: #0070f3;
  background: #f0f6ff;
}

.askai-tmpl-check {
  color: #ccc;
  font-size: 14px;
  opacity: 0.2;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.askai-tmpl.is-active {
  border-color: #0070f3;
  background: #f0f6ff;
}

.askai-tmpl.is-active .askai-tmpl-check {
  opacity: 1;
  color: #ccc;
}

.askai-tmpl span {
  font-size: 13px;
  color: #555;
  line-height: 1;
}

.askai-tmpl-send {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: #4078FF88;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.askai-tmpl.is-active .askai-tmpl-send {
  display: inline-flex;
}

.askai-tmpl-send:hover {
  background: #005fcc;
}

.askai-custom-row {
  position: relative;
  margin-top: 12px;
}

#askai-custom {
  display: block;
  width: 100%;
  padding: 8px 40px 8px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  resize: none;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}

#askai-custom:focus,
#askai-custom.is-active {
  border-color: #0070f3;
}

.askai-custom-send {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 32px;
  height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: #4078FF88;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.askai-custom-send.is-active {
  display: inline-flex;
}

.askai-custom-send:hover {
  background: #005fcc;
}

/* ── Toast 提示 ───────────────────────────────────── */
#actions-toast {
  pointer-events: none;
}

/* ── 移动端适配 ───────────────────────────────────── */
@media (max-width: 768px) {
  .action-trigger {
    padding: 6px 10px;
    font-size: 12px;
  }

  .actions-sub-panel {
    position: fixed;
    bottom: 60px;
    left: 50%;
    top: auto;
    right: auto;
    transform: translateX(-50%);
  }
}
