/* Custom Order Tracking for WooCommerce — front-end styles (RTL, mobile-first) */

:root {
	--cot-primary: #BA899E;
	--cot-primary-ink: #2A1A22;
	--cot-bg: #FDF0F5;
	--cot-gray: #D8D0D4;
	--cot-gray-text: #8E8790;
}

.cot-tracking-wrapper {
	direction: rtl;
	font-family: 'Cairo', 'Tajawal', sans-serif;
	max-width: 560px;
	margin: 24px auto;
}

.cot-tracking-card {
	background: var(--cot-bg);
	border: 1px solid rgba(186, 137, 158, 0.25);
	border-radius: 16px;
	padding: 28px 24px;
	box-shadow: 0 4px 18px rgba(42, 26, 34, 0.06);
}

.cot-tracking-title {
	margin: 0 0 24px;
	font-size: 1.15rem;
	color: var(--cot-primary-ink);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
}

.cot-order-number {
	font-size: 0.9rem;
	font-weight: 400;
	color: var(--cot-gray-text);
}

/* Timeline */

.cot-timeline {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cot-timeline-item {
	position: relative;
	padding-inline-end: 44px;
	padding-bottom: 30px;
}

.cot-timeline-item:last-child {
	padding-bottom: 0;
}

/* Connecting line, drawn behind the dots */
.cot-timeline-item::before {
	content: '';
	position: absolute;
	inset-inline-end: 13px;
	top: 28px;
	bottom: -30px;
	width: 2px;
	background: var(--cot-gray);
	z-index: 1;
}

.cot-timeline-item:last-child::before {
	display: none;
}

.cot-timeline-item.cot-status-completed::before {
	background: var(--cot-primary);
}

.cot-dot {
	position: absolute;
	inset-inline-end: 0;
	top: 0;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--cot-gray);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.cot-checkmark {
	color: #fff;
	font-size: 14px;
	line-height: 1;
}

.cot-status-completed .cot-dot {
	background: var(--cot-primary);
}

.cot-status-current .cot-dot {
	background: var(--cot-primary);
	transform: scale(1.2);
	box-shadow: 0 0 0 6px rgba(186, 137, 158, 0.22), 0 0 14px rgba(186, 137, 158, 0.55);
	border: 2px solid #fff;
}

.cot-status-pending .cot-dot {
	background: var(--cot-gray);
}

.cot-content {
	padding-top: 2px;
}

.cot-label {
	font-size: 1rem;
	font-weight: 500;
	color: var(--cot-primary-ink);
}

.cot-status-pending .cot-label {
	color: var(--cot-gray-text);
	font-weight: 400;
}

.cot-status-current .cot-label {
	color: var(--cot-primary);
	font-weight: 700;
}

.cot-timestamp {
	margin-top: 4px;
	font-size: 0.8rem;
	color: var(--cot-gray-text);
}

.cot-timestamp-pending {
	font-style: italic;
}

/* Thank-you page: supporting text + track-order button under the auto timeline */

.cot-thankyou-track {
	direction: rtl;
	font-family: 'Cairo', 'Tajawal', sans-serif;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	max-width: 560px;
	margin: 16px auto 24px;
}

.cot-thankyou-track-text {
	flex: 1 1 220px;
	color: var(--cot-primary-ink);
	font-size: 0.92rem;
}

/* Thank-you page / My Account tracking buttons.
 * .cot_track (underscore) is the class WooCommerce actually renders on the
 * My Account / order-actions button — it comes from the array key used in
 * COT_Frontend::add_my_account_tracking_button(), not from CSS we write. */

.cot-track-button,
.cot_track,
.cot-lookup-submit {
	background: var(--cot-primary) !important;
	color: #fff !important;
	border: none;
	border-radius: 8px;
	font-family: 'Cairo', 'Tajawal', sans-serif;
}

.cot-lookup-submit {
	border: 1px solid #b48599 !important;
}

.cot-track-button:hover,
.cot_track:hover,
.cot-lookup-submit:hover {
	background: var(--cot-primary-ink) !important;
	color: #fff !important;
}

/* Lookup form */

.cot-lookup-intro {
	color: var(--cot-primary-ink);
	font-size: 0.92rem;
	margin-bottom: 18px;
}

.cot-lookup-error {
	background: #fff;
	border-inline-start: 3px solid var(--cot-primary);
	color: var(--cot-primary-ink);
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 0.9rem;
	margin-bottom: 16px;
}

.cot-lookup-form {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cot-lookup-form label {
	font-size: 0.85rem;
	color: var(--cot-primary-ink);
	margin-top: 8px;
}

.cot-lookup-form input {
	padding: 10px 12px;
	border: 1px solid var(--cot-gray);
	border-radius: 8px;
	background: #fff;
	color: var(--cot-primary-ink);
	font-family: 'Cairo', 'Tajawal', sans-serif;
	font-size: 0.95rem;
}

.cot-lookup-form input:focus {
	outline: none;
	border-color: var(--cot-primary);
	box-shadow: 0 0 0 3px rgba(186, 137, 158, 0.2);
}

.cot-lookup-submit {
	margin-top: 16px;
	padding: 12px 16px;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
}

@media (max-width: 480px) {
	.cot-tracking-wrapper {
		margin: 12px auto;
	}

	.cot-tracking-card {
		padding: 20px 16px;
		border-radius: 12px;
	}

	.cot-timeline-item {
		padding-inline-end: 38px;
		padding-bottom: 26px;
	}

	.cot-dot {
		width: 24px;
		height: 24px;
	}

	.cot-timeline-item::before {
		inset-inline-end: 11px;
		top: 24px;
		bottom: -26px;
	}

	.cot-label {
		font-size: 0.92rem;
	}
}
