/* ============================================================
   embed.css — 可嵌入组件专用样式
   目标：在任意宽度的 iframe 里都好看；尽量少占用垂直空间；
        不依赖站点导航/页脚，也不含广告位样式。
   ============================================================ */

.embed-body {
  margin: 0;
  background: transparent;
  font-size: 15px;
}

.embed-shell {
  padding: 10px 12px 6px;
  max-width: 100%;
  overflow-x: hidden;
}

/* 顶部条：工具名 + 品牌外链（这条外链就是嵌入带来自然外链的核心） */
.embed-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.embed-title {
  font-weight: 650;
  font-size: 15px;
  color: var(--text);
  line-height: 1.3;
}
.embed-brand {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.embed-brand:hover { text-decoration: underline; }

/* 工具区：收紧内边距与标题字号，避免在小框里显得空旷 */
.embed-tool { padding: 0; }
.embed-tool .drop-zone { padding: 22px 14px; margin-bottom: 10px; }
.embed-tool .drop-zone h2 { font-size: 15px; margin: 6px 0 2px; }
.embed-tool .drop-zone p { font-size: 12.5px; }
.embed-tool .drop-icon { font-size: 26px; }
.embed-tool .settings-grid { gap: 10px; }
.embed-tool .panel { padding: 12px; }
.embed-tool .pdf-result-card { padding: 10px; }
.embed-tool .actions { margin: 10px 0 0; }

.embed-bottom {
  padding: 8px 2px 4px;
  font-size: 12.5px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}
.embed-bottom a { color: var(--text-soft); }

/* 极窄容器（侧边栏、手机）下进一步压缩 */
@media (max-width: 420px) {
  .embed-shell { padding: 8px; }
  .embed-title { font-size: 14px; }
  .embed-tool .drop-zone { padding: 16px 10px; }
}

/* ============================================================
   工具页上的"嵌入此工具"区块
   ============================================================ */
.embed-block { margin: 32px auto; }
.embed-block > p { color: var(--text-soft); max-width: 780px; }
.embed-preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 14px;
}
@media (max-width: 860px) { .embed-preview-row { grid-template-columns: 1fr; } }
.embed-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f8fafc;
}
.embed-code {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.55;
  margin: 6px 0 8px;
  white-space: pre-wrap;
  word-break: break-all;
}
.embed-code code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.embed-copy { margin-bottom: 14px; }
.embed-block h3 { font-size: 14.5px; margin: 12px 0 4px; }
