/* ============================================================
   eSIM Theme — 功能页样式(帮助中心/安装教程/兼容性/查用量/博客/法律页)
   ============================================================ */

/* ---------- 帮助中心 ---------- */
.help-wrap { display: flex; flex-direction: column; gap: 18px; max-width: 860px; }
.help-nav {
  display: flex; flex-wrap: wrap; gap: 8px;
  position: sticky; top: calc(var(--header-h) + 8px); z-index: 10;
}
.help-nav a {
  padding: 9px 18px; font-size: 14px; font-weight: 600;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
}
.help-nav a:hover { border-color: var(--primary); color: var(--primary); }
.help-group { padding: 6px 20px 10px; scroll-margin-top: calc(var(--header-h) + 64px); }
.help-group-title { font-size: 18px; margin: 16px 0 4px; }

/* faq-item 样式与产品页共用(product.css 仅产品页加载,这里重复定义) */
.faq-item summary {
  cursor: pointer; list-style: none; position: relative;
  font-size: 15px; font-weight: 600; padding: 15px 40px 15px 0;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "▾"; position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%); color: var(--muted); transition: transform .18s;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(180deg); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-item p { margin: 0; padding: 0 0 16px; font-size: 14px; color: var(--muted); line-height: 1.8; }
.faq-item a { color: var(--primary); font-weight: 600; }

/* ---------- 安装教程 ---------- */
.guide-wrap { max-width: 860px; display: flex; flex-direction: column; gap: 18px; }
.guide-wrap .plans-tabs { margin-bottom: 4px; }
.tab-panel { display: none; }
.tab-panel.active { display: flex; flex-direction: column; gap: 18px; }
.plans-tabs { display: flex; justify-content: center; gap: 8px; }
.tab-btn {
  padding: 10px 26px; font-size: 15px; font-weight: 600;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; cursor: pointer; transition: .18s;
}
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.guide-method { padding: 22px; }
.guide-method-title { font-size: 17px; margin: 0 0 18px; }
.guide-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.guide-steps li { display: flex; gap: 14px; }
.guide-steps .step-num {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 16px; font-weight: 800;
}
.guide-steps h3 { margin: 4px 0 4px; font-size: 15px; }
.guide-steps p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.7; }

.guide-tip { margin-top: 4px; }
.guide-tip a { color: var(--primary); font-weight: 600; }
/* attention-box 与产品页共用(此处重复定义,避免依赖 product.css) */
.attention-box {
  background: #FFF8E1; border: 1px solid #F4D58D; border-left: 4px solid #F4B400;
  border-radius: var(--radius); padding: 16px 18px;
}
.attention-title { font-size: 15px; margin: 0 0 8px; color: #8a6d1a; }
.attention-box p { margin: 0; font-size: 14px; color: #6b5a1e; line-height: 1.7; }

/* ---------- 兼容性 ---------- */
.compat-wrap { max-width: 860px; display: flex; flex-direction: column; gap: 18px; }
.compat-check { padding: 22px; }
.compat-check h2 { font-size: 17px; margin: 0 0 18px; }
.compat-brand { padding: 22px; }
.compat-brand-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.compat-brand-head h2 { font-size: 18px; margin: 0; }
.compat-summary { font-size: 13px; color: var(--primary); font-weight: 600; }
.compat-models { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 7px; }
.compat-models li { font-size: 14px; }
.compat-note {
  margin: 14px 0 0; padding: 10px 14px; font-size: 13px;
  background: #FFF8E1; border-radius: var(--radius-sm); color: #6b5a1e;
}
.compat-footnote { text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- 查用量 ---------- */
.usage-wrap { max-width: 560px; display: flex; flex-direction: column; gap: 18px; }
.usage-form { padding: 26px 22px; display: flex; flex-direction: column; gap: 16px; }
.usage-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.usage-field input {
  padding: 12px 14px; font-size: 15px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.usage-field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.usage-result {
  padding: 16px; background: var(--primary-light); border-radius: var(--radius-sm);
  text-align: center;
}
.usage-result p { margin: 0 0 6px; font-size: 15px; }
.usage-result-sub { font-size: 13px !important; color: var(--muted); margin: 0 !important; }
.usage-tips { padding: 20px 22px; }
.usage-tips h2 { font-size: 15px; margin: 0 0 10px; }
.usage-tips ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.usage-tips li { font-size: 13px; color: var(--muted); }

/* ---------- 博客归档 ---------- */
.archive-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.archive-card { overflow: hidden; transition: transform .18s, box-shadow .18s; }
.archive-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(15,23,42,.12); }
.archive-thumb {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 7; background: var(--primary-light); overflow: hidden;
}
.archive-thumb img { width: 100%; height: 100%; object-fit: cover; }
.archive-thumb-ph { font-size: 40px; }
.archive-body { padding: 16px 18px 18px; }
.archive-body time { font-size: 12px; color: var(--muted); }
.archive-body h2 { margin: 6px 0 8px; font-size: 18px; line-height: 1.4; }
.archive-card:hover h2 { color: var(--primary); }
.archive-body p { margin: 0; font-size: 14px; color: var(--muted); }
.archive-pagination { text-align: center; margin-top: 28px; }
.archive-pagination .nav-links { display: inline-flex; gap: 6px; }
.archive-pagination a, .archive-pagination span.current {
  padding: 8px 14px; border-radius: 999px; font-size: 14px;
  border: 1px solid var(--border);
}
.archive-pagination span.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.archive-pagination a:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 用量结果 ---------- */
.usage-rows { width: 100%; border-collapse: collapse; font-size: 14px; }
.usage-rows td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.usage-rows td:first-child { color: var(--muted); white-space: nowrap; width: 110px; }
.usage-rows tr:last-child td { border-bottom: none; }
.usage-esim { text-align: left; margin-bottom: 14px; }
.usage-esim h3 { font-size: 15px; margin: 0 0 8px; }
.usage-esim small { color: var(--muted); font-weight: 400; }

/* ---------- 我的 eSIM(My Account) ---------- */
.mm-esims { display: flex; flex-direction: column; gap: 16px; }
.mm-esim-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.mm-esim-main { display: flex; gap: 16px; }
.mm-esim-qr { flex: none; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.mm-esim-info { min-width: 0; }
.mm-esim-info h3 { margin: 0 0 6px; font-size: 16px; }
.mm-esim-meta { margin: 0 0 4px; font-size: 13px; color: var(--muted); word-break: break-all; }
.mm-esim-meta code { font-size: 12px; background: var(--surface); padding: 1px 6px; border-radius: 4px; }
.mm-state { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.mm-state-ok { background: #E6F4EA; color: #0F9D58; }
.mm-state-warn { background: #FFF8E1; color: #B45309; }
.mm-state-muted { background: var(--surface); color: var(--muted); }
.mm-esim-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.mm-no-topup { font-size: 12px; color: var(--muted); }
.mm-usage-result { margin-top: 12px; padding: 12px; background: var(--surface); border-radius: var(--radius-sm); }
.mm-topup-list { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.mm-topup-item { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.mm-topup-name { flex: 1; min-width: 0; }
.mm-topup-price { font-weight: 700; white-space: nowrap; }
.mm-esims-empty { text-align: center; padding: 32px 0; color: var(--muted); }

/* ---------- 法律页正文排版 ---------- */
.page-wrap .entry-content { max-width: 760px; line-height: 1.9; font-size: 15px; }
.page-wrap .entry-content h2 { font-size: 20px; margin: 32px 0 12px; }
.page-wrap .entry-content h3 { font-size: 16px; margin: 24px 0 8px; }
.page-wrap .entry-content ul, .page-wrap .entry-content ol { padding-left: 22px; }
.page-wrap .entry-content li { margin-bottom: 6px; }

/* ---------- 桌面端 ---------- */
@media (min-width: 600px) {
  .compat-models { grid-template-columns: repeat(2, 1fr); }
  .archive-grid { grid-template-columns: repeat(3, 1fr); }
  .archive-body h2 { font-size: 16px; }
}
@media (min-width: 992px) {
  .help-wrap, .guide-wrap, .compat-wrap { margin: 0 auto; }
  .usage-wrap { margin: 0 auto; }
  .help-group { padding: 10px 28px 14px; }
}
