/* ============================================================
   Artalk 评论插件 — 前端样式
   版本 1.2.1
   ============================================================ */

/* ---- 评论容器 ---- */
.artalk-comment-wrap {
  margin-top: 12px;
  text-align: left;
}

.artalk-comment-container {
  min-height: 80px;
}

/* ---- 展开按钮 ---- */
.artalk-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 13px;
  /* line-height: 1.5;
  transition: all 0.2s ease; */
}



.artalk-toggle-btn:hover {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.artalk-toggle-btn:active {
  transform: scale(0.97);
}

/* ---- 暗色模式按钮 ---- */
html.dark .artalk-toggle-btn,
.dark .artalk-toggle-btn {
  color: #94a3b8;
  border-color: #334155;
}

html.dark .artalk-toggle-btn:hover,
.dark .artalk-toggle-btn:hover {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #475569;
}


/* ---- Artalk 编辑器美化 ---- */
.atk-main-editor {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.atk-main-editor:where(.dark, .dark *) {
  border-color: #334155;
  background: #1e293b;
}

/* 编辑器 header（昵称/邮箱/网址输入框） */
.atk-main-editor .atk-header {
  padding: 10px 14px 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.atk-main-editor .atk-header input {
  flex: 1;
  min-width: 100px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #f8fafc;
}

.atk-main-editor .atk-header input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.12);
  background: #fff;
}

.atk-main-editor .atk-header input:where(.dark, .dark *) {
  border-color: #334155;
  background: #0f172a;
  color: #e2e8f0;
}

.atk-main-editor .atk-header input:focus:where(.dark, .dark *) {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  background: #1e293b;
}

/* 编辑器正文 textarea */
.atk-main-editor .atk-textarea-wrap textarea,
.atk-main-editor .atk-textarea-wrap .atk-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid #f1f5f9;
  font-size: 14px;
  line-height: 1.7;
  outline: none;
  resize: vertical;
  background: #fff;
  box-sizing: border-box;
}

.atk-main-editor .atk-textarea-wrap textarea:where(.dark, .dark *),
.atk-main-editor .atk-textarea-wrap .atk-textarea:where(.dark, .dark *) {
  background: #1e293b;
  color: #e2e8f0;
  border-top-color: #334155;
}

.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp>.atk-item:where(.dark, .dark *) {
  color: #f1f5f9;
}

.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp>.atk-item:hover:where(.dark, .dark *) {
  background-color: #334155;
}

/* 编辑器底部操作栏 */
.atk-main-editor .atk-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
}

.atk-main-editor .atk-bottom:where(.dark, .dark *) {
  border-top-color: #334155;
  background: #0f172a;
}

.atk-main-editor .atk-bottom .atk-send-btn {
  padding: 6px 18px;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s, transform 0.1s;
}

.atk-main-editor .atk-bottom .atk-send-btn:hover {
  background: #4338ca;
}

.atk-main-editor .atk-bottom .atk-send-btn:active {
  transform: scale(0.97);
}

/* ---- Artalk 评论列表美化 ---- */

.atk-list .atk-list-header {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
  color: #94a3b8;
}

.atk-list .atk-list-header:where(.dark, .dark *) {
  border-bottom-color: #334155;
}

/* 评论卡片 */
.atk-comment-wrap {
  border-bottom: 1px solid #f1f5f9;
}

.atk-comment {
  /* padding: 12px 6px; */
  transition: background 0.15s;
}

.atk-comment:hover {
  background: #f8fafc;
  border-radius: 6px;
  /* padding-left: 14px; */
}

.atk-comment-wrap:where(.dark, .dark *) {
  border-bottom-color: #1e293b;
}

.atk-comment:hover:where(.dark, .dark *) {
  background: #1e293b;
}

/* 评论头像 */
.atk-comment>.atk-avatar img {
  border-radius: 3px;
  width: 45px;
  height: 45px;
}

/* 评论内容 */
.atk-comment>.atk-main>.atk-body .atk-content {
  font-size: 14px;
  line-height: 1.7;
  color: #334155;
  word-break: break-word;
}

.atk-comment>.atk-main>.atk-body .atk-content:where(.dark, .dark *) {
  color: #cbd5e1;
}

/* 评论 nickname */
.atk-comment>.atk-main>.atk-header .atk-item.atk-nick {
  font-weight: 600;
  /* color: #1e293b; */
}

/* 评论时间 */
.atk-comment>.atk-main>.atk-header .atk-item:where(.dark, .dark *) {
  color: #94a3b8;
}

/* ua-wap */
.atk-comment>.atk-main>.atk-header .atk-ua-wrap>*:where(.dark, .dark *) {
  background-color: rgba(10, 8, 8, 0.575);
}

/* 回复/投票按钮 */
.atk-comment>.atk-main>.atk-footer .atk-actions .atk-common-action-btn:where(.dark, .dark *) {
  color: #94a3b8;
}

.atk-comment>.atk-main>.atk-footer .atk-actions .atk-common-action-btn:hover:where(.dark, .dark *) {
  color: #667385;
}


/* ---- 分页加载更多按钮 ---- */
.artalk-comment-wrap .atk-list-read-more button {
  padding: 8px 24px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.artalk-comment-wrap .atk-list-read-more button:hover {
  border-color: #818cf8;
  color: #4f46e5;
  background: #f8faff;
}

html.dark .artalk-comment-wrap .atk-list-read-more button {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

/* ---- 纯计数元素 ---- */
.artalk-count-only .artalk-count {
  font-variant-numeric: tabular-nums;
}

.atk-list-footer {
  display: none;
}

/* ---- 响应式 ---- */
/* @media (max-width: 640px) {
  .artalk-comment-wrap .atk-header {
    flex-direction: column;
    gap: 4px;
  }

  .artalk-comment-wrap .atk-header input {
    min-width: auto;
  }

  .artalk-comment-wrap .atk-bottom {
    flex-wrap: wrap;
    gap: 8px;
  }
} */