.cot-tracking-widget {
	max-width: 900px;
	margin: 2rem auto;
}

/* Styled horizontal form (shipment visibility style) */
.cot-lookup-form-styled {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	padding: 1.25rem 1.5rem;
	background: var(--cot-form-bg, #ffc107);
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.cot-form-left {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-shrink: 0;
}

.cot-form-icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.cot-form-icon .cot-form-icon-dash {
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: var(--cot-form-text, #fff);
}

.cot-form-icon .cot-form-icon-img {
	width: 48px;
	height: 48px;
	object-fit: contain;
	/* Make custom icon white to match left section text (use white PNG for best result) */
	filter: brightness(0) invert(1);
}

.cot-form-texts {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.cot-form-top-text {
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	color: var(--cot-form-text, #fff);
	opacity: 0.95;
}

.cot-form-bottom-text {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: var(--cot-form-text, #fff);
}

.cot-form-center {
	flex: 1;
	min-width: 0;
}

.cot-lookup-form-styled .cot-form-center input {
	width: 100%;
	padding: 0.65rem 1rem;
	background: #fff;
	border: none;
	border-radius: 6px;
	font-size: 1rem;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cot-form-right {
	flex-shrink: 0;
}

.cot-lookup-form-styled .cot-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.65rem 1.25rem;
	background: var(--cot-btn-bg, #000);
	color: var(--cot-btn-color, #fff);
	border: none;
	border-radius: 6px;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	cursor: pointer;
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cot-lookup-form-styled .cot-btn:hover {
	opacity: 0.9;
}

.cot-lookup-form-styled .cot-btn .cot-btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	width: 18px;
	height: 18px;
	speak: never;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.cot-lookup-form-styled .cot-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Legacy / fallback form (if not styled) */
.cot-lookup-form label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
}

.cot-input-row {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.cot-input-row input {
	flex: 1;
	padding: 0.6rem 0.8rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 1rem;
}

.cot-btn {
	padding: 0.6rem 1.2rem;
	background: var(--cot-btn-bg, #2271b1);
	color: var(--cot-btn-color, #fff);
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 1rem;
}

.cot-btn:hover {
	opacity: 0.9;
}

.cot-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.cot-error {
	color: #c62828;
	margin-top: 0.5rem;
	font-size: 0.9rem;
	min-height: 1.4em;
}

/* Tracking Result Popup */
body.cot-modal-open { overflow: hidden; }

.cot-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	pointer-events: none;
}

.cot-modal-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.5);
	cursor: pointer;
	pointer-events: auto;
}

.cot-modal-content {
	position: relative;
	pointer-events: auto;
	background: var(--cot-popup-bg, #fff);
	border-radius: var(--cot-popup-radius, 8px);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
	max-width: 980px;
	width: 100%;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
}

.cot-modal-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #666;
	padding: 0;
	width: 32px;
	height: 32px;
	z-index: 2;
}

.cot-modal-close:hover {
	color: #000;
}

/* Order Info popup layout */
.cot-order-info-popup .cot-modal-content {
	overflow: hidden;
}

.cot-popup-title {
	margin: 1.25rem 0 1rem;
	font-size: 1.5rem;
	font-weight: 700;
	text-align: center;
	color: var(--cot-popup-data-text, #333);
}

.cot-modal-tabs {
	display: flex;
	border-bottom: 1px solid #ddd;
	padding: 0 1rem;
	margin-bottom: 1rem;
}

.cot-modal-tabs .cot-tab-btn {
	padding: 0.75rem 1.25rem;
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	margin-bottom: -1px;
	cursor: pointer;
	font-size: 0.95rem;
	font-weight: 500;
	color: #666;
}

.cot-modal-tabs .cot-tab-btn:hover {
	color: #333;
}

.cot-modal-tabs .cot-tab-btn.active {
	color: var(--cot-popup-accent, #2271b1);
	border-bottom-color: var(--cot-popup-accent, #2271b1);
}

.cot-modal-body {
	padding: 0 1.25rem 1.25rem;
	overflow-y: auto;
	flex: 1;
	min-height: 0;
}

.cot-tab-pane {
	display: none;
}

.cot-tab-pane.active {
	display: block;
}

/* Order Info table layout */
.cot-popup-status-bar {
	background: var(--cot-popup-accent, #ff9800);
	color: var(--cot-popup-header-text, #fff);
	text-align: center;
	padding: 0.5rem 1rem;
	font-weight: 700;
	font-size: 0.95rem;
	margin: 0 -1.25rem 0.5rem;
}

.cot-popup-status-value {
	text-align: center;
	color: var(--cot-popup-data-text, #333);
	margin-bottom: 1rem;
	font-weight: 500;
}

.cot-popup-current-location-block {
	text-align: center;
	margin: 0 0 1rem;
	font-size: 0.95rem;
	color: var(--cot-popup-data-text, #333);
}

.cot-popup-current-location-label {
	margin-bottom: 0.35rem;
}

.cot-popup-current-location-label strong {
	font-weight: 600;
}

.cot-current-location-text-wrap {
	max-width: 100%;
	margin: 0 auto 0.6rem;
	text-align: center;
}

.cot-current-location-text {
	display: block;
	white-space: pre-wrap;
	word-break: break-word;
	line-height: 1.45;
}

.cot-popup-current-location-actions {
	text-align: center;
	margin-bottom: 0.15rem;
}

.cot-popup-current-location-time {
	margin-top: 0.35rem;
}

.cot-btn-view-map-tab {
	font-family: inherit;
	font-size: 0.85rem;
	padding: 0.4rem 0.85rem;
	margin: 0;
	cursor: pointer;
	border-radius: 4px;
	border: 1px solid var(--cot-popup-accent, #2271b1);
	background: var(--cot-popup-bg, #fff);
	color: var(--cot-popup-accent, #2271b1);
	font-weight: 600;
	line-height: 1.25;
	-webkit-appearance: none;
	appearance: none;
}

.cot-btn-view-map-tab:hover {
	background: var(--cot-popup-accent, #2271b1);
	color: var(--cot-popup-header-text, #fff);
}

.cot-btn-view-map-tab:focus-visible {
	outline: 2px solid var(--cot-popup-accent, #2271b1);
	outline-offset: 2px;
}

.cot-live-marker{
	display:inline-block;
	width:10px;
	height:10px;
	border-radius:50%;
	background:#22c55e;
	margin-right:8px;
	vertical-align:middle;
	box-shadow:0 0 0 0 rgba(34,197,94,.55);
	animation: cotPulseGreen 1.2s ease-out infinite;
}

@keyframes cotPulseGreen{
	0%{ box-shadow:0 0 0 0 rgba(34,197,94,.55); opacity:1; transform:scale(1); }
	70%{ box-shadow:0 0 0 10px rgba(34,197,94,0); opacity:.9; transform:scale(1.05); }
	100%{ box-shadow:0 0 0 0 rgba(34,197,94,0); opacity:1; transform:scale(1); }
}

.cot-popup-table-wrap {
	margin-bottom: 1rem;
}

.cot-popup-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 0.75rem;
}

.cot-popup-table th {
	background: var(--cot-popup-accent, #ff9800);
	color: var(--cot-popup-header-text, #fff);
	padding: 0.5rem 0.75rem;
	text-align: center;
	font-weight: 700;
	font-size: 0.9rem;
}

.cot-popup-table td {
	background: var(--cot-popup-bg, #fff);
	color: var(--cot-popup-data-text, #333);
	padding: 0.5rem 0.75rem;
	text-align: center;
	border: 1px solid #eee;
}

.cot-popup-table td.cot-popup-multiline {
	text-align: left;
	white-space: pre-line;
}

.cot-map-empty {
	color: #666;
	margin: 1rem 0;
}

.cot-order-info h3,
.cot-map-wrap h3 {
	margin: 0 0 0.75rem;
	font-size: 1.1rem;
}

.cot-map-wrap {
	margin-bottom: 0;
}

.cot-modal .cot-map {
	width: 100%;
	min-height: 320px;
	border-radius: 4px;
	background: #f0f0f0;
}

.cot-status-badge {
	display: inline-block;
	padding: 0.2em 0.5em;
	border-radius: 4px;
	font-size: 0.9em;
	font-weight: 600;
}

.cot-status-with-dot {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.cot-status-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
	box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

.cot-status-label {
	font-size: inherit;
}

.cot-status-badge { background: #e0e0e0; color: #424242; }
.cot-status-badge.pending { background: #e0e0e0; color: #424242; }
.cot-status-badge.in_transit { background: #bbdefb; color: #1565c0; }
.cot-status-badge.out_for_delivery { background: #ffe0b2; color: #e65100; }
.cot-status-badge.delivered { background: #c8e6c9; color: #2e7d32; }
.cot-status-badge.cancelled { background: #ffcdd2; color: #c62828; }

@media (max-width: 768px) {
	.cot-lookup-form-styled {
		flex-direction: column;
		align-items: stretch;
	}
	.cot-form-left {
		justify-content: center;
	}
	.cot-form-right {
		width: 100%;
	}
	.cot-lookup-form-styled .cot-btn {
		width: 100%;
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.cot-input-row {
		flex-direction: column;
	}
	.cot-popup-table-wrap {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.cot-popup-table {
		min-width: 320px;
	}
}
