/* bt newsletter form — design 2026-11-13 (Cadmus), Joey TG 1848. One component, three skins:
   .btnl--site (site footer, red), .btnl--beginner (新手村 footer, orange), .btnl--dark (新手村 menu popup).
   States: data-state + data-human on the form (contract in nl.js). Cloudflare's widget renders into .btnl-ts (appearance interaction-only). */

.btnl {
	--a: #f70d28; --a-hover: #d90a22; --a-soft: rgba(247, 13, 40, .10); --a-ring: rgba(247, 13, 40, .16);
	--focus: #2b2f35; --focus-ring: rgba(23, 25, 28, .10); /* site red is the error colour's neighbour: focus stays neutral */
	--ink: #17191c; --sub: #4c5158; --mute: #80868e; --faint: #a7acb3;
	--line: #d5d9de; --line-2: #e7e9ec; --card: #fff; --field: #fff; --well: #fafafa;
	--ok: #17803d; --ok-soft: #e7f4ec; --err: #c4221f; --err-soft: #fdecea; --warn: #8a5200; --warn-soft: #fff4dc; --warn-line: #f0d9a8;
	--off-bg: #eceef1; --off-ink: #9aa0a7;
	--ts-bg: #fafafa; --ts-ink: #232323; --ts-line: #e0e0e0; --ts-mark: #222; --ts-sub: #6b6b6b;
	--r: 6px;
	--sans: "Helvetica Neue", Helvetica, Arial, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
	font-family: var(--sans); color: var(--ink); font-size: 14px; line-height: 1.6; letter-spacing: 0;
	position: relative; display: block; margin: 0; text-align: left; -webkit-font-smoothing: antialiased;
}
.btnl *, .btnl *::before, .btnl *::after { box-sizing: border-box; }
.btnl p { margin: 0; }
.btnl svg { display: block; flex: none; }

/* ---------- card ---------- */
.btnl--card {
	background: var(--card); border: 1px solid #e3e5e8; border-radius: 10px; padding: 22px 20px 18px; overflow: hidden;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 28px -18px rgba(16, 24, 40, .22);
}
.btnl--card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--a); }

.btnl-head { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; }
.btnl-badge { width: 38px; height: 38px; border-radius: 9px; background: var(--a-soft); color: var(--a); display: grid; place-items: center; flex: none; }
.btnl-name { font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--ink); letter-spacing: .02em; }
.btnl-name small { font-size: 12px; font-weight: 600; color: var(--a); letter-spacing: .06em; margin-left: 6px; vertical-align: 1px; }
.btnl-desc { font-size: 13px; line-height: 1.6; color: var(--sub); margin-top: 2px; }
.btnl .btnl-lead { font-size: 13.5px; line-height: 1.65; color: var(--sub); margin: 0 0 14px; }

/* ---------- field ---------- */
.btnl-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; font-weight: 600; color: var(--sub); margin: 0 0 6px; letter-spacing: .02em; }
.btnl-label em { font-style: normal; font-weight: 400; color: var(--mute); font-size: 12px; }
.btnl-field { position: relative; display: flex; align-items: center; height: 46px; border: 1px solid var(--line); border-radius: var(--r); background: var(--field); transition: border-color .15s, box-shadow .15s; }
.btnl-field > svg { position: absolute; left: 13px; color: var(--mute); pointer-events: none; }
.btnl .btnl-field input[type=email] {
	all: unset; box-sizing: border-box; width: 100%; height: 100%; padding: 0 14px 0 40px; font: 400 16px/1 var(--sans); color: var(--ink); caret-color: var(--focus);
}
.btnl .btnl-field input::placeholder { color: var(--faint); opacity: 1; }
.btnl-field.is-focus, .btnl-field:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.btnl-field.is-focus > svg, .btnl-field:focus-within > svg { color: var(--focus); }
.btnl-fielderr { display: none; align-items: flex-start; gap: 6px; color: var(--err); font-size: 12.5px; line-height: 1.5; margin: 7px 0 0 !important; }
.btnl-fielderr svg { margin-top: 1px; }

/* ---------- 「我不是機器人」: one box; a click runs turnstile.execute() (execution:'execute', appearance:'interaction-only').
   Cloudflare's own widget shows up in .btnl-cf only when Cloudflare asks for an extra challenge. ---------- */
.btnl-vlabel { margin-top: 16px; }
.btnl-verify { border: 1px solid var(--line); border-radius: var(--r); background: var(--field); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.btnl-hrow { display: flex; align-items: stretch; min-height: 58px; }
.btnl .btnl-human {
	all: unset; box-sizing: border-box; flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 14px; cursor: pointer;
	font-family: var(--sans); color: var(--ink);
}
.btnl .btnl-human:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; border-radius: 4px; }
.btnl-box { position: relative; width: 24px; height: 24px; border-radius: 6px; border: 2px solid #8f959c; background: var(--field); display: grid; place-items: center; flex: none; transition: background .15s, border-color .15s; }
.btnl .btnl-box > * { display: none; }
.btnl-ring { width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--a-soft); border-top-color: var(--a); }
.btnl-htxt { display: flex; flex-direction: column; min-width: 0; }
.btnl-human-t { font-size: 15px; font-weight: 600; line-height: 1.35; letter-spacing: .02em; color: var(--ink); }
.btnl-human-s { font-size: 12px; line-height: 1.45; color: var(--mute); }
.btnl-human-s span { display: none; }
.btnl-cfmark { flex: none; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px; padding: 0 12px 0 6px; font-family: -apple-system, "Helvetica Neue", Arial, "PingFang TC", sans-serif; }
.btnl-cfmark-n { display: flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; color: var(--sub); letter-spacing: .02em; }
.btnl-cfmark-l { font-size: 9.5px; color: var(--mute); white-space: nowrap; }
.btnl .btnl-cfmark-l a { color: var(--mute) !important; text-decoration: none; }
.btnl-cf { max-height: 0; overflow: hidden; padding: 0 10px; background: var(--well); transition: max-height .2s ease, padding .2s ease; } /* stays in layout: Turnstile renders and executes inside it while collapsed */
.btnl .btnl-cf-note { font-size: 12px; color: var(--mute); margin: 0 0 8px; }

/* box states: data-human = idle | spin | ok | cf | fail */
.btnl[data-human="idle"] .btnl-human-s .s-idle { display: inline; }
.btnl[data-human="spin"] .btnl-box { border-color: transparent; background: transparent; }
.btnl[data-human="spin"] .btnl-box .btnl-ring { display: block; animation: btnl-rot .7s linear infinite; }
.btnl[data-human="spin"] .btnl-human-s .s-spin { display: inline; }
.btnl[data-human="ok"] .btnl-box { background: var(--ok); border-color: var(--ok); color: #fff; }
.btnl[data-human="ok"] .btnl-box .i-ok { display: block; }
.btnl[data-human="ok"] .btnl-human-s .s-ok { display: inline; color: var(--ok); }
.btnl[data-human="ok"] .btnl-human { cursor: default; }
.btnl[data-human="cf"] .btnl-box { border-color: transparent; background: transparent; }
.btnl[data-human="cf"] .btnl-box .btnl-ring { display: block; animation: none; border-color: var(--a-soft); border-top-color: var(--a); border-right-color: var(--a); }
.btnl[data-human="cf"] .btnl-human-s .s-cf { display: inline; color: var(--sub); }
.btnl[data-human="cf"] .btnl-cf { max-height: 240px; padding: 10px; border-top: 1px solid var(--line-2); }
.btnl[data-human="cf"] .btnl-verify { border-color: var(--sub); box-shadow: 0 0 0 3px rgba(23, 25, 28, .06); }
.btnl[data-human="fail"] .btnl-box { border-color: var(--err); color: var(--err); background: var(--err-soft); }
.btnl[data-human="fail"] .btnl-box .i-retry { display: block; }
.btnl[data-human="fail"] .btnl-human-s .s-fail { display: inline; color: var(--err); }
.btnl[data-human="fail"] .btnl-verify { border-color: var(--err); }

/* ---------- alerts ---------- */
.btnl-alert { display: none; gap: 9px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: var(--r); font-size: 13px; line-height: 1.55; }
.btnl-alert svg { margin-top: 1px; }
.btnl-alert--rate { background: var(--warn-soft); color: var(--warn); box-shadow: inset 3px 0 0 #d79a1d; }
.btnl-alert--err { background: var(--err-soft); color: var(--err); box-shadow: inset 3px 0 0 var(--err); }

/* ---------- submit ---------- */
.btnl-submit {
	appearance: none; -webkit-appearance: none; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; margin: 14px 0 0;
	border: 0; border-radius: var(--r); background: var(--a); color: #fff; font: 700 15px/1 var(--sans); letter-spacing: .06em; cursor: pointer;
	box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 6px 14px -8px var(--a); transition: background .15s, transform .1s;
}
.btnl-submit:hover { background: var(--a-hover); }
.btnl-submit[disabled] { background: var(--off-bg); color: var(--off-ink); box-shadow: none; cursor: not-allowed; }
.btnl-spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; }
.btnl-hint { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--mute); margin-top: 8px !important; text-align: center; }
.btnl-fine { font-size: 12px; line-height: 1.65; color: var(--mute); margin-top: 14px !important; padding-top: 12px; border-top: 1px solid var(--line-2); }
.btnl-fine a { color: var(--sub) !important; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--faint); }

/* ---------- success ---------- */
.btnl-done { display: none; }
.btnl-done-i { width: 46px; height: 46px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 2px 0 12px; }
.btnl-done-t { font-size: 18px; font-weight: 700; line-height: 1.4; color: var(--ink); letter-spacing: .02em; }
.btnl-done-p { font-size: 14px; line-height: 1.7; color: var(--sub); margin-top: 6px !important; }
.btnl-done-p b { color: var(--ink); font-weight: 600; word-break: break-all; }
.btnl-done-s { font-size: 12.5px; line-height: 1.65; color: var(--mute); margin-top: 10px !important; padding: 10px 12px; background: var(--well); border-radius: var(--r); }
.btnl-again { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--a) !important; text-decoration: none !important; }

/* ---------- states ---------- */
.btnl[data-state="err-email"] .btnl-field { border-color: var(--err); box-shadow: 0 0 0 3px rgba(196, 34, 31, .12); }
.btnl[data-state="err-email"] .btnl-field > svg { color: var(--err); }
.btnl[data-state="err-email"] .btnl-fielderr { display: flex; }
.btnl[data-state="err-rate"] .btnl-alert--rate, .btnl[data-state="err-server"] .btnl-alert--err { display: flex; }
.btnl[data-state="loading"] .btnl-spin { display: block; animation: btnl-rot .8s linear infinite; }
.btnl[data-state="loading"] .btnl-arrow { display: none; }
.btnl[data-state="loading"] .btnl-submit { background: var(--a); color: #fff; opacity: .88; cursor: progress; }
.btnl[data-state="loading"] .btnl-field, .btnl[data-state="loading"] .btnl-verify { opacity: .55; }
.btnl[data-state="err-rate"] .btnl-hint, .btnl[data-state="err-server"] .btnl-hint { display: none; }
.btnl[data-human="ok"] .btnl-hint { display: none; }
.btnl[data-state="success"] .btnl-form { display: none; }
.btnl[data-state="success"] .btnl-done { display: block; }
@keyframes btnl-rot { to { transform: rotate(360deg); } }

/* ---------- skins ---------- */
.btnl--beginner { --a: #f26932; --a-hover: #de5a25; --a-soft: rgba(242, 105, 50, .11); --a-ring: rgba(242, 105, 50, .18); --focus: #f26932; --focus-ring: rgba(242, 105, 50, .18); }
.btnl--dark {
	--a: #f26932; --a-hover: #ff7a45; --a-soft: rgba(242, 105, 50, .16); --a-ring: rgba(242, 105, 50, .28);
	--ink: #f6f6f6; --sub: #c9ccd1; --mute: #979ca3; --faint: #6f747b; --line: #43474d; --line-2: #3a3d42; --field: #191b1d; --well: #26282b;
	--ok: #5cc27e; --ok-soft: rgba(92, 194, 126, .14); --err: #ff8a80; --err-soft: rgba(255, 138, 128, .12); --warn: #f6c56b; --warn-soft: rgba(246, 197, 107, .12);
	--off-bg: #2c2f33; --off-ink: #6f747b;
	--ts-bg: #232323; --ts-ink: #fafafa; --ts-line: #3b3b3b; --ts-mark: #fafafa; --ts-sub: #a0a0a0;
	--focus: #f26932; --focus-ring: rgba(242, 105, 50, .28);
}
/* compact: the menu popup is a fixed-height overlay, keep the form short (labels stay for screen readers) */
.btnl--dark .btnl-label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.btnl--dark .btnl-verify { margin-top: 10px; }
.btnl--dark .btnl-hint { display: none; }
.btnl--dark .btnl-fine { border-top: 0; padding-top: 0; margin-top: 12px !important; }
.btnl--dark .btnl-box { background: transparent; border-color: #8b9097; }
.btnl--dark[data-human="ok"] .btnl-box { background: var(--ok); border-color: var(--ok); color: #0d1f13; }
.btnl--dark .btnl-alert--rate { color: #f6c56b; }
.btnl--dark .btnl-submit { box-shadow: none; }
.btnl--dark .btnl-fine { border-top-color: #3a3d42; }
.btnl--dark .btnl-cf { background: #1f2123; }

.btnl-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; overflow: hidden; }

/* ---------- site footer (JNews footer_column x4): at desktop the newsletter column gets 34% so Cloudflare's
   interactive challenge (min 300px) fits inside the card. Load on pages that show widget mc4wp_form_widget-2. ---------- */
@media (min-width: 1200px) {
	.jeg_footer .jeg_footer_primary .footer_column { width: 19%; }
	.jeg_footer .jeg_footer_primary .footer_column:nth-child(2) { width: 34%; }
	.jeg_footer .jeg_footer_primary .footer_column:nth-child(3) { width: 22%; }
	.jeg_footer .jeg_footer_primary .footer_column:nth-child(4) { width: 25%; }
}
.widget_mc4wp_form_widget .jeg_footer_heading { margin-bottom: 14px; }
.elementor-element-f00d02d .btnl, .elementor-element-3e00f8e3 .btnl { width: 100%; }
