/*
 * 证书 / 勋章版式（A4 预览与打印）
 * ---------------------------------------------------------------
 * 这是「文档排版」而非界面组件样式：证书是一张可打印的成品，需要独立的纸张比例与版心排版。
 * 尺寸使用容器查询单位 cqw，使同一份版式在弹窗预览与 A4 打印下等比缩放。
 * 颜色全部取自 Arco 官方色板令牌（rgb(var(--primary-N)) / var(--color-text-N)），不另设色值。
 */
.eh-cert-sheet {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #fff;
  color: var(--color-text-1);
  border: 1px solid var(--color-border-2);
  border-radius: var(--border-radius-medium);
  container-type: inline-size;
  font-family: inherit;
}
.eh-cert-sheet.eh-cert-a4 { aspect-ratio: 297 / 210; }
.eh-cert-sheet.eh-cert-a4.portrait { aspect-ratio: 210 / 297; }
.eh-cert-sheet.eh-cert-square { aspect-ratio: 1 / 1; }

.eh-cert-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .9; }
.eh-cert-frame {
  position: absolute;
  inset: 4.5cqw;
  border: 1px solid rgb(var(--primary-2));
  border-radius: 1cqw;
  pointer-events: none;
}
.eh-cert-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8cqw 10cqw;
  gap: 1.2cqw;
}
.eh-cert-mark {
  width: 6cqw;
  height: 6cqw;
  border-radius: 1.6cqw;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(var(--primary-6));
  color: #fff;
  font-size: 3cqw;
  margin-bottom: 1cqw;
}
.eh-cert-title { font-size: 5.6cqw; font-weight: 700; letter-spacing: .35cqw; color: var(--color-text-1); }
.eh-cert-sub { font-size: 1.5cqw; letter-spacing: .35cqw; color: var(--color-text-3); text-transform: uppercase; }
.eh-cert-body { font-size: 2cqw; line-height: 1.9; color: var(--color-text-1); max-width: 72cqw; margin-top: 1cqw; }
.eh-cert-name {
  font-size: 3.6cqw;
  font-weight: 600;
  color: rgb(var(--primary-6));
  border-bottom: 1px solid rgb(var(--primary-2));
  padding: 0 3cqw 1cqw;
  margin-top: 1cqw;
}
.eh-cert-meta {
  font-size: 1.6cqw;
  color: var(--color-text-3);
  display: flex;
  gap: 3cqw;
  flex-wrap: wrap;
  justify-content: center;
}
.eh-cert-seal {
  margin-top: 1.5cqw;
  padding: .8cqw 2.4cqw;
  border: 1px solid rgb(var(--primary-3));
  border-radius: .6cqw;
  color: rgb(var(--primary-6));
  font-size: 1.5cqw;
  letter-spacing: .2cqw;
}
.eh-cert-no {
  position: absolute;
  right: 5cqw;
  bottom: 4cqw;
  font-size: 1.2cqw;
  color: var(--color-text-4);
}

/* 勋章：圆形徽章式排版 */
.eh-cert-sheet.eh-cert-square .eh-cert-inner { padding: 10cqw; gap: 1.6cqw; }
.eh-cert-sheet.eh-cert-square .eh-cert-title { font-size: 8cqw; }
.eh-cert-sheet.eh-cert-square .eh-cert-sub { font-size: 2.2cqw; }
.eh-cert-sheet.eh-cert-square .eh-cert-body { font-size: 3cqw; max-width: 70cqw; }
.eh-cert-sheet.eh-cert-square .eh-cert-name { font-size: 5cqw; }
.eh-cert-sheet.eh-cert-square .eh-cert-mark { width: 12cqw; height: 12cqw; border-radius: 50%; font-size: 5cqw; }

/* 打印：仅输出证书版式，页面其余元素隐藏；纸张尺寸由运行时注入的 @page 决定 */
#eh-cert-print { position: fixed; left: 0; top: 0; z-index: 9999; background: #fff; }
#eh-cert-print .eh-cert-sheet { width: 100%; height: 100%; border: none; border-radius: 0; }
@media print {
  body.eh-printing-cert > * { display: none !important; }
  body.eh-printing-cert #eh-cert-print { display: block !important; }
  #eh-cert-print { position: static; width: 100%; height: 100%; }
  html, body { background: #fff !important; }
}
