/* Order Tracking & Delivery Days */
.otd {
	--otd-accent: #2563eb;
	--otd-line: #e5e7eb;
	--otd-muted: #6b7280;
	--otd-bg: #fff;
	max-width: 720px;
	margin: 0 auto 2em;
	font-size: 15px;
	line-height: 1.5;
}
.otd *, .otd *::before, .otd *::after { box-sizing: border-box; }

/* Form */
.otd-form {
	display: grid;
	grid-template-columns: 1fr 1fr auto;
	gap: 12px;
	align-items: end;
	padding: 20px;
	border: 1px solid var(--otd-line);
	border-radius: 10px;
	background: var(--otd-bg);
}
.otd-field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.otd-field input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 15px;
	background: #fff;
}
.otd-field input:focus { outline: 2px solid var(--otd-accent); outline-offset: 1px; border-color: transparent; }

.otd-btn {
	display: inline-block;
	padding: 10px 20px;
	border: 1px solid var(--otd-accent);
	border-radius: 6px;
	background: var(--otd-accent);
	color: #fff !important;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none !important;
	cursor: pointer;
	white-space: nowrap;
	line-height: 1.4;
}
.otd-btn:hover { filter: brightness(0.92); }
.otd-btn-outline { background: transparent; color: var(--otd-accent) !important; }

.otd-alert {
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 6px;
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

/* Result card */
.otd-card {
	margin-top: 20px;
	padding: 20px;
	border: 1px solid var(--otd-line);
	border-radius: 10px;
	background: var(--otd-bg);
}
.otd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.otd-order-no { font-size: 18px; font-weight: 700; }
.otd-muted { color: var(--otd-muted); font-size: 13px; }
.otd-badge {
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	background: color-mix(in srgb, var(--otd-accent) 12%, #fff);
	color: var(--otd-accent);
	white-space: nowrap;
}
.otd-badge.is-closed { background: #f3f4f6; color: #4b5563; }
.otd-closed { margin: 16px 0 0; }

.otd-eta {
	display: flex;
	flex-direction: column;
	margin: 16px 0 4px;
	padding: 12px 14px;
	border-radius: 8px;
	background: color-mix(in srgb, var(--otd-accent) 7%, #fff);
}
.otd-eta strong { font-size: 18px; }

/* Timeline */
.otd-steps { list-style: none; margin: 20px 0 0; padding: 0; }
.otd-steps li {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 2px 12px;
	padding: 0 0 18px 30px;
	margin: 0;
	color: var(--otd-muted);
}
.otd-steps li:last-child { padding-bottom: 0; }
.otd-steps li::before { /* connector */
	content: "";
	position: absolute;
	left: 7px;
	top: 18px;
	bottom: -2px;
	width: 2px;
	background: var(--otd-line);
}
.otd-steps li:last-child::before { display: none; }
.otd-steps li.is-done::before { background: var(--otd-accent); }
.otd-steps li.is-current::before { background: var(--otd-line); }
.otd-dot {
	position: absolute;
	left: 0;
	top: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid #d1d5db;
	background: #fff;
}
.otd-steps li.is-done { color: inherit; }
.otd-steps li.is-done .otd-dot { border-color: var(--otd-accent); background: var(--otd-accent); }
.otd-steps li.is-done .otd-dot::after {
	content: "";
	position: absolute;
	left: 4px;
	top: 1px;
	width: 4px;
	height: 8px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.otd-steps li.is-current .otd-dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--otd-accent) 20%, transparent); }
.otd-steps li.is-current .otd-step-label { font-weight: 700; }
.otd-step-date { font-size: 13px; color: var(--otd-muted); }

.otd-shipment {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--otd-line);
}
.otd-shipment > div { display: flex; flex-direction: column; }
.otd-awb { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .02em; }

.otd-note {
	margin-top: 16px;
	padding: 10px 12px;
	border-radius: 6px;
	background: #fffbeb;
	border: 1px solid #fde68a;
	font-size: 14px;
}

.otd-items {
	list-style: none;
	margin: 18px 0 0;
	padding: 14px 0 0;
	border-top: 1px solid var(--otd-line);
	font-size: 14px;
}
.otd-items li { padding: 3px 0; margin: 0; }

/* Product page estimate */
.otd.otd-product-eta {
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: none;
	margin: 0 0 1.2em;
	padding: 10px 14px;
	border-radius: 8px;
	background: color-mix(in srgb, var(--otd-accent) 7%, #fff);
	font-size: 14px;
}
.otd-truck {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	background: var(--otd-accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 3h15v13H1z'/%3E%3Cpath d='M16 8h4l3 3v5h-7z'/%3E%3Ccircle cx='5.5' cy='18.5' r='2.5'/%3E%3Ccircle cx='18.5' cy='18.5' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 3h15v13H1z'/%3E%3Cpath d='M16 8h4l3 3v5h-7z'/%3E%3Ccircle cx='5.5' cy='18.5' r='2.5'/%3E%3Ccircle cx='18.5' cy='18.5' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.otd-account { max-width: none; margin-top: 2em; }

@media (max-width: 640px) {
	.otd-form { grid-template-columns: 1fr; }
	.otd-btn { width: 100%; text-align: center; }
	.otd-shipment .otd-btn { width: auto; }
}
