/* Better Homes: Track my order (template-parts/track/track.php, inc/track-order.php). The items and totals
 * card (.bh-track-card, .bh-track-items, .bh-track-totals) is also used for an order in My account
 * (woocommerce/order/order-details.php).
 * The form fields, the main button and the alerts are the sign-in page's (account-page.css). */

.bh-auth.bh-track {
	max-width: 760px;
	margin: 10px auto 60px;
}

.bh-track *,
.bh-track *::before,
.bh-track *::after {
	box-sizing: border-box;
}

/* ---------- Card ---------- */
.bh-track-card {
	margin: 0 0 20px;
	padding: 22px 24px;
	border: 1px solid var(--bh-line);
	border-radius: 14px;
	background: #fff;
}

.bh-track-card h2 {
	margin: 0 0 14px;
	color: var(--bh-ink);
	font-family: inherit;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	text-transform: none;
}

.bh-track-card p {
	margin: 0 0 6px;
	font-size: 14px;
	line-height: 1.6;
}

.bh-track-card p:last-child {
	margin-bottom: 0;
}

.bh-track-card__hint {
	color: var(--bh-muted);
	font-size: 13px !important;
}

/* ---------- Form ---------- */
.bh-track-card--form {
	max-width: 520px;
	margin: 0 auto 24px;
	padding: 30px 28px 32px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
}

.bh-track .bh-track-title {
	margin: 0 0 8px;
	color: var(--bh-ink);
	font-family: inherit;
	font-size: 28px;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	text-transform: none;
}

.bh-track .bh-track-card .bh-track-lead {
	margin: 0 0 18px;
	color: #555;
	font-size: 15px;
	text-align: center;
}

.bh-track .bh-track-card .bh-track-tip {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 20px;
	padding: 12px 14px;
	border: 1px solid var(--bh-line);
	border-radius: 10px;
	background: var(--bh-brand-soft, #f7f0f3);
	color: #444;
	font-size: 14px;
}

.bh-track-tip svg {
	flex: 0 0 auto;
	color: var(--bh-accent);
}

.bh-track .bh-alerts {
	margin: 0 0 18px;
}

/* Prices in the ink colour, not the theme's link green. */
.bh-track .amount,
.bh-track .amount bdi {
	color: inherit;
}

/* ---------- Buttons and badges ---------- */
.bh-track .bh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	margin: 0;
	padding: 0 22px;
	border: 1.5px solid var(--bh-accent);
	border-radius: var(--btn-default-brd-radius, 5px); /* the site's button corners */
	background: #fff;
	color: var(--bh-accent);
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: background .2s ease, color .2s ease, filter .2s ease;
}

.bh-track .bh-btn--solid {
	background: var(--bh-accent);
	color: #fff;
}

.bh-track a.bh-btn--solid:hover {
	filter: brightness(1.08);
	color: #fff;
}

.bh-track .bh-btn:focus-visible {
	outline: 2px solid var(--bh-ink);
	outline-offset: 2px;
}

.bh-track .bh-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}

.bh-track .bh-badge--ok {
	background: var(--bh-brand-soft, #f7f0f3);
	color: var(--bh-brand, #370d1d);
}

.bh-track .bh-badge--active {
	background: #fff1dc;
	color: #a35c00;
}

.bh-track .bh-badge--wait {
	background: #fff8d9;
	color: #8a6d00;
}

.bh-track .bh-badge--bad {
	background: #fdecef;
	color: #b0001a;
}

.bh-track .bh-badge--muted {
	background: #efefef;
	color: #555;
}

/* ---------- Account box ---------- */
.bh-track-box {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 18px;
	margin: 0 0 20px;
	padding: 18px 22px;
	border: 1px solid var(--bh-line);
	border-radius: 14px;
	background: var(--bh-brand-tint, #fbf7f9);
}

.bh-track-card--form + .bh-track-box {
	max-width: 520px;
	margin-right: auto;
	margin-left: auto;
}

.bh-track-box__icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--bh-brand-soft, #f7f0f3);
	color: var(--bh-accent);
}

.bh-track-box__text {
	display: flex;
	flex: 1 1 220px;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	font-size: 14px;
	line-height: 1.5;
}

.bh-track-box__text span {
	color: #555;
}

/* ---------- The order ---------- */
.bh-track-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px 16px;
	margin: 0 0 20px;
	padding: 22px 24px;
	border: 1px solid var(--bh-line);
	border-radius: 14px;
	background: #fff;
}

.bh-track-head p {
	margin: 0;
}

.bh-track-head__no {
	font-size: 18px;
}

.bh-track-head__date {
	margin-top: 4px !important;
	color: #555;
	font-size: 14px;
}

/* Steps: where the order is */
.bh-steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 0 0 20px;
	padding: 24px 12px 20px;
	border: 1px solid var(--bh-line);
	border-radius: 14px;
	background: #fff;
	list-style: none;
}

.bh-step {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0 6px;
	text-align: center;
	list-style: none;
}

/* The line to the next step. */
.bh-step:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 17px;
	left: calc(50% + 26px);
	right: calc(-50% + 26px);
	height: 2px;
	border-radius: 2px;
	background: #e3e1d8;
}

.bh-step--done:not(:last-child)::after {
	background: var(--bh-accent);
}

.bh-step__dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin-bottom: 6px;
	border: 2px solid #d6d6d6;
	border-radius: 50%;
	background: #fff;
	color: #8a8a8a;
	font-size: 14px;
	font-weight: 600;
}

.bh-step--done .bh-step__dot {
	border-color: var(--bh-accent);
	background: var(--bh-accent);
	color: #fff;
}

.bh-step--current .bh-step__dot {
	border-color: var(--bh-accent);
	background: var(--bh-brand-soft, #f7f0f3);
	color: var(--bh-accent);
	animation: bh-track-pulse 2s ease-out infinite;
}

@keyframes bh-track-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(55, 13, 29, .35);
	}

	70%,
	100% {
		box-shadow: 0 0 0 10px rgba(55, 13, 29, 0);
	}
}

.bh-step__label {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}

.bh-step--todo .bh-step__label {
	color: #8a8a8a;
}

.bh-step__text {
	color: var(--bh-muted);
	font-size: 12.5px;
	line-height: 1.4;
}

/* Updates from us */
.bh-updates {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bh-updates li {
	margin: 0;
	padding: 12px 14px;
	border: 1px solid #efeee8;
	border-radius: 10px;
	background: var(--bh-brand-tint, #fbf7f9);
	list-style: none;
}

.bh-updates time {
	display: block;
	margin-bottom: 4px;
	color: #777;
	font-size: 13px;
}

.bh-updates li p {
	margin: 0;
	font-size: 14px;
}

/* Items and totals */
.bh-track-items {
	display: grid;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bh-track-items > li {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr) auto;
	align-items: start;
	gap: 16px;
	margin: 0;
	list-style: none;
}

.bh-track-items__pic {
	display: block;
	width: 76px;
	height: 76px;
	overflow: hidden;
	border-radius: 10px;
	background: var(--bh-brand-soft, #f7f0f3);
}

.bh-track-items__pic img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bh-track .bh-track-card .bh-track-items__name {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
}

.bh-track-items__meta {
	margin: 0 0 4px;
	padding: 0;
	color: #555;
	font-size: 13px;
	list-style: none;
}

.bh-track-items__meta li {
	margin: 0;
	list-style: none;
}

.bh-track-items__meta p {
	display: inline;
	margin: 0;
	font-size: 13px;
}

.bh-track .bh-track-card .bh-track-items__qty {
	margin: 0;
	color: #555;
	font-size: 13px;
}

.bh-track-items__price {
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}

.bh-track-totals {
	margin: 18px 0 0;
	padding: 4px 0 0;
	border-top: 1px solid #efeee8;
}

.bh-track-totals > div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 8px 0;
	font-size: 14px;
}

.bh-track-totals dt,
.bh-track-totals dd {
	margin: 0;
	font-weight: 400;
}

.bh-track-totals .is-total {
	margin-top: 4px;
	padding-top: 12px;
	border-top: 1px solid #efeee8;
	font-size: 16px;
}

.bh-track-totals .is-total dt,
.bh-track-totals .is-total dd {
	font-weight: 600;
}

.bh-track-pair {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.bh-track-items__note {
	margin: 8px 0 0;
	padding: 10px 12px;
	border-radius: 8px;
	background: var(--bh-brand-soft, #f7f0f3);
	color: #444;
	font-size: 13px;
}

.bh-track-items__note p {
	margin: 0 !important;
	font-size: 13px !important;
}

.bh-track-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 18px 0 0 !important;
}

.bh-track-links {
	margin: 4px 0 0;
	color: #888;
	font-size: 14px;
	text-align: center;
}

.bh-track-links a {
	margin: 0 6px;
	color: var(--bh-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bh-track-links a:hover {
	color: var(--bh-accent);
}

@media (max-width: 575px) {
	.bh-track-card,
	.bh-track-head {
		padding: 18px 16px;
	}

	.bh-track-card--form {
		padding: 24px 16px 26px;
	}

	.bh-track .bh-track-title {
		font-size: 24px;
	}

	.bh-track-pair {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}

	.bh-track-items > li {
		grid-template-columns: 60px minmax(0, 1fr);
		gap: 12px;
	}

	.bh-track-items__pic {
		width: 60px;
		height: 60px;
	}

	.bh-track-items__price {
		grid-column: 2;
	}

	.bh-step:not(:last-child)::after {
		left: calc(50% + 22px);
		right: calc(-50% + 22px);
	}

	.bh-step__label {
		font-size: 13px;
	}

	.bh-track-box .bh-btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bh-track *,
	.bh-track *::before,
	.bh-track *::after {
		animation: none !important;
		transition: none !important;
	}
}

/* ---------- Returns & refunds requests (View order, Track my order): template-parts/returns/order-panel.php ---------- */

.bh-rr-wrap {
	margin: 0 0 24px;
}

.bh-track .bh-rr-panel {
	margin: 0;
}

.bh-rr-req + .bh-rr-req {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid var(--bh-line, #e3e1d8);
}

.bh-rr-req__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 12px;
	margin: 0 0 4px;
}

.bh-rr-req__top strong {
	color: var(--bh-ink, #242424);
	font-size: 15px;
	font-weight: 600;
}

.bh-track .bh-rr-req .bh-rr-req__meta {
	margin: 0 0 14px;
	color: var(--bh-muted, #6b6b6b);
	font-size: 14px;
}

.bh-track .bh-rr-timeline {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bh-rr-timeline li {
	position: relative;
	display: flex;
	gap: 12px;
	margin: 0;
	padding: 0 0 16px;
	list-style: none;
}

.bh-rr-timeline li:last-child {
	padding-bottom: 0;
}

.bh-rr-timeline li:not(:last-child)::before {
	content: "";
	position: absolute;
	top: 14px;
	bottom: 0;
	left: 6px;
	width: 1.5px;
	background: var(--bh-line, #e3e1d8);
}

.bh-rr-timeline__dot {
	flex: 0 0 auto;
	width: 13px;
	height: 13px;
	margin-top: 4px;
	border: 2px solid #c9c9c9;
	border-radius: 50%;
	background: #fff;
}

.bh-rr-timeline li.is-latest .bh-rr-timeline__dot {
	border-color: var(--bh-accent, var(--bh-brand, #370d1d));
	background: var(--bh-accent, var(--bh-brand, #370d1d));
	box-shadow: 0 0 0 4px rgba(55, 13, 29, .15);
}

.bh-rr-timeline li > div {
	min-width: 0;
}

.bh-track .bh-rr-timeline p {
	margin: 0 0 2px;
	color: var(--bh-ink, #242424);
	font-size: 14px;
	line-height: 1.5;
}

.bh-track .bh-rr-timeline .bh-rr-timeline__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 10px;
}

.bh-rr-timeline__head strong {
	font-weight: 600;
}

.bh-rr-timeline time {
	color: var(--bh-muted, #6b6b6b);
	font-size: 13px;
}

.bh-rr-timeline li:not(.is-latest) strong,
.bh-track .bh-rr-timeline li:not(.is-latest) p {
	color: var(--bh-muted, #6b6b6b);
}

.bh-track .bh-rr-timeline .bh-rr-timeline__note {
	margin-top: 6px;
	padding: 10px 12px;
	border-left: 3px solid var(--bh-accent, var(--bh-brand, #370d1d));
	border-radius: 0 8px 8px 0;
	background: var(--bh-brand-soft, #f7f0f3);
	color: var(--bh-ink, #242424);
}

.bh-track .bh-rr-panel .bh-rr-panel__more {
	margin: 18px 0 0;
	font-size: 14px;
}

.bh-rr-panel__more a {
	color: var(--bh-ink, #242424);
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bh-rr-panel__more a:hover {
	color: var(--bh-accent, var(--bh-brand, #370d1d));
}

.bh-track .bh-rr-req .bh-rr-req__items {
	margin: 0 0 2px;
	color: var(--bh-ink, #242424);
	font-size: 14px;
}
