/* ══════════════════════════════════════════
   Warranty Tracking Public Page + Timeline
   ══════════════════════════════════════════ */

/* ── Tracking page: hide nav on mobile ── */
@media (max-width: 679px) {
	.ef-tracking-page .ef-account-nav {
		display: none;
	}
}

/* Tracking page marker (add to body or wrap) */
.ef-tracking-page .woocommerce {
	padding-top: 10px;
}

/* ── Meta Grid ── */

.ef-tracking-meta {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 24px;
}

.ef-tracking-meta__item {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ef-tracking-meta__label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: var(--EF-Color-Text-Muted, #848B95);
}

.ef-tracking-meta__value {
	font-size: 15px;
	color: var(--EF-Color-Text, #333);
}

/* ── Status Badge ── */

.ef-tracking-status {
	margin-bottom: 28px;
}

.ef-tracking-status__badge {
	display: inline-block;
	padding: 6px 16px;
	font-size: 14px;
	border-radius: 20px;
}

/* Warranty badge colors (shared with account page) */
.ef-warranty-badge {
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
}
.ef-warranty-badge--new,
.ef-warranty-badge--received {
	background: color-mix(in srgb, var(--EF-Color-Primary, #55368A) 10%, transparent);
	border: 1px solid color-mix(in srgb, var(--EF-Color-Primary, #55368A) 25%, transparent);
	color: var(--EF-Color-Primary, #55368A);
}
.ef-warranty-badge--in_progress {
	background: color-mix(in srgb, var(--EF-Color-Warning, #f59e0b) 10%, transparent);
	border: 1px solid color-mix(in srgb, var(--EF-Color-Warning, #f59e0b) 25%, transparent);
	color: var(--EF-Color-Warning, #b45309);
}
.ef-warranty-badge--needs_clarification {
	background: color-mix(in srgb, var(--EF-Color-Error, #d45a4a) 10%, transparent);
	border: 1px solid color-mix(in srgb, var(--EF-Color-Error, #d45a4a) 25%, transparent);
	color: var(--EF-Color-Error, #d45a4a);
}
.ef-warranty-badge--resolved {
	background: color-mix(in srgb, var(--EF-Color-Olive, #5F7A00) 10%, transparent);
	border: 1px solid color-mix(in srgb, var(--EF-Color-Olive, #5F7A00) 25%, transparent);
	color: var(--EF-Color-Olive, #5F7A00);
}
.ef-warranty-badge--closed {
	background: var(--EF-Color-Surface-2, #f0f1f3);
	border: 1px solid var(--EF-Color-Border-Medium, #d4d7dc);
	color: var(--EF-Color-Text-2, #535B65);
}

/* ══════════════════════════════════════════
   Event Timeline
   ══════════════════════════════════════════ */

.ef-timeline {
}

.ef-timeline__stage {
	position: relative;
	padding-left: 24px;
	display: flex;
	flex-direction: column;
}

/* Vertical connector line */
.ef-timeline__stage::before {
	content: '';
	position: absolute;
	left: 5px;
	top: 12px;
	bottom: 0;
	width: 2px;
	background: var(--EF-Color-Border-Light, #e0e0e0);
}
.ef-timeline__stage:last-child::before {
	display: none;
}

/* ── Stage Header ── */

.ef-timeline__stage-header {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin-bottom: 10px;
	position: relative;
}

.ef-timeline__dot {
	position: absolute;
	left: -24px;
	top: 50%;
	transform: translateY(-50%);
	width: 12px;
	height: 12px;
	border-radius: 50%;
	flex-shrink: 0;
	z-index: 1;
}

/* Dot colors */
.ef-timeline__dot--new,
.ef-timeline__dot--received       { background: var(--EF-Color-Primary, #55368A); }
.ef-timeline__dot--in_progress    { background: var(--EF-Color-Warning, #f59e0b); }
.ef-timeline__dot--needs_clarification { background: var(--EF-Color-Error, #d45a4a); }
.ef-timeline__dot--resolved       { background: var(--EF-Color-Olive, #5F7A00); }
.ef-timeline__dot--closed         { background: var(--EF-Color-Border-Strong, #c4c8cd); }

/* Active stage — double ring */
.ef-timeline__stage--active .ef-timeline__dot {
	box-shadow: 0 0 0 3px var(--EF-Color-Surface, #fff), 0 0 0 5px currentColor;
}
.ef-timeline__stage--active .ef-timeline__dot--received       { color: var(--EF-Color-Primary, #55368A); }
.ef-timeline__stage--active .ef-timeline__dot--in_progress    { color: var(--EF-Color-Warning, #f59e0b); }
.ef-timeline__stage--active .ef-timeline__dot--needs_clarification { color: var(--EF-Color-Error, #d45a4a); }
.ef-timeline__stage--active .ef-timeline__dot--resolved       { color: var(--EF-Color-Olive, #5F7A00); }
.ef-timeline__stage--active .ef-timeline__dot--closed         { color: var(--EF-Color-Border-Strong, #c4c8cd); }

.ef-timeline__stage-label {
	font-size: 14px;
	font-weight: 500;
	color: var(--EF-Color-Text, #333);
}

.ef-timeline__stage-date {
	font-size: 12px;
	color: var(--EF-Color-Text-Muted, #848B95);
}

/* ── Messages ── */

.ef-timeline__message {
	margin-bottom: 10px;
	padding: 10px 14px;
	font-size: 14px;
	line-height: 1.5;
	width: fit-content;
	max-width: 85%;
}

.ef-timeline__message--customer {
	background: var(--EF-Color-Accent-Soft, #F2F7D9);
	border-left: 3px solid var(--EF-Color-Olive, #5F7A00);
	margin-right: 30px;
	margin-left: -7px;
	border-radius: 0 8px 8px 0;
}

.ef-timeline__message--shop {
	background: color-mix(in srgb, var(--EF-Color-Primary, #55368A) 6%, transparent);
	border-right: 3px solid var(--EF-Color-Primary, #55368A);
	margin-left: 30px;
	border-radius: 8px 0 0 8px;
	text-align: right;
	margin-right: 0;
	align-self: flex-end;
}

.ef-timeline__message-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 5px;
}

.ef-timeline__message--customer .ef-timeline__message-header {
	justify-content: flex-end;
}

.ef-timeline__message--shop .ef-timeline__message-header {
	justify-content: flex-end;
}

.ef-timeline__sender {
	font-size: 12px;
	font-weight: 600;
	color: var(--EF-Color-Text-Muted, #848B95);
	text-transform: uppercase;
	letter-spacing: .3px;
}

.ef-timeline__time {
	font-size: 11px;
	color: var(--EF-Color-Text-Muted, #848B95);
}

.ef-timeline__message-body {
	color: var(--EF-Color-Text, #444);
}

/* ── Attachments inside messages ── */

.ef-timeline__attachments {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.ef-timeline__att {
	width: 40px;
	height: 40px;
	background: var(--EF-Color-Surface, #fff);
	color: var(--EF-Color-Text-Muted, #848B95);
}

.ef-timeline__att img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ef-timeline__att-video {
	width: 40px;
	height: 40px;
	border-radius: 5px;
}

.ef-timeline__att-file {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 11px;
	color: var(--EF-Color-Text-Muted, #848B95);
	background: var(--EF-Color-Surface-2, #f5f5f5);
}

/* ══════════════════════════════════════════
   Reply Form
   ══════════════════════════════════════════ */

.ef-timeline__reply {
	padding: 10px;
	border: 1px solid var(--EF-Color-Border-Light, #e8e8e8);
	background: var(--EF-Color-Surface-2, #f8f8f8);
	border-radius: var(--everfox-radius, 8px);
	margin-top: 10px;
}

.ef-timeline__reply-title {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 12px;
	color: var(--EF-Color-Text, #333);
}

.ef-timeline__reply-form textarea {
	width: 100%;
	min-height: 80px;
	padding: 10px;
	border: 1px solid var(--EF-Color-Border-Light, #ddd);
	border-radius: 3px;
	font: inherit;
	font-size: 14px;
	resize: vertical;
	box-sizing: border-box;
}
.ef-timeline__reply-form textarea:focus {
	outline: none;
	border-color: var(--EF-Color-Primary, #55368A);
}

.ef-timeline__reply-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 10px;
	gap: 8px;
}

.ef-timeline__reply-attach {
	display: flex;
	gap: 6px;
}

.ef-timeline__reply-attach-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 10px;
	font-size: 13px;
	border: 1px solid var(--EF-Color-Border-Light, #ddd);
	border-radius: 6px;
	background: var(--EF-Color-Surface, #fff);
	cursor: pointer;
	color: var(--EF-Color-Text-2, #666);
}
.ef-timeline__reply-attach-btn:hover {
	background: var(--EF-Color-Surface-2, #f5f5f5);
	border-color: var(--EF-Color-Border-Medium, #ccc);
}

.ef-timeline__reply-submit {
	padding: 8px 20px;
	font-size: 14px;
}

.ef-timeline__reply-previews {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.ef-timeline__reply-preview {
	width: 48px;
	height: 48px;
	border-radius: 4px;
	overflow: hidden;
	border: 1px solid var(--EF-Color-Border-Light, #e0e0e0);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	color: var(--EF-Color-Text-Muted, #848B95);
}
.ef-timeline__reply-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ef-timeline__reply-preview--video {
	width: auto;
	padding: 4px 8px;
	font-size: 11px;
}

/* ── File limits hint ── */
.ef-timeline__reply-hint {
	margin-top: 6px;
	font-size: 11px;
	color: var(--EF-Color-Text-Muted, #848B95);
}

/* ── Responsive ── */

@media (max-width: 480px) {
	.ef-tracking-meta {
		grid-template-columns: 1fr;
	}
}
