/* ===== Order Tracking Widget ===== */
.wcs-tracking-widget {
	max-width: 520px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.wcs-tracking-form {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	padding: 24px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.wcs-field { margin-bottom: 16px; }
.wcs-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.wcs-field input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 15px;
	box-sizing: border-box;
}
.wcs-track-btn {
	width: 100%;
	padding: 12px;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.wcs-track-btn:hover { background: #1a5686; }
.wcs-tracking-result { margin-top: 20px; }

/* ===== Result Card ===== */
.wcs-result-card {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 4px 18px rgba(0,0,0,0.06);
}
.wcs-result-header {
	background: #2b2b2f;
	color: #fff;
	padding: 16px 22px;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: .8px;
	text-transform: uppercase;
}
.wcs-result-body { padding: 22px; }
.wcs-order-meta {
	margin: 0 0 22px;
	font-size: 14px;
	color: #444;
}
.wcs-current-status {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: #e6f6ea;
	color: #1b7a34;
	font-weight: 700;
	font-size: 13px;
}
.wcs-error-msg { color: #d63638; font-weight: 500; }

/* ===== Timeline v2 (icon based, matches "Follow Your Order" style) ===== */
.wcs-timeline2 { list-style: none; margin: 0; padding: 0; }
.wcs-tl2-item {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding-bottom: 30px;
}
.wcs-tl2-item:last-child { padding-bottom: 0; }
.wcs-tl2-connector {
	position: absolute;
	left: 15px;
	top: 34px;
	bottom: -2px;
	width: 2px;
	background-image: linear-gradient(#d8dce0, #d8dce0);
	background-repeat: repeat-y;
}
.wcs-tl2-item.wcs-state-done .wcs-tl2-connector { background-image: linear-gradient(#34a853, #34a853); }
.wcs-tl2-item:last-child .wcs-tl2-connector { display: none; }

.wcs-tl2-check {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #e2e5e8;
	color: #fff;
	z-index: 1;
	transition: background .2s ease, box-shadow .2s ease;
}
.wcs-tl2-check svg { width: 16px; height: 16px; }

/* ✓ Done — সবুজ, চেকমার্ক */
.wcs-tl2-item.wcs-state-done .wcs-tl2-check { background: #34a853; }

/* ⟳ Active — সবুজ, স্পিনার (এখনো চেকমার্ক না) */
.wcs-tl2-item.wcs-state-active .wcs-tl2-check {
	background: #34a853;
	box-shadow: 0 0 0 5px rgba(52,168,83,0.18);
}
.wcs-tl2-spinner {
	width: 15px;
	height: 15px;
	border-radius: 50%;
	border: 2px solid rgba(255,255,255,0.4);
	border-top-color: #fff;
	animation: wcsSpin 0.8s linear infinite;
}
@keyframes wcsSpin { to { transform: rotate(360deg); } }

/* ✕ Error (Cancelled/Refunded/Failed) — লাল */
.wcs-tl2-item.wcs-state-error .wcs-tl2-check {
	background: #d63638;
	box-shadow: 0 0 0 5px rgba(214,54,56,0.16);
}

/* ○ Pending — ধূসর (ডিফল্ট স্টাইলই যথেষ্ট) */

.wcs-tl2-icon {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f1f2f4;
	color: #aeb3b8;
	transition: background .2s ease, color .2s ease;
}
.wcs-tl2-icon svg { width: 22px; height: 22px; }
.wcs-tl2-item.wcs-state-done .wcs-tl2-icon,
.wcs-tl2-item.wcs-state-active .wcs-tl2-icon {
	background: #e6f6ea;
	color: #34a853;
}
.wcs-tl2-item.wcs-state-error .wcs-tl2-icon {
	background: #fdeaea;
	color: #d63638;
}

.wcs-tl2-content { padding-top: 8px; min-width: 0; }
.wcs-tl2-label {
	font-weight: 700;
	font-size: 15px;
	color: #a7acb2;
	transition: color .2s ease;
}
.wcs-tl2-item.wcs-state-done .wcs-tl2-label,
.wcs-tl2-item.wcs-state-active .wcs-tl2-label { color: #1b7a34; }
.wcs-tl2-item.wcs-state-error .wcs-tl2-label { color: #d63638; }

.wcs-tracking-courier {
	margin-top: 22px;
	padding-top: 16px;
	border-top: 1px dashed #e0e0e0;
	font-size: 14px;
}

@media (max-width: 480px) {
	.wcs-result-header { padding: 13px 16px; }
	.wcs-result-body { padding: 16px; }
	.wcs-tl2-icon { width: 36px; height: 36px; }
	.wcs-tl2-icon svg { width: 18px; height: 18px; }
	.wcs-tl2-label { font-size: 14px; }
}

/* ===== PWA Install Popup (Top Banner) ===== */
html.wcs-pwa-banner-visible {
	scroll-padding-top: var( --wcs-pwa-banner-h, 64px );
}
html.wcs-pwa-banner-visible body {
	margin-top: var( --wcs-pwa-banner-h, 64px ) !important;
}
.wcs-pwa-install-popup {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999999;
	animation: wcsSlideDown .35s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
@keyframes wcsSlideDown {
	from { transform: translateY(-100%); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}
.wcs-pwa-popup-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: 960px;
	margin: 0 auto;
	padding: 10px 16px;
	background: linear-gradient( 135deg, #2271b1, #1a5686 );
	color: #fff;
	box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}
.wcs-pwa-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}
.wcs-pwa-icon,
.wcs-pwa-icon-img {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: rgba(255,255,255,0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	object-fit: cover;
}
.wcs-pwa-text { min-width: 0; }
.wcs-pwa-text strong {
	display: block;
	font-size: 14px;
	line-height: 1.3;
}
.wcs-pwa-text p {
	margin: 2px 0 0;
	font-size: 12px;
	line-height: 1.3;
	color: rgba(255,255,255,0.85);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.wcs-pwa-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}
.wcs-pwa-install-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	color: #1a5686;
	border: none;
	padding: 9px 16px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	white-space: nowrap;
	transition: transform .15s ease, box-shadow .15s ease;
}
.wcs-pwa-install-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.wcs-pwa-download-icon { flex-shrink: 0; }

.wcs-pwa-instructions {
	max-width: 960px;
	margin: 0 auto;
	padding: 0 16px 12px;
	background: linear-gradient( 135deg, #2271b1, #1a5686 );
}
.wcs-pwa-instructions-text {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: #fff;
	background: rgba(255,255,255,0.14);
	border-radius: 8px;
	padding: 9px 12px;
}

@media (max-width: 560px) {
	.wcs-pwa-popup-inner { padding: 8px 10px; gap: 8px; }
	.wcs-pwa-icon, .wcs-pwa-icon-img { width: 32px; height: 32px; font-size: 18px; border-radius: 8px; }
	.wcs-pwa-text strong { font-size: 12.5px; }
	.wcs-pwa-text p { font-size: 11px; }
	.wcs-pwa-install-btn { padding: 7px 12px; font-size: 12px; }
	.wcs-pwa-install-btn span { display: none; }
	.wcs-pwa-instructions { padding: 0 10px 10px; }
}
