/* =========================================================================
   CW Order Lookup — 极简黑白风格（与 theme 的 cleanwatch 视觉一致）
   ========================================================================= */

.cwol-modal,
.cwol {
	--cwol-ink: #111111;
	--cwol-muted: #696969;
	--cwol-line: #e8e8e8;
	--cwol-soft: #f7f7f5;
	--cwol-ok: #1c7c4a;
	--cwol-warn: #8a6d1f;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	color: var(--cwol-ink);
	-webkit-font-smoothing: antialiased;
}

/* ---------- 页头入口 ---------- */
.cwol-trigger {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	text-decoration: none !important;
	color: var(--cwol-ink, #111) !important;
}
.cwol-trigger svg {
	width: 17px;
	height: 17px;
	display: block;
	stroke: currentColor;
}
.cwol-trigger__label {
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 500;
	white-space: nowrap;
}
.header-main .cwol-trigger:hover,
.cwol-trigger:hover {
	opacity: 0.62;
}
@media (max-width: 849px) {
	.header-main .cwol-trigger__label { display: none; }
}

/* 移动侧边栏里的入口 */
.nav-sidebar .cwol-trigger,
.off-canvas .cwol-trigger {
	width: 100%;
	padding: 12px 0;
	border-bottom: 1px solid var(--cwol-line, #e8e8e8);
	font-size: 13px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* ---------- 弹窗骨架 ---------- */
.cwol-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: 6vh 16px 24px;
	overflow-y: auto;
}
.cwol-modal.is-open { display: flex; }
.cwol-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(17, 17, 17, 0.55);
	backdrop-filter: blur(2px);
}
.cwol-modal__panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 620px;
	background: #fff;
	border: 1px solid var(--cwol-line);
	border-radius: 0;
	padding: 34px 34px 30px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
	animation: cwol-in 0.18s ease-out;
}
@keyframes cwol-in {
	from { opacity: 0; transform: translateY(-8px); }
	to   { opacity: 1; transform: translateY(0); }
}
.cwol-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 1px solid transparent;
	color: var(--cwol-muted);
	cursor: pointer;
	padding: 0;
	line-height: 1;
}
.cwol-modal__close:hover { color: var(--cwol-ink); border-color: var(--cwol-line); }

.cwol-modal__head { margin: 0 0 22px; }
.cwol-modal__title {
	font-family: Cardo, Georgia, serif;
	font-size: 26px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin: 0 0 6px;
	line-height: 1.2;
	color: var(--cwol-ink);
}
.cwol-modal__sub {
	margin: 0;
	font-size: 12px;
	letter-spacing: 0.08em;
	color: var(--cwol-muted);
}

/* ---------- 标签页 ---------- */
.cwol-tabs {
	display: flex;
	border-bottom: 1px solid var(--cwol-line);
	margin: 0 0 22px;
	gap: 26px;
}
.cwol-tab {
	background: none;
	border: 0;
	border-bottom: 1px solid transparent;
	padding: 0 0 11px;
	margin-bottom: -1px;
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--cwol-muted);
	cursor: pointer;
	font-weight: 500;
}
.cwol-tab:hover { color: var(--cwol-ink); }
.cwol-tab.is-on {
	color: var(--cwol-ink);
	border-bottom-color: var(--cwol-ink);
	font-weight: 600;
}

/* ---------- 查询方式小标签 ---------- */
.cwol-modes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 14px;
}
.cwol-mode {
	background: #fff;
	border: 1px solid var(--cwol-line);
	color: var(--cwol-muted);
	font-size: 12px;
	letter-spacing: 0.04em;
	padding: 7px 14px;
	cursor: pointer;
	border-radius: 0;
	line-height: 1.2;
}
.cwol-mode:hover { border-color: #bdbdbd; color: var(--cwol-ink); }
.cwol-mode.is-on {
	background: var(--cwol-ink);
	border-color: var(--cwol-ink);
	color: #fff;
}

/* ---------- 输入行 ---------- */
.cwol-form { margin: 0; }
.cwol-field {
	display: flex;
	gap: 0;
	border: 1px solid var(--cwol-ink);
	background: #fff;
}
.cwol-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	padding: 14px 16px !important;
	font-size: 14px !important;
	color: var(--cwol-ink) !important;
	margin: 0 !important;
	height: auto !important;
	border-radius: 0 !important;
}
.cwol-input::placeholder { color: #9b9b9b; }
.cwol-input:focus { outline: none !important; }
.cwol-submit {
	flex: 0 0 auto;
	background: var(--cwol-ink);
	color: #fff;
	border: 0;
	padding: 0 26px;
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	font-weight: 600;
	cursor: pointer;
	border-radius: 0;
	line-height: 1;
	min-height: 48px;
}
.cwol-submit:hover { background: #333; }
.cwol-submit:disabled { opacity: 0.55; cursor: default; }

.cwol-msg {
	min-height: 18px;
	margin: 9px 0 0;
	font-size: 12.5px;
	color: #b3261e;
}
.cwol-msg.is-ok { color: var(--cwol-ok); }

/* ---------- 结果 ---------- */
.cwol-modal__results,
.cwol-inline__results {
	margin: 22px 0 0;
}
.cwol-modal__results:empty,
.cwol-inline__results:empty { margin: 0; }

.cwol-count {
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cwol-muted);
	margin: 0 0 12px !important;
}
.cwol-note {
	font-size: 12px;
	color: var(--cwol-warn);
	background: #fdfaf0;
	border: 1px solid #efe4c4;
	padding: 9px 12px;
	margin: 0 0 14px !important;
}

.cwol-card {
	border: 1px solid var(--cwol-line);
	padding: 20px 20px 16px;
	margin: 0 0 14px;
	background: #fff;
}
.cwol-card:last-child { margin-bottom: 0; }

.cwol-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 13px;
	border-bottom: 1px solid var(--cwol-line);
	margin-bottom: 13px;
}
.cwol-card__no {
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.02em;
	margin-right: 10px;
}
.cwol-card__date {
	font-size: 12px;
	color: var(--cwol-muted);
	white-space: nowrap;
}
.cwol-badge {
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 5px 10px;
	border: 1px solid currentColor;
	white-space: nowrap;
	font-weight: 600;
}
.cwol-badge--completed { color: var(--cwol-ok); }
.cwol-badge--processing { color: #1a5fb4; }
.cwol-badge--pending { color: #8a6d1f; }
.cwol-badge--on-hold { color: #8a6d1f; }
.cwol-badge--cancelled,
.cwol-badge--failed { color: #b3261e; }
.cwol-badge--refunded { color: var(--cwol-muted); }
.cwol-badge--shipped { color: #1a5fb4; }

.cwol-card__items {
	list-style: none;
	margin: 0 0 14px !important;
	padding: 0 !important;
}
.cwol-card__items li {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 5px 0;
	font-size: 13.5px;
	border-bottom: 1px dashed #f0f0f0;
	margin: 0 !important;
}
.cwol-card__items li:last-child { border-bottom: 0; }
.cwol-item__qty { color: var(--cwol-muted); white-space: nowrap; }

.cwol-card__kv { margin: 0 0 12px; }
.cwol-kv {
	display: flex;
	gap: 12px;
	padding: 4px 0;
	font-size: 13px;
	line-height: 1.5;
	margin: 0 !important;
}
.cwol-kv dt {
	flex: 0 0 78px;
	color: var(--cwol-muted);
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding-top: 2px;
	font-weight: 500;
}
.cwol-kv dd { flex: 1 1 auto; margin: 0 !important; word-break: break-word; }
.cwol-kv--track dd { font-weight: 500; }
.cwol-carrier {
	display: inline-block;
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border: 1px solid var(--cwol-line);
	padding: 2px 6px;
	margin-right: 7px;
	color: var(--cwol-muted);
}
.cwol-tracking-no { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.cwol-track-link { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: underline; }
.cwol-dim { color: var(--cwol-muted); }

.cwol-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding-top: 13px;
	border-top: 1px solid var(--cwol-line);
}
.cwol-total { font-size: 15px; font-weight: 600; }
.cwol-total .amount { font-weight: 600; }
.cwol-btn {
	display: inline-block;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none !important;
	padding: 10px 16px;
	border: 1px solid var(--cwol-ink);
	color: var(--cwol-ink) !important;
	background: #fff;
	line-height: 1;
}
.cwol-btn:hover { background: var(--cwol-ink); color: #fff !important; }
.cwol-hint { font-size: 11.5px; color: var(--cwol-muted); max-width: 260px; line-height: 1.45; }

.cwol-empty {
	border: 1px solid var(--cwol-line);
	background: var(--cwol-soft);
	padding: 22px 20px;
	text-align: center;
}
.cwol-empty strong {
	display: block;
	font-size: 14px;
	margin-bottom: 6px;
	font-weight: 600;
}
.cwol-empty span {
	display: block;
	font-size: 12.5px;
	color: var(--cwol-muted);
	line-height: 1.6;
}

/* 加载态 */
.cwol-loading {
	text-align: center;
	padding: 22px 0;
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cwol-muted);
}

/* ---------- 页面内联版 ---------- */
.cwol--inline {
	max-width: 720px;
	margin: 0 auto;
}
.cwol-inline__head { margin: 0 0 24px; }
.cwol-inline__title {
	font-family: Cardo, Georgia, serif;
	font-size: 30px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	margin: 0 0 8px;
	line-height: 1.2;
}
.cwol-inline__sub {
	margin: 0;
	font-size: 13px;
	color: var(--cwol-muted);
	line-height: 1.6;
}

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
	.cwol-modal { padding: 0; align-items: stretch; }
	.cwol-modal__panel {
		max-width: none;
		min-height: 100%;
		border: 0;
		padding: 26px 18px 30px;
		box-shadow: none;
	}
	.cwol-modal__title { font-size: 22px; }
	.cwol-field { flex-wrap: wrap; }
	.cwol-input { padding: 13px 14px !important; font-size: 16px !important; }
	.cwol-submit { width: 100%; min-height: 46px; margin-top: -1px; }
	.cwol-kv { flex-direction: column; gap: 2px; }
	.cwol-kv dt { flex: none; }
	.cwol-card__foot { flex-direction: column; align-items: flex-start; }
	.cwol-hint { max-width: none; }
}

body.cwol-lock { overflow: hidden; }
