/* CW Pricing Advisor — Hero 版型
   navy #0B2A45 / ocean #1B82C0 / mist #EAF1F6 / gold #EBA13C（僅 CTA）
   全寬深藍 Hero；左文案右表單卡；內容總寬 1400px */

/* 覆蓋佈景 flex 規則，確保 hidden 屬性生效（工具箱既定慣例） */
.cwpa-screen[hidden],
.cwpa-hero [hidden] { display: none !important; }

/* 全寬 breakout：即使 shortcode 放在窄容器內也能滿版 */
.cwpa-hero {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	background: #0B2A45;
	padding: 72px 24px;
	box-sizing: border-box;
}
.cwpa-hero *, .cwpa-hero *::before, .cwpa-hero *::after { box-sizing: border-box; }

.cwpa-hero-inner {
	max-width: 1400px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 640px);
	gap: 56px;
	align-items: start;
}
@media (max-width: 1024px) {
	.cwpa-hero { padding: 48px 20px; }
	.cwpa-hero-inner { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- 左：文案 ---------- */
.cwpa-copy { color: #EAF1F6; }
.cwpa-eyebrow {
	color: #EBA13C; font-weight: 700; letter-spacing: .12em;
	font-size: 15px; margin: 0 0 14px;
}
/* clamp + !important：Theme 常對 h1-h6/標題類別強制字級，需硬壓（同 SEO 健檢做法） */
.cwpa-hero .cwpa-headline {
	color: #fff !important;
	font-size: clamp(32px, 5vw, 64px) !important;
	font-weight: 800 !important;
	line-height: 1.22 !important;
	margin: 0 0 18px !important;
	padding: 0 !important;
	letter-spacing: 0 !important;
}
.cwpa-lead { font-size: 17px; line-height: 1.9; margin: 0 0 24px; color: #c9d9e6; }
.cwpa-points { list-style: none; margin: 0 0 28px; padding: 0; }
.cwpa-points li {
	position: relative; padding: 8px 0 8px 34px;
	font-size: 16px; line-height: 1.7; color: #EAF1F6;
}
.cwpa-points li::before {
	content: ""; position: absolute; left: 0; top: 14px;
	width: 20px; height: 20px; border-radius: 50%;
	background: #1B82C0;
	box-shadow: inset 0 0 0 5px #0B2A45, 0 0 0 1px #1B82C0;
}
.cwpa-trust {
	border-top: 1px solid rgba(234,241,246,.2);
	padding-top: 18px; font-size: 14px; color: #8fb0c9; margin: 0;
}

/* ---------- 右：卡片 ---------- */
.cwpa-card {
	background: #fff; border-radius: 12px;
	padding: 32px 32px 28px;
	color: #0B2A45; font-size: 15px; line-height: 1.7;
	box-shadow: 0 18px 50px rgba(0,0,0,.3);
}
@media (max-width: 640px) { .cwpa-card { padding: 24px 20px; } }
.cwpa-card-title { color: #0B2A45; font-size: 22px; margin: 0 0 16px; }

.cwpa-field { margin-bottom: 14px; }
.cwpa-field label { display: block; font-weight: 700; margin-bottom: 5px; color: #0B2A45; font-size: 14px; }
.cwpa-field input[type="text"], .cwpa-field textarea, .cwpa-field select {
	width: 100%; border: 1px solid #c8d6e0; border-radius: 6px;
	padding: 10px 12px; font-size: 15px; color: #0B2A45; background: #fff;
}
.cwpa-field input:focus, .cwpa-field textarea:focus, .cwpa-field select:focus {
	outline: none; border-color: #1B82C0; box-shadow: 0 0 0 3px rgba(27,130,192,.15);
}
.cwpa-row { display: flex; gap: 14px; }
.cwpa-row .cwpa-field { flex: 1; }
@media (max-width: 560px) { .cwpa-row { flex-direction: column; gap: 0; } }

.cwpa-countries { display: flex; flex-wrap: wrap; gap: 8px; }
.cwpa-country {
	display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
	border: 1px solid #c8d6e0; border-radius: 999px; padding: 6px 14px;
	background: #EAF1F6; user-select: none; font-size: 14px;
}
.cwpa-country:has(input:checked) { background: #1B82C0; color: #fff; border-color: #1B82C0; }
.cwpa-country.is-disabled { opacity: .45; cursor: not-allowed; }
.cwpa-country input { accent-color: #EBA13C; }

/* 蜜罐：視覺完全移出，不用 display:none（部分 bot 會跳過 display:none 欄位） */
.cwpa-hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

.cwpa-error { color: #c0392b; background: #fdecea; border-radius: 6px; padding: 10px 14px; }
.cwpa-submit {
	width: 100%; background: #EBA13C; color: #0B2A45; border: 0; cursor: pointer;
	font-size: 17px; font-weight: 800; padding: 14px; border-radius: 6px; margin-top: 4px;
	transition: transform .15s ease, box-shadow .15s ease;
}
.cwpa-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(235,161,60,.4); }
.cwpa-submit:disabled { opacity: .6; cursor: wait; transform: none; box-shadow: none; }
.cwpa-note { color: #8aa0b3; font-size: 12.5px; text-align: center; margin: 10px 0 0; }

/* ---------- 進度 ---------- */
.cwpa-steps { list-style: none; margin: 20px 0; padding: 0; }
.cwpa-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 0; color: #8aa0b3; }
.cwpa-dot { width: 14px; height: 14px; border-radius: 50%; background: #c8d6e0; flex: none; }
.cwpa-steps li.is-active { color: #0B2A45; font-weight: 700; }
.cwpa-steps li.is-active .cwpa-dot { background: #1B82C0; animation: cwpa-pulse 1.2s infinite; }
.cwpa-steps li.is-done { color: #0B2A45; }
.cwpa-steps li.is-done .cwpa-dot { background: #EBA13C; }
@keyframes cwpa-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .cwpa-steps li.is-active .cwpa-dot { animation: none; } }
.cwpa-progress-msg { color: #4a6076; }

/* ---------- 結果 ---------- */
.cwpa-result-meta { color: #4a6076; margin: 0 0 16px; }
.cwpa-country-card {
	border: 1px solid #c8d6e0; border-radius: 8px; padding: 16px 18px; margin-bottom: 12px;
}
.cwpa-country-card h4 { margin: 0 0 10px; font-size: 17px; display: flex; align-items: center; gap: 10px; color: #0B2A45; }
.cwpa-badge { background: #EAF1F6; color: #1B82C0; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.cwpa-band { display: flex; flex-direction: column; margin-bottom: 8px; }
.cwpa-band span { color: #8aa0b3; font-size: 13px; }
.cwpa-band strong { font-size: 16.5px; }
.cwpa-band em { color: #8aa0b3; font-size: 12.5px; font-style: normal; }
.cwpa-country-card.is-locked { background: #EAF1F6; border-style: dashed; }
.cwpa-locked-msg { color: #4a6076; margin: 0; }

.cwpa-diag { border-top: 2px solid #EAF1F6; margin-top: 18px; padding-top: 14px; }
.cwpa-diag h4 { margin: 0 0 10px; color: #0B2A45; }
.cwpa-risk { font-weight: 700; padding: 2px 12px; border-radius: 999px; font-size: 14px; }
.risk-high { background: #fdecea; color: #c0392b; }
.risk-ok   { background: #e8f6ee; color: #1e8e4e; }
.risk-low  { background: #fff6e6; color: #b97a12; }
.risk-na   { background: #EAF1F6; color: #8aa0b3; }

.cwpa-cta-box {
	background: #0B2A45; color: #EAF1F6; border-radius: 8px;
	padding: 18px 22px; margin-top: 18px; font-size: 14.5px;
}
.cwpa-cta-box strong { color: #EBA13C; }



/* ===== 彈出視窗（同 SEO 健檢模式：JS 建立、掛 body、!important 定位避開 Theme） ===== */
body.cwpa-modal-lock { overflow: hidden; }
.cwpa-modal-overlay {
	position: fixed !important;
	inset: 0 !important;
	top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	max-width: none !important;
	margin: 0 !important;
	z-index: 999999;
	background: rgba(6, 20, 38, .72);
	backdrop-filter: blur(4px);
	display: none;
	align-items: center; justify-content: center;
	padding: 28px 16px;
	box-sizing: border-box;
}
.cwpa-modal-overlay.cwpa-open { display: flex; animation: cwpaFade .22s ease; }
@keyframes cwpaFade { from { opacity: 0; } to { opacity: 1; } }
.cwpa-modal {
	background: #f2f6fa;
	width: 100%; max-width: 860px;
	max-height: calc(100vh - 56px);
	border-radius: 18px;
	display: flex; flex-direction: column;
	overflow: hidden;
	box-shadow: 0 30px 90px rgba(3, 14, 28, .55);
	animation: cwpaPop .26s cubic-bezier(.2, .9, .3, 1.15);
	color: #0B2A45; font-size: 15px; line-height: 1.7;
}
@keyframes cwpaPop { from { transform: translateY(18px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.cwpa-modal-body { overflow-y: auto; padding: 26px 26px 12px; flex: 1; }
.cwpa-modal-loading { text-align: center; padding: 40px 20px 50px; }
.cwpa-modal-loading .cwpa-steps { display: inline-block; text-align: left; margin: 10px auto 4px; }
.cwpa-modal-status { font-size: 1.08em; font-weight: 700; color: #0B2A45; margin: 14px 0 8px; }
.cwpa-modal-note { color: #7d8fa0; font-size: .9em; margin: 0; }
.cwpa-modal-title { color: #0B2A45; font-size: 22px; margin: 0 0 6px; }
.cwpa-modal-result .cwpa-country-card { background: #fff; box-shadow: 0 4px 18px rgba(15, 40, 70, .08); border: 0; }
.cwpa-modal-result .cwpa-country-card.is-locked { background: #e8eef4; box-shadow: none; border: 1px dashed #c8d6e0; }
.cwpa-modal-footer {
	display: flex; gap: 14px; justify-content: flex-end; align-items: center;
	padding: 14px 26px;
	background: #fff;
	border-top: 1px solid #e2eaf2;
}
.cwpa-btn-ghost {
	background: #fff; color: #0B2A45; border: 2px solid #c8d6e4; border-radius: 8px;
	padding: 11px 28px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.cwpa-btn-ghost:hover { background: #f2f6fa; }
@media (max-width: 560px) {
	.cwpa-modal-overlay { padding: 12px; }
	.cwpa-modal-body { padding: 16px 14px 8px; }
	.cwpa-modal-footer { padding: 12px 14px; }
	.cwpa-btn-ghost { width: 100%; }
}

/* 波浪 loading 動畫（同 SEO 健檢） */
.cwpa-wave { display: flex; justify-content: center; gap: 7px; margin-bottom: 14px; }
.cwpa-wave span { width: 9px; height: 34px; border-radius: 5px; background: #1B82C0; animation: cwpa-wave 1.1s ease-in-out infinite; }
.cwpa-wave span:nth-child(2){animation-delay:.12s}.cwpa-wave span:nth-child(3){animation-delay:.24s}
.cwpa-wave span:nth-child(4){animation-delay:.36s}.cwpa-wave span:nth-child(5){animation-delay:.48s}
@keyframes cwpa-wave { 0%,100%{transform:scaleY(.4);opacity:.5} 50%{transform:scaleY(1);opacity:1} }
@media (prefers-reduced-motion: reduce){ .cwpa-wave span{animation:none} }

/* 市場調查樣本連結 */
.cwpa-samples { margin-top: 10px; border-top: 1px solid #EAF1F6; padding-top: 10px; }
.cwpa-samples-title { color: #8aa0b3; font-size: 13px; margin: 0 0 6px; font-weight: 700; }
.cwpa-samples ul { list-style: none; margin: 0; padding: 0; }
.cwpa-samples li { padding: 4px 0; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.cwpa-samples a { color: #1B82C0; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.cwpa-samples a:hover { color: #0B2A45; }
.cwpa-sample-meta { color: #8aa0b3; font-size: 12.5px; white-space: nowrap; }
