/**
 * Sharisma Warranty — structural CSS. §2.4.
 *
 * Structure/spacing/states only — color/font/radius come from --swr-* custom
 * properties (set per-brand by swr_token_style(), always with a fallback here so the
 * page never looks broken if the wrapper's inline style is stripped by a cache layer).
 * Controls use 3-class specificity (.swr .swr-field .swr-input) with every property a
 * theme is likely to fight over declared explicitly, per the checkout-ux 1.26.0 lesson.
 */

.swr {
	--swr-primary: var(--swr-primary, #1B4229);
	--swr-primary-rgb: var(--swr-primary-rgb, 27, 66, 41);
	--swr-accent: var(--swr-accent, #6CB86A);
	--swr-text: var(--swr-text, #1E1E1E);
	--swr-muted: var(--swr-muted, #767676);
	--swr-border: var(--swr-border, #9F9C93);
	--swr-bg: var(--swr-bg, #FFFFFF);
	--swr-bg-soft: var(--swr-bg-soft, #F5F0ED);
	--swr-bg-note: var(--swr-bg-note, #DCE9D5);
	--swr-danger: var(--swr-danger, #B0555B);
	--swr-success: var(--swr-success, #00A77A);
	--swr-radius: var(--swr-radius, 10px);
	--swr-radius-card: var(--swr-radius-card, 16px);
	--swr-font: var(--swr-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif);
	--swr-font-size: var(--swr-font-size, 16px);

	font-family: var(--swr-font);
	font-size: var(--swr-font-size);
	color: var(--swr-text);
	max-width: 100%;
	box-sizing: border-box;
}
.swr *, .swr *::before, .swr *::after { box-sizing: inherit; }

.swr-noscript {
	padding: 16px 20px;
	border-radius: var(--swr-radius);
	background: var(--swr-bg-note);
	color: var(--swr-text);
	font-size: 14px;
}

/* ทางข้ามไปอีกภาษา — อยู่เหนือฟอร์ม อ่านได้ก่อนเริ่มกรอก ไม่ใช่หลังกรอกเสร็จ */
.swr-lang-switch {
	margin: 0 0 18px;
	font-size: 14px;
	color: var(--swr-muted);
}
.swr-lang-switch a {
	color: var(--swr-primary);
	font-weight: 600;
	text-decoration: underline;
}

/* หน้า "ส่งรูปเพิ่มเติม" — เปิดจากลิงก์ในอีเมล อยู่เหนือฟอร์มค้นหาบนหน้าเดียวกัน */
.swr--respond { margin: 0 0 28px; padding-bottom: 24px; border-bottom: 1px solid var(--swr-hair); }
.swr-respond-title { margin: 14px 0 4px; font-size: 20px; }
.swr-respond-ref { margin: 0 0 16px; color: var(--swr-muted); }
.swr-respond-asked { padding: 14px 18px; border-radius: var(--swr-radius); background: var(--swr-bg-note); margin: 0 0 18px; }
.swr-respond-asked-title { margin: 0 0 4px; font-weight: 600; }
.swr-respond-asked p { margin: 0; }
.swr-respond-form .swr-input[type="file"] { padding: 12px; }
.swr-respond-form .swr-btn-submit { margin-top: 16px; }
.swr-respond-reply { margin-top: 12px; }

/* Honeypot — off-screen, never display:none (bots that check computed style still fill display:none-safe copies, but this keeps it out of the tab order too). */
.swr-hp {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.swr-form { display: flex; flex-direction: column; gap: 24px; }

.swr-step {
	border: 1px solid var(--swr-border);
	border-radius: var(--swr-radius-card);
	background: var(--swr-bg);
	padding: clamp(20px, 3vw, 32px);
	margin: 0;
	min-width: 0;
}
.swr-step legend { float: left; width: 100%; margin-bottom: 20px; padding: 0; }
/* The legend floats (fieldset legends can't be laid out otherwise); whatever comes first under it must clear it,
   or a grid/flex row (its own formatting context) squeezes into zero width beside it. */
.swr-step > legend ~ :not(input) { clear: both; }
.swr-step-head { display: flex; align-items: center; gap: 14px; }
.swr-step-num {
	flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
	background: var(--swr-primary); color: #fff;
	font-size: 14px; font-weight: 700; line-height: 32px; text-align: center;
}
.swr-step-head h2 { font-size: 20px; font-weight: 600; line-height: 1.3; margin: 0; }
.swr-step-head p { font-size: 13px; color: var(--swr-muted); margin: 2px 0 0; }
.swr-step-head p a { color: inherit; }

.swr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; clear: both; }
.swr-grid > .swr-field.swr-span-2,
.swr-field.swr-span-2 { grid-column: 1 / -1; }

.swr-field { display: flex; flex-direction: column; gap: 6px; }
.swr-field[hidden] { display: none !important; }
/* Our control rules set display:block on inputs, which beats the browser's own [hidden] rule — the new theme
   restores it globally, the old one doesn't (the branch text box showed under the branch select). */
.swr [hidden] { display: none !important; }
.swr-label { font-size: 14px; font-weight: 600; }
.swr-req { color: var(--swr-primary); margin-left: 2px; }
.swr-optional { font-weight: 400; color: var(--swr-muted); margin-left: 4px; }
/* Proof of purchase (§6.5): file picker + "remove" on one line. */
.swr-proof-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.swr-proof-row .swr-file { flex: 1 1 260px; }
.swr-hint { font-size: 13px; color: var(--swr-muted); line-height: 1.5; }

.swr .swr-field .swr-input,
.swr .swr-field select.swr-input,
.swr .swr-field input.swr-input {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	display: block;
	width: 100%;
	min-width: 0;
	font-family: var(--swr-font);
	font-size: 16px;
	line-height: 1.4;
	font-weight: 400;
	color: var(--swr-text);
	background-color: var(--swr-bg);
	background-image: none;
	border: 1.5px solid var(--swr-border);
	border-radius: var(--swr-radius);
	padding: 12px 14px;
	margin: 0;
	outline: none;
	box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.swr-input-mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; letter-spacing: .04em; text-transform: uppercase; }
.swr .swr-field .swr-input::placeholder { color: var(--swr-muted); opacity: 1; }
/* iPhone Safari: with appearance:none an EMPTY date input has nothing inside to size it and
   collapses to its padding (owner's screenshot 18.09.2026, วันเกิด). Pin it to a text input's
   height (line + padding + border — border-box) and keep the picked date left-aligned. */
.swr .swr-field input.swr-input[type="date"] { height: calc(1.4em + 24px + 3px); min-height: calc(1.4em + 24px + 3px); text-align: left; }
.swr .swr-field input.swr-input[type="date"]::-webkit-date-and-time-value { text-align: left; min-height: 1.4em; margin: 0; }
/* Chrome/Android: the date's inner editor adds 1px top+bottom — without this it is 2px taller than the text fields. */
.swr .swr-field input.swr-input[type="date"]::-webkit-datetime-edit,
.swr .swr-field input.swr-input[type="date"]::-webkit-datetime-edit-fields-wrapper { padding: 0; }
.swr .swr-field .swr-input:focus {
	border-color: var(--swr-primary);
	box-shadow: 0 0 0 3px rgba(var(--swr-primary-rgb), .18);
}
.swr-field.is-invalid .swr-input { border-color: var(--swr-danger); }
.swr-field.is-valid .swr-input { border-color: var(--swr-success); }

.swr-select-wrap { position: relative; }
.swr-select-wrap select.swr-input { padding-right: 40px; cursor: pointer; }
.swr-select-wrap svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 11px; height: 7px; pointer-events: none; color: var(--swr-muted); }

.swr-error { display: none; font-size: 13px; font-weight: 600; color: var(--swr-danger); }
.swr-field.is-invalid .swr-error,
.swr-error.is-visible { display: block; }

.swr-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.55; cursor: pointer; }
.swr-check input { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; accent-color: var(--swr-primary); }
.swr-consent { display: flex; flex-direction: column; gap: 14px; clear: both; margin-top: 24px; }
.swr-consent.is-invalid .swr-error { display: block; }

.swr-textlink { color: var(--swr-primary); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; font-size: inherit; }

/* Buttons — fallback appearance for brands whose class_map maps these to real theme
   button classes too (irb .btn.btn-black etc.); these rules only matter when that
   mapped class isn't present (e.g. plain IQAir). */
.swr button:where(:not(.swr-textlink, .swr-scanner-close, .swr-scanner-torch, .swr-unit-remove)) { /* :where keeps this at (0,1,1) so .swr-btn-* variants below can win */
	font-family: var(--swr-font);
	font-size: 15px;
	font-weight: 700;
	border-radius: 999px;
	padding: 13px 26px;
	border: 1.5px solid transparent;
	cursor: pointer;
	background: var(--swr-primary);
	color: #fff;
	transition: opacity .15s ease, transform .1s ease;
}
.swr button:disabled { opacity: .55; cursor: not-allowed; }
.swr .swr-btn-photo,
.swr .swr-btn-secondary {
	background: transparent;
	color: var(--swr-primary);
	border-color: var(--swr-primary);
}
.swr .swr-btn-photo:hover,
.swr .swr-btn-secondary:hover { background: rgba(var(--swr-primary-rgb), .06); }

/* Serial step: scan (primary) + photo (secondary) side by side, full width on phones. */
.swr-unit-add { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.swr .swr-unit-add button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; width: 100%; }
.swr-unit-add > button[hidden] { display: none; }
.swr-unit-add:has(> button[hidden]) { grid-template-columns: 1fr; }
.swr-btn-scan svg { flex-shrink: 0; }
/* Outline icons (fill="none"): the old theme fills every <svg>, which turned the camera into a solid blob. */
.swr svg[fill="none"], .swr svg[fill="none"] *,
.swr-scanner-overlay svg[fill="none"], .swr-scanner-overlay svg[fill="none"] * { fill: none !important; stroke: currentColor; }
/* "Can't scan? Type it…" as a divider between the buttons and the typing box. */
.swr-manual-intro { display: flex; align-items: center; gap: 14px; margin: 22px 0 0; font-size: 14px; font-weight: 600; color: var(--swr-text); text-align: center; }
.swr-manual-intro::before,
.swr-manual-intro::after { content: ""; flex: 1 1 24px; min-width: 24px; height: 1px; background: var(--swr-border); opacity: .55; }
.swr-manual-intro span { flex: 0 1 auto; max-width: 34em; }
.swr-serial-hint { font-size: 13px; color: var(--swr-muted); margin-top: 10px; }
.swr-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* The closing card's hidden legend: .swr-step legend (float + 100% width) out-ranked the rule above and
   stretched it past the screen on 320 px phones (edge-case test 19.09.2026). */
.swr .swr-step > legend.swr-visually-hidden { float: none; width: 1px; height: 1px; margin: 0; padding: 0; }

.swr-units { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.swr-unit {
	border: 1px solid var(--swr-border);
	border-radius: var(--swr-radius-card);
	background: var(--swr-bg-soft);
	padding: 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.swr-unit.is-new { animation: swr-unit-new 2.2s ease-out; }
@keyframes swr-unit-new {
	0%, 35% { box-shadow: 0 0 0 4px rgba(var(--swr-primary-rgb), .35); border-color: var(--swr-primary); }
	100%    { box-shadow: 0 0 0 0 rgba(var(--swr-primary-rgb), 0); }
}
@media (prefers-reduced-motion: reduce) { .swr-unit.is-new { animation: none; border-color: var(--swr-primary); } }
.swr-unit-head { display: flex; align-items: center; gap: 10px; }
.swr-unit-index { font-weight: 700; font-size: 14px; }
.swr-unit-chip { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(var(--swr-primary-rgb), .12); color: var(--swr-primary); }
.swr-unit-remove { margin-left: auto; background: none; border: 0; font-size: 20px; line-height: 1; color: var(--swr-muted); cursor: pointer; padding: 4px 8px; }
.swr-unit-serial { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 15px; letter-spacing: .03em; word-break: break-all; }
.swr-unit-model { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.swr-unit-model-img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: #fff; }
.swr-unit-model-name { font-weight: 600; }
.swr-unit-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.swr-unit-flags span { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--swr-bg-note); color: var(--swr-text); }
.swr-unit-errors { font-size: 13px; color: var(--swr-danger); font-weight: 600; }
.swr-unit.is-duplicate { outline: 2px solid var(--swr-danger); }

/* The typing box: just the serial field until something is typed, then the source / photo / add part opens below it. */
.swr-manual-entry { margin-top: 14px; display: flex; flex-direction: column; gap: 14px; }
.swr-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.swr-count { font-size: 13px; color: var(--swr-muted); font-variant-numeric: tabular-nums; }
.swr-manual-more { display: none; flex-direction: column; gap: 16px; padding: 18px; border-radius: var(--swr-radius); background: var(--swr-bg-soft); }
.swr-manual-entry.is-active .swr-manual-more { display: flex; }
/* From a photo that couldn't be decoded: the photo is shown and already attached — no source / picker questions. */
.swr-manual-entry.has-photo [data-swr-manual-source-field],
.swr-manual-entry.has-photo [data-swr-manual-evidence-field] { display: none; }
.swr-manual-entry.has-photo .swr-manual-more { padding: 0; background: none; }
.swr-photo-preview { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.swr-photo-preview img { display: block; width: 100%; max-height: 240px; object-fit: contain; border-radius: var(--swr-radius); background: #111; cursor: zoom-in; }
.swr-photo-preview.is-zoomed img { max-height: none; cursor: zoom-out; }
.swr-photo-preview figcaption { font-size: 13px; color: var(--swr-muted); }
.swr-manual-entry:not(.has-photo) .swr-photo-preview { display: none; }
.swr-choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.swr-choice { position: relative; display: inline-flex; cursor: pointer; }
.swr-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.swr-choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border: 1.5px solid var(--swr-border); border-radius: 999px; background: var(--swr-bg); font-size: 14px; }
.swr-choice input:checked + span { border-color: var(--swr-primary); background: rgba(var(--swr-primary-rgb), .08); color: var(--swr-primary); font-weight: 700; }
.swr-choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(var(--swr-primary-rgb), .25); }
.swr-file { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; cursor: pointer; }
.swr-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.swr-file-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 1.5px solid var(--swr-primary); border-radius: 999px; background: var(--swr-bg); color: var(--swr-primary); font-size: 15px; font-weight: 700; }
.swr-file:hover .swr-file-btn { background: rgba(var(--swr-primary-rgb), .06); }
.swr-file-input:focus-visible + .swr-file-btn { box-shadow: 0 0 0 3px rgba(var(--swr-primary-rgb), .25); }
.swr-file-name { font-size: 14px; color: var(--swr-muted); min-width: 0; overflow-wrap: anywhere; }
.swr-file-name.has-file { color: var(--swr-text); font-weight: 600; }
.swr-radio-row { display: flex; gap: 16px; flex-wrap: wrap; }
.swr-radio { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.swr-manual-suggestions { display: flex; flex-direction: column; gap: 8px; }
.swr .swr-suggestion-btn { align-self: flex-start; background: var(--swr-bg-note); color: var(--swr-text); border-radius: var(--swr-radius); padding: 10px 14px; font-size: 14px; font-weight: 600; border: 1px solid transparent; cursor: pointer; }
.swr-suggestion-btn mark { background: rgba(var(--swr-primary-rgb), .25); color: inherit; border-radius: 3px; padding: 0 1px; }
.swr-manual-actions { display: flex; gap: 12px 18px; align-items: center; flex-wrap: wrap; }

/* Closing card: consent → bot check → one big submit button. */
.swr-step--final .swr-consent { margin-top: 0; }
.swr-turnstile { margin-top: 18px; }
.swr-turnstile:empty { display: none; }
.swr-submit { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; margin-top: 22px; }
.swr .swr-btn-submit { min-height: 54px; padding: 14px 40px; font-size: 16px; }

/* Links inside the form: the brand green, not a lighter accent (legible at 4.5:1+). */
.swr .swr-textlink,
.swr .swr-consent a,
.swr .swr-step-head a { color: var(--swr-primary); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.swr input[type="radio"],
.swr input[type="checkbox"] { accent-color: var(--swr-primary); }
.swr-check input { width: 20px; height: 20px; }
.swr-note--units { margin-top: 14px; overflow-wrap: anywhere; }
.swr-note { margin-top: 4px; padding: 14px 18px; border-radius: var(--swr-radius); background: var(--swr-bg-note); font-size: 14px; line-height: 1.6; display: none; }
.swr-note.is-visible { display: block; }
.swr-note.is-error { background: rgba(176, 85, 91, .12); color: var(--swr-danger); }

/* "กำลังอ่านอยู่" — การอ่านรูปใช้เวลาหลายวินาที ถ้าไม่มีอะไรขยับ ลูกค้าจะคิดว่าค้างแล้วกดซ้ำ
   วางหลัง .is-visible เพราะ specificity เท่ากัน ต้องชนะด้วยลำดับ */
.swr-note.is-working { display: flex; align-items: center; gap: 10px; }
.swr-note.is-working::before {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(var(--swr-text-rgb), .18);
	border-top-color: var(--swr-primary);
	border-radius: 50%;
	animation: swr-spin .8s linear infinite;
}
@keyframes swr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.swr-note.is-working::before { animation: none; border-top-color: var(--swr-primary); }
}

.swr-thankyou-block { border: 1px solid var(--swr-border); border-radius: var(--swr-radius-card); background: var(--swr-bg); padding: clamp(24px, 4vw, 36px); }
.swr-thankyou-block h2 { font-size: 22px; margin: 0 0 10px; }
.swr-thankyou-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* Inline thank-you after submit (owner 19.09.2026): mark + title, reference with copy,
   what was registered, what happens next, LINE button. */
.swr-ty { display: flex; flex-direction: column; gap: 22px; }
/* The old theme styles every list/paragraph in page content (.static-page-content .text-block-body ul:
   40px indent + 1rem margins, specificity 0,2,1 — the gap and indent in the owner's screenshot,
   19.09.2026). These are 0,3,1 so they win whatever the load order; the few rules below that need a
   margin back are 0,4,0. */
.swr .swr-thankyou .swr-ty ul,
.swr .swr-thankyou .swr-ty ol { list-style: none; margin: 0; padding: 0; }
.swr .swr-thankyou .swr-ty li { margin: 0; }
.swr .swr-thankyou .swr-ty p { margin: 0; }
.swr-ty-head { display: flex; align-items: center; gap: 16px; }
.swr-ty-mark { flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--swr-primary); color: #fff; }
.swr-ty .swr-ty-head h2 { font-family: var(--swr-font); font-size: 24px; font-weight: 700; line-height: 1.25; margin: 0; color: var(--swr-text); }
.swr .swr-thankyou .swr-ty .swr-ty-lead { margin: 4px 0 0; font-size: 15px; color: var(--swr-muted); }
.swr-ty-ref { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 18px; border-radius: var(--swr-radius); background: var(--swr-bg-soft); }
.swr-ty-ref-label { display: block; font-size: 13px; color: var(--swr-muted); }
.swr-ty-ref-no { display: block; font-size: 22px; font-weight: 700; letter-spacing: .03em; font-variant-numeric: tabular-nums; color: var(--swr-text); }
.swr .swr-thankyou .swr-ty .swr-ty-section { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--swr-muted); letter-spacing: .02em; }
.swr-ty-units ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.swr-ty-units li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--swr-border); border-radius: var(--swr-radius); }
.swr-ty-unit-name { font-weight: 700; }
.swr-ty-unit-serial { font-family: "SFMono-Regular", Consolas, Menlo, monospace; font-size: 14px; color: var(--swr-muted); letter-spacing: .03em; overflow-wrap: anywhere; }
.swr-ty-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.swr-ty-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.55; }
.swr-ty-steps svg { flex-shrink: 0; margin-top: 2px; color: var(--swr-primary); }
.swr-ty-steps li.is-review { padding: 12px 14px; border-radius: var(--swr-radius); background: #FDF3E1; }
.swr-ty-steps li.is-review svg { color: #A15C00; }
.swr-ty-steps li.is-good { padding: 12px 14px; border-radius: var(--swr-radius); background: var(--swr-bg-note); }
.swr-ty-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.swr .swr-btn-line,
.swr .swr-btn-line:visited,
.swr .swr-btn-line:hover { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 24px; border-radius: 999px; background: #06C755; color: #fff; font-family: var(--swr-font); font-size: 16px; font-weight: 700; text-decoration: none; }
.swr .swr-btn-line:hover { background: #05B34C; }
.swr .swr-btn-line svg { flex-shrink: 0; fill: #fff !important; }
.swr .swr-ty-again { min-height: 52px; }
.swr .swr-thankyou .swr-ty .swr-ty-hint { margin: 0 0 -10px; font-size: 14px; color: var(--swr-muted); }
.swr .swr-btn-line span { white-space: nowrap; }
.swr-ty-line-linked { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 700; color: #06A847; }
.swr-ty-line-linked svg { fill: #06C755 !important; }
.swr-ty-check { align-self: flex-start; }
@media (max-width: 600px) {
	.swr-ty-actions > * { width: 100%; }
	.swr .swr-ty .swr-ty-head h2 { font-size: 22px; }
}
.swr[hidden], .swr-thankyou[hidden] { display: none !important; }

/* -------------------------------------------------------------------------
 * Camera scanner overlay (§6.6.4) — only ever instantiated by swr-scan.js after the
 * customer taps "scan", never present at initial page load.
 * ---------------------------------------------------------------------- */
.swr-scanner-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	background: #000;
	display: flex;
	flex-direction: column;
	color: #fff;
	font-family: var(--swr-font, sans-serif);
}
.swr-scanner-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; gap: 12px; }
.swr-scanner-title { font-size: 15px; font-weight: 600; flex: 1; text-align: center; }
.swr-scanner-close, .swr-scanner-torch {
	background: rgba(255,255,255,.14); border: 0; border-radius: 50%;
	width: 40px; height: 40px; color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}
.swr-scanner-torch[aria-pressed="true"] { background: var(--swr-primary); }
.swr-scanner-viewport { position: relative; flex: 1; overflow: hidden; background: #000; }
.swr-scanner-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.swr-scanner-guide {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: 78%; max-width: 480px; aspect-ratio: 3 / 1;
	border: 3px solid rgba(255,255,255,.9);
	border-radius: 14px;
	box-shadow: 0 0 0 2000px rgba(0,0,0,.35);
}
.swr-scanner-guide.is-square { aspect-ratio: 1 / 1; max-width: 280px; }
.swr-scanner-tap {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
	display: flex; flex-direction: column; align-items: center; gap: 6px;
	max-width: 86%; padding: 16px 24px; border: 0; border-radius: 18px;
	background: rgba(255,255,255,.94); color: #111; font: 700 16px/1.3 var(--swr-font, sans-serif); cursor: pointer;
}
.swr-scanner-tap small { font-size: 11px; font-weight: 400; opacity: .65; font-family: "SFMono-Regular", Menlo, monospace; overflow-wrap: anywhere; }
.swr-scanner-hint { padding: 0 20px 12px; text-align: center; }
.swr-scanner-hint p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; opacity: .9; }
.swr-scanner-photo-instead { border: 0; border-radius: 999px; padding: 14px 26px; min-height: 48px; background: #fff; color: #111; font: 700 15px/1.2 var(--swr-font, sans-serif); cursor: pointer; }
.swr-scanner-status { padding: 14px 20px 20px; text-align: center; font-size: 14px; min-height: 20px; }
.swr-scanner-summary { padding: 0 20px 24px; text-align: center; }
.swr-scanner-summary p { margin: 0 0 14px; font-size: 15px; }
.swr-scanner-summary-actions, .swr-scanner-fallback-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.swr-scanner-fallback { padding: 0 20px 24px; text-align: center; }
.swr-scanner-fallback p { margin: 0 0 14px; font-size: 14px; }
.swr-scanner-fallback-actions button:last-child,
.swr-scanner-summary-actions button:last-child { background: var(--swr-primary); color: #fff; }
.swr-scanner-fallback-actions button:first-child,
.swr-scanner-summary-actions button:first-child { background: rgba(255,255,255,.14); color: #fff; }

@media (max-width: 600px) {
	.swr-grid { grid-template-columns: 1fr; }
	.swr-unit-add { grid-template-columns: 1fr; }
	.swr .swr-btn-submit { width: 100%; }
}

/* -------------------------------------------------------------------------
 * [swr_check] result card (§6.2) + order-number field (§6.8.1) + My Devices (§6.3)
 * — phase 3.
 * ---------------------------------------------------------------------- */
/* -------------------------------------------------------------------------
 * [swr_check] — redesigned 19.09.2026 (owner: desktop looked the strangest — every piece
 * stretched to the full 1,336 px row of the old theme). One centred card ≤ 680 px, form and
 * result alike. `.swr.swr--check …` selectors (0,3,x) so the old theme's
 * `.static-page-content .text-block-body p/ul` (0,2,1) can't reach in.
 * ---------------------------------------------------------------------- */
.swr.swr--check { max-width: 680px; margin-left: auto; margin-right: auto; }
.swr.swr--check .swr-check-form,
.swr.swr--check .swr-check-result-card {
	border: 1px solid var(--swr-border);
	border-radius: var(--swr-radius-card);
	background: var(--swr-bg);
	padding: clamp(22px, 4vw, 36px);
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.swr.swr--check .swr-check-form p,
.swr.swr--check .swr-check-result-card p,
.swr.swr--check .swr-check-result-card dl,
.swr.swr--check .swr-check-result-card dd { margin: 0; }
.swr.swr--check .swr-check-head { display: flex; align-items: center; gap: 16px; }
.swr.swr--check .swr-check-mark { flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(var(--swr-primary-rgb), .1); color: var(--swr-primary); }
.swr.swr--check .swr-check-head h2 { font-family: var(--swr-font); font-size: 24px; font-weight: 700; line-height: 1.25; margin: 0; color: var(--swr-text); }
.swr.swr--check .swr-check-form .swr-check-head p { margin-top: 4px; font-size: 15px; color: var(--swr-muted); }
.swr.swr--check .swr-check-account { padding: 12px 16px; border-radius: var(--swr-radius); background: var(--swr-bg-note); font-size: 14px; }
.swr.swr--check .swr-check-account[hidden] { display: none; }
.swr.swr--check .swr-field .swr-input { font-size: 18px; padding-top: 14px; padding-bottom: 14px; letter-spacing: .06em; }
.swr.swr--check .swr-check-preview { font-size: 14px; font-weight: 700; color: var(--swr-primary); }
.swr.swr--check .swr-check-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.swr.swr--check .swr-check-tools button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; font-size: 14px; }
.swr.swr--check .swr-submit { margin-top: 0; }
.swr.swr--check .swr-btn-submit { width: 100%; min-height: 54px; font-size: 16px; }
.swr.swr--check .swr-turnstile { margin-top: -6px; }

/* Result */
.swr-check-status { align-self: flex-start; display: inline-block; font-size: 14px; font-weight: 700; padding: 6px 14px; border-radius: 999px; background: var(--swr-bg-note); color: var(--swr-text); }
.swr-check-status.swr-status-active { background: rgba(0, 167, 122, .14); color: #00805E; }
.swr-check-status.swr-status-pending,
.swr-check-status.swr-status-info_requested { background: #FDF3E1; color: #8A4B00; }
.swr-check-status.swr-status-not_registered { background: #EEEDE9; color: #4A4A4A; }
.swr-check-status.swr-status-expired,
.swr-check-status.swr-status-rejected,
.swr-check-status.swr-status-voided { background: rgba(176, 85, 91, .12); color: var(--swr-danger); }
.swr.swr--check .swr-check-result-card .swr-check-headline { font-size: 22px; font-weight: 700; line-height: 1.35; color: var(--swr-text); margin-top: -8px; }
.swr.swr--check .swr-check-result-card .swr-check-explain { font-size: 15px; color: var(--swr-muted); margin-top: -14px; }
.swr.swr--check .swr-check-details { display: flex; flex-direction: column; }
.swr-check-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #E8E5DE; }
.swr-check-row:first-child { border-top: 1px solid #E8E5DE; }
.swr-check-row[hidden] { display: none; }
.swr-check-row dt { color: var(--swr-muted); font-size: 14px; margin: 0; }
.swr-check-row dd { margin: 0; font-weight: 600; text-align: right; }
.swr-check-row .swr-check-serial { font-family: "SFMono-Regular", Consolas, Menlo, monospace; letter-spacing: .04em; font-weight: 600; }
.swr-check-errors:empty { display: none; }
.swr.swr--check .swr-check-actions:empty { display: none; }
.swr.swr--check .swr-check-actions { display: flex; flex-direction: column; gap: 10px; }
.swr.swr--check .swr-check-cta,
.swr.swr--check .swr-check-cta:visited { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 24px; border-radius: 999px; background: var(--swr-primary); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; }
.swr.swr--check .swr-check-cta--line,
.swr.swr--check .swr-check-cta--line:visited { background: #06C755; }
.swr.swr--check .swr-check-again { min-height: 52px; width: 100%; }

.swr-order-verify-row { display: flex; gap: 10px; flex-wrap: wrap; }
.swr-order-verify-row .swr-input { flex: 1; min-width: 160px; }
.swr-order-verify-result { display: block; margin-top: 8px; font-size: 13px; }
.swr-order-verify-result.is-ok { color: var(--swr-success); }
.swr-order-verify-result.is-error { color: var(--swr-danger); }

.swr-my-devices-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.swr-device-card { border: 1px solid var(--swr-border); border-radius: var(--swr-radius-card); background: var(--swr-bg); padding: 18px 20px; }
.swr-device-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.swr-device-model { font-weight: 700; }
.swr-device-status { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--swr-bg-note); white-space: nowrap; }
.swr-device-status.swr-status-active { background: rgba(0, 167, 122, .14); color: var(--swr-success); }
.swr-device-status.swr-status-expired,
.swr-device-status.swr-status-rejected,
.swr-device-status.swr-status-voided { background: rgba(176, 85, 91, .12); color: var(--swr-danger); }
.swr-device-serial { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--swr-muted); margin-bottom: 10px; }
.swr-warranty-lines { list-style: none; margin: 0 0 10px; padding: 0; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.swr-device-ref { font-size: 12px; color: var(--swr-muted); margin-bottom: 8px; }
.swr-order-link { margin-top: 8px; font-size: 13px; }
.swr-order-link-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.swr-my-devices-actions { margin-top: 20px; }

/* -------------------------------------------------------------------------
 * Paid extension (§6.8.3) — serial field above a product's add-to-cart button,
 * "ซื้อประกันเพิ่ม" on a My Devices card. Phase 5.
 * ---------------------------------------------------------------------- */
.swr--product-extension { margin: 0 0 16px; width: 100%; }
.swr--product-extension .swr-unit-add { margin-top: 10px; }
.swr--product-extension .swr-note:empty { display: none; }
.swr-device-extension-buy { margin: 8px 0; }
.swr-device-extension-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 6px; }
.swr-buy-extension-price { font-size: 13px; color: var(--swr-muted); }

/* Signed-in customer bar (includes/16-account-login.php) */
.swr-account p { margin: 0 0 20px; padding: 12px 16px; border-radius: var(--swr-radius, 10px); background: var(--swr-bg-soft, #F5F0ED); font-size: 14px; line-height: 1.6; }
.swr-account-user { background: var(--swr-bg-note, #DCE9D5); }

/* AI serial reader disclosure under the photo buttons (only rendered when the owner switched it on). */
.swr-ai-hint { margin: 10px 0 0; }
.swr.swr--check .swr-check-form .swr-ai-hint { margin-top: -10px; }
