/* ---------------------------------------------------------------------------
   Track Your Order
   Scoped under .redpro-track / .redpro-track-help so nothing else is affected.
   Colours taken from the RedProClub logo: black + #e02e2c red.
   --------------------------------------------------------------------------- */

.redpro-track,
.redpro-track-help {
	--rp-red:    #e02e2c;
	--rp-ink:    #1a1a1a;
	--rp-muted:  #6b6b6b;
	--rp-line:   #dcdcdc;
	--rp-fill:   #f5f5f5;
	--rp-radius: 6px;
}

/* --- page heading: red bar under the H1 --- */
.page-title .entry-title,
.redpro-track__intro h2 { text-wrap: balance; }

.redpro-track-title,
body.page .redpro-track ~ * .redpro-track-title { margin-bottom: 0; }

/* Applied to the page H1 by the theme; safe if absent. */
.redpro-track-heading::after,
.entry-title.redpro-track-heading::after {
	content: "";
	display: block;
	width: 104px;
	height: 5px;
	margin-top: 14px;
	background: var(--rp-red);
}

/* --- intro --- */
.redpro-track__intro { margin-bottom: 26px; }

.redpro-track__intro h2 {
	font-size: 22px;
	font-weight: 700;
	color: var(--rp-ink);
	margin: 0 0 10px;
}

.redpro-track__intro p {
	margin: 0 0 4px;
	color: var(--rp-muted);
	font-size: 15px;
	line-height: 1.6;
}

/* --- the form card --- */
.redpro-track__form {
	background: var(--rp-fill);
	border: 1px solid var(--rp-line);
	border-radius: var(--rp-radius);
	padding: 26px 28px 24px;
	margin: 0;
}

.redpro-track__fields {
	display: flex;
	flex-wrap: wrap;
	gap: 18px 26px;
}

.redpro-track__field {
	flex: 1 1 240px;
	min-width: 0;
	margin: 0 !important;
	float: none !important;   /* core uses form-row-first/last floats */
	width: auto !important;
}

.redpro-track__field label {
	display: block;
	font-weight: 700;
	color: var(--rp-ink);
	font-size: 15px;
	margin-bottom: 9px;
}

.redpro-track__field .input-text {
	width: 100%;
	background: #fff;
	border: 1px solid var(--rp-line);
	border-radius: var(--rp-radius);
	padding: 13px 15px;
	font-size: 15px;
	color: var(--rp-ink);
	box-shadow: none;
	height: auto;
}

.redpro-track__field .input-text::placeholder { color: #a5a5a5; }

.redpro-track__field .input-text:focus {
	border-color: var(--rp-ink);
	outline: 2px solid rgba(224, 46, 44, .25);
	outline-offset: 1px;
}

/* --- button --- */
.redpro-track__submit { margin: 22px 0 0 !important; }

.redpro-track__button,
.redpro-track .button.redpro-track__button {
	background: var(--rp-ink);
	color: #fff;
	border: 0;
	border-radius: var(--rp-radius);
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	font-size: 15px;
	padding: 15px 30px;
	line-height: 1;
	min-height: 0;
	transition: background .15s ease;
}

.redpro-track__button:hover,
.redpro-track .button.redpro-track__button:hover { background: var(--rp-red); color: #fff; }

.redpro-track__button:focus-visible { outline: 3px solid var(--rp-red); outline-offset: 2px; }

/* --- footnote --- */
.redpro-track__note {
	margin: 14px 2px 0;
	color: var(--rp-muted);
	font-size: 14px;
	line-height: 1.6;
}

/* --- help card --- */
.redpro-track-help {
	background: #fff;
	border: 1px solid var(--rp-line);
	border-radius: var(--rp-radius);
	padding: 26px 28px;
}

.redpro-track-help__title {
	margin: 0 0 14px;
	font-size: 19px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .01em;
	color: var(--rp-ink);
}

.redpro-track-help p {
	margin: 0 0 14px;
	color: var(--rp-muted);
	font-size: 15px;
	line-height: 1.65;
}

.redpro-track-help__cta { margin-bottom: 0 !important; color: var(--rp-ink) !important; }
.redpro-track-help__cta strong { color: var(--rp-ink); }

.redpro-track-help__cta a {
	color: var(--rp-red);
	font-weight: 700;
	text-decoration: none;
	margin-left: 4px;
}
.redpro-track-help__cta a:hover { text-decoration: underline; }

/* --- the result view, which the mockup does not show ---
   Once an order is found WooCommerce prints its own status line and order
   table. Left unstyled it looks nothing like the rest of the page. */
.redpro-track .woocommerce-order-overview,
.redpro-track .woocommerce-table--order-details,
.redpro-track table.shop_table {
	border: 1px solid var(--rp-line);
	border-radius: var(--rp-radius);
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
	margin-top: 22px;
	font-size: 15px;
}

.redpro-track table.shop_table th,
.redpro-track table.shop_table td { padding: 12px 15px; border-bottom: 1px solid var(--rp-line); }
.redpro-track table.shop_table tr:last-child th,
.redpro-track table.shop_table tr:last-child td { border-bottom: 0; }
.redpro-track table.shop_table th { background: var(--rp-fill); font-weight: 700; text-align: left; }

.redpro-track p.woocommerce-thankyou-order-received,
.redpro-track .woocommerce-order-details__title {
	font-size: 18px;
	font-weight: 700;
	color: var(--rp-ink);
	margin-top: 24px;
}

/* --- notices: wrong order number etc. --- */
.redpro-track .woocommerce-error,
.redpro-track .woocommerce-info,
.redpro-track .woocommerce-message {
	border-radius: var(--rp-radius);
	border: 1px solid var(--rp-line);
	border-left: 4px solid var(--rp-red);
	background: #fff6f6;
	color: var(--rp-ink);
	padding: 14px 18px;
	margin: 0 0 20px;
	list-style: none;
	font-size: 15px;
}

.redpro-track .woocommerce-info {
	border-left-color: var(--rp-ink);
	background: var(--rp-fill);
}

/* --- mobile --- */
@media (max-width: 767px) {
	.redpro-track__form,
	.redpro-track-help { padding: 20px 18px; }

	.redpro-track__fields { gap: 16px; }
	.redpro-track__field { flex: 1 1 100%; }

	.redpro-track__button { width: 100%; }

	.redpro-track-help { margin-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
	.redpro-track__button { transition: none; }
}

/* ---------------------------------------------------------------------------
   Results page (client video, 30 Sep)
   --------------------------------------------------------------------------- */

/* A1 — the help card is lined up with the card beside it by track-order.js,
   which measures the offset and sets margin-top inline. Nothing here may use
   !important on that property or it would override the inline value. */
.redpro-track-help { margin-top: 0; }

/* A3 — centre the result instead of it sitting left */
.redpro-result {
	max-width: 760px;
	margin: 0 auto;
}

.redpro-result__card {
	display: flex;
	gap: 26px;
	align-items: flex-start;
	background: var(--rp-fill, #f5f5f5);
	border: 1px solid var(--rp-line, #dcdcdc);
	border-radius: var(--rp-radius, 6px);
	padding: 26px 28px;
}

/* A4 — product image on the left */
.redpro-result__media {
	flex: 0 0 132px;
	max-width: 132px;
}

.redpro-result__media img,
.redpro-result__img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: var(--rp-radius, 6px);
	background: #fff;
}

.redpro-result__body { flex: 1 1 auto; min-width: 0; }

.redpro-result__order {
	margin: 0 0 4px;
	font-size: 19px;
	font-weight: 700;
	color: var(--rp-ink, #1a1a1a);
}

.redpro-result__items {
	margin: 0 0 16px;
	color: var(--rp-muted, #6b6b6b);
	font-size: 14px;
	line-height: 1.5;
}

/* A6 — placed date / current status / shipped date */
.redpro-result__facts {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 9px 20px;
	margin: 0;
	align-items: baseline;
}

.redpro-result__facts dt {
	margin: 0;
	font-weight: 700;
	color: var(--rp-ink, #1a1a1a);
	font-size: 14px;
}

.redpro-result__facts dd {
	margin: 0;
	color: var(--rp-ink, #1a1a1a);
	font-size: 14px;
}

.redpro-result__status {
	display: inline-block;
	padding: 2px 11px;
	border-radius: 12px;
	background: var(--rp-ink, #1a1a1a);
	color: #fff;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .01em;
}
.redpro-result__status--completed { background: #2e7a4e; }
.redpro-result__status--processing { background: #1e73be; }
.redpro-result__status--on-hold { background: #8a6a22; }
.redpro-result__status--cancelled,
.redpro-result__status--failed { background: #a32b1c; }
.redpro-result__status--refunded { background: #6b6b6b; }

/* tracking block, carrier button removed */
.redpro-result__tracking {
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid var(--rp-line, #dcdcdc);
	font-size: 14px;
}
.redpro-result__tracking table { width: 100%; border-collapse: collapse; }
.redpro-result__tracking td,
.redpro-result__tracking th { padding: 4px 0; text-align: left; }
.redpro-result__tracking img { max-width: 72px; height: auto; }

.redpro-result__notes { margin-top: 26px; }
.redpro-result__notes h2 { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.redpro-result__notes .commentlist { list-style: none; margin: 0; padding: 0; }
.redpro-result__notes .comment_container {
	border: 1px solid var(--rp-line, #dcdcdc);
	border-radius: var(--rp-radius, 6px);
	padding: 14px 16px;
	margin-bottom: 10px;
	background: #fff;
}
.redpro-result__notes .meta { color: var(--rp-muted, #6b6b6b); font-size: 13px; margin: 0 0 6px; }

/* Core prints its own one-line summary ("Order #x was placed on ... and is
   currently ...") which the card above now says properly, so only that line is
   hidden. The order items table and the billing/shipping addresses are left
   alone — they were on the page before and nobody asked for them to go. */
.redpro-track p.order-info { display: none; }

/* Keep the restored blocks looking like the rest of the page. */
.redpro-track .woocommerce-order-details,
.redpro-track .woocommerce-customer-details {
	max-width: 760px;
	margin-inline: auto;
	margin-top: 26px;
}

.redpro-track .woocommerce-order-details h2,
.redpro-track .woocommerce-customer-details h2 {
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 12px;
	color: var( --rp-ink, #1a1a1a );
}

@media (max-width: 600px) {
	.redpro-result__card { flex-direction: column; gap: 18px; padding: 20px 18px; }
	.redpro-result__media { flex: 0 0 auto; max-width: 150px; margin: 0 auto; }
	.redpro-result__facts { grid-template-columns: 1fr; gap: 3px; }
	.redpro-result__facts dd { margin-bottom: 9px; }
}

/* --- product thumbnails in the order items table (results page) --- */
.redpro-item {
	display: flex;
	align-items: center;
	gap: 12px;
}

.redpro-item__media {
	flex: 0 0 56px;
	max-width: 56px;
}

.redpro-item__media img,
.redpro-item__img {
	width: 100%;
	height: auto;
	display: block;
	border: 1px solid var( --rp-line, #dcdcdc );
	border-radius: 4px;
	background: #fff;
}

.redpro-item__name { min-width: 0; }

.redpro-track table.shop_table td.product-name,
.redpro-track table.woocommerce-table__product-name { vertical-align: middle; }

@media (max-width: 600px) {
	.redpro-item { gap: 9px; }
	.redpro-item__media { flex: 0 0 44px; max-width: 44px; }
}
