/* =========================================
   Listmonk Public Pages — Custom CSS (Final)
   Targets:
   - page_1 (Confirm unsubscribe): has form.unsub-form
   - page_2 (Success): no form.unsub-form
   - Manage preferences: keep default form usability (do NOT nuke inputs)
========================================= */

/* ===== Base typography & background ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  background: #f4f6fb;
}

/* ===== Main outer card ===== */
body > div.container.wrap {
  background: #ffffff !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08) !important;
  max-width: 720px !important;
  margin: 56px auto 40px !important;
  padding: 36px 40px !important;
}

/* Keep inner areas clean (but do NOT reset form controls globally) */
body > div.container.wrap header,
body > div.container.wrap section {
  background: transparent !important;
  box-shadow: none !important;
}

/* ===== Links ===== */
a {
  color: #1f56d2;
}

/* ===== Buttons (Listmonk often uses <a class="button">) ===== */
a.button,
button,
input[type="submit"] {
  border-radius: 12px !important;
  padding: 12px 18px;
  font-weight: 600;
}

/* ===== Footer less distracting ===== */
footer.container {
  opacity: 0.55;
  font-size: 12px;
  margin-top: 18px;
}

/* ===== Headings spacing ===== */
body > div.container.wrap h2 {
  margin-top: 6px;
  margin-bottom: 12px;
}

/* =========================================
   Page 1 — Confirm unsubscribe
   Condition: section contains form.unsub-form
   Goal: make long title smaller & nicer
========================================= */
/* =========================================
   Page 1 — Confirm unsubscribe (refined)
   Goal:
   - Smaller title
   - Remove heavy bold
   - Keep hierarchy calm
========================================= */
section.section:has(form.unsub-form) h2 {
  font-size: 26px;        /* 比之前小 */
  line-height: 1.3;
  font-weight: 600;      /* 取消“超粗” */
  letter-spacing: -0.1px;
  color: #111;
  max-width: 620px;
  margin-bottom: 16px;
}


/* Optional: make the confirm question slightly easier to read */
section.section:has(form.unsub-form) p {
  font-size: 16px;
  line-height: 1.6;
}

/* Optional: keep checkbox line aligned & spaced */
/* section.section:has(form.unsub-form) label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
} */




/* Keep the primary button comfy on confirm page */
section.section:has(form.unsub-form) a.button,
section.section:has(form.unsub-form) button,
section.section:has(form.unsub-form) input[type="submit"] {
  padding: 14px 20px;
  min-width: 180px;
}

/* =========================================
   Page 2 — Success page
   Condition: NOT containing form.unsub-form
   (We rely on your custom JS to rewrite text)
========================================= */
section.section:not(:has(form.unsub-form)) h2 {
  font-size: 34px;
  line-height: 1.2;
  font-weight: 800;
  color: #111;
}

section.section:not(:has(form.unsub-form)) p {
  font-size: 16px;
  line-height: 1.7;
  margin: 10px 0;
}

/* If success page shows a lone "Back" button (id is used by listmonk) */
a#btn-back.button {
  padding: 12px 18px;
  min-width: 140px;
}

header.header .logo a {
  text-decoration: none !important;
}
