/**
 * GC RMA front end: the claim form and the status page.
 *
 * Inherits the host theme's tokens with neutral fallbacks, so the form looks
 * like the site it sits in without carrying a palette of its own.
 */

.gcrma-form,
.gcrma-status {
	max-width: 780px;
	margin: 0 auto 48px;
	font-family: var(--font-body, inherit);
	color: var(--color-ink, #1d1d1b);
}

.gcrma-intro { margin: 0 0 16px; font-size: 16px; line-height: 1.5; }
.gcrma-intro--small { font-size: 14px; color: #555; }
.gcrma-intro a { color: var(--color-brand-primary, #c8302b); }

.gcrma-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- Progress */
.gcrma-progress {
	display: flex;
	gap: 6px;
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
}
.gcrma-progress:empty { display: none; }
.gcrma-progress li {
	flex: 1;
	height: 6px;
	border-radius: 3px;
	background: var(--color-border, #e3e3e3);
}
.gcrma-progress li.is-done,
.gcrma-progress li.is-current { background: var(--color-brand-primary, #c8302b); }
.gcrma-progress li.is-current { opacity: 0.6; }

/* ---------------------------------------------------------------- Steps */
.gcrma-step {
	margin: 0 0 24px;
	padding: 24px;
	border: 1px solid var(--color-border, #e3e3e3);
	border-radius: 6px;
	background: var(--color-bg, #fff);
}
.gcrma-step[hidden] { display: none; }
.gcrma-step legend {
	padding: 0 8px;
	font-family: var(--font-heading, inherit);
	font-size: 20px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.gcrma-field { margin: 0 0 16px; }
.gcrma-field label,
.gcrma-label {
	display: block;
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 700;
}
.gcrma-req { color: var(--color-brand-primary, #c8302b); }
.gcrma-help { margin: 6px 0 0; font-size: 13px; color: #666; line-height: 1.45; }
.gcrma-warranty { margin-top: 16px; }

.gcrma-form input[type="text"],
.gcrma-form input[type="email"],
.gcrma-form input[type="tel"],
.gcrma-form input[type="date"],
.gcrma-form input[type="number"],
.gcrma-form select,
.gcrma-form textarea {
	display: block;
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #bbb;
	border-radius: 4px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: 16px;
}
.gcrma-form input:focus,
.gcrma-form select:focus,
.gcrma-form textarea:focus {
	outline: 2px solid var(--color-brand-primary, #c8302b);
	outline-offset: 1px;
}
.gcrma-form .is-invalid { border-color: var(--color-brand-primary, #c8302b); }
.gcrma-form input[type="file"] { font-size: 14px; }

.gcrma-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.gcrma-row--3 { grid-template-columns: 2fr 2fr 1fr; }
.gcrma-field--qty { max-width: 120px; }

.gcrma-radio,
.gcrma-check {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 18px 8px 0;
	font-size: 15px;
	font-weight: 400;
}
.gcrma-radio input,
.gcrma-check input { width: auto; margin: 0; }
.gcrma-interests .gcrma-check { display: flex; margin-right: 0; }

/* ---------------------------------------------------------------- Brands */
/* Centered rows, so an odd count ends with a centered short row instead of
   one tile left hanging on the left. */
.gcrma-brands {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin: 0 0 8px;
}
.gcrma-brand {
	position: relative;
	display: block;
	flex: 0 1 164px;
	min-width: 140px;
	padding: 18px 12px;
	border: 2px solid var(--color-border, #e3e3e3);
	border-radius: var(--radius-button, 2px);
	text-align: center;
	font-weight: 700;
	cursor: pointer;
}
.gcrma-brands--two .gcrma-brand { flex-basis: 220px; }
.gcrma-brand input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gcrma-brand:has(input:checked) { border-color: var(--color-brand-primary, #c8302b); background: #fff5f5; }
.gcrma-brand:has(input:focus-visible) { outline: 2px solid var(--color-brand-primary, #c8302b); }

/* ---------------------------------------------------------------- Products */
.gcrma-item {
	margin: 0 0 16px;
	padding: 16px;
	border: 1px dashed #c9c9c9;
	border-radius: 6px;
	background: #fafafa;
}
.gcrma-item__head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 12px; }
.gcrma-item__title { font-weight: 800; text-transform: uppercase; font-size: 13px; letter-spacing: 0.04em; }
.gcrma-link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--color-brand-primary, #c8302b);
	font: inherit;
	font-size: 14px;
	text-decoration: underline;
	cursor: pointer;
}
.gcrma-field--search { position: relative; }
.gcrma-suggestions {
	position: absolute;
	z-index: 20;
	left: 0;
	right: 0;
	top: 100%;
	max-height: 260px;
	overflow: auto;
	border: 1px solid #bbb;
	border-top: 0;
	background: #fff;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.gcrma-suggestions[hidden] { display: none; }
.gcrma-suggestions button {
	display: block;
	width: 100%;
	padding: 8px 12px;
	border: 0;
	border-bottom: 1px solid #eee;
	background: none;
	text-align: left;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}
.gcrma-suggestions button:hover,
.gcrma-suggestions button:focus { background: #f3f3f3; outline: none; }
.gcrma-suggestions button strong { display: block; }
.gcrma-suggestions button span { color: #666; font-size: 13px; }
.gcrma-suggestions .gcrma-suggestions__none { padding: 8px 12px; font-size: 13px; color: #666; }
.gcrma-sku-chosen { margin: 6px 0 0; font-size: 13px; color: #1a7f37; }

/* ---------------------------------------------------------------- Photos */
.gcrma-filelist { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; color: #555; }
.gcrma-filelist li { margin: 0 0 4px; }
.gcrma-filelist li.is-too-big { color: #b3262e; }
.gcrma-filelist-remove { background: none; border: 0; padding: 0 0 0 10px; font: inherit; font-size: 13px; color: #b3262e; text-decoration: underline; cursor: pointer; }

/* ---------------------------------------------------------------- Review */
.gcrma-review { margin: 0 0 16px; }
.gcrma-review dl { display: grid; grid-template-columns: 180px 1fr; gap: 6px 12px; margin: 0; font-size: 15px; }
.gcrma-review dt { color: #666; }
.gcrma-review dd { margin: 0; }
.gcrma-review ul { margin: 0; padding-left: 18px; }

.cf-turnstile { margin: 0 0 16px; }

/* ---------------------------------------------------------------- Alerts and nav */
/* Messages in the site's own voice: the ink bar the footer uses, white text,
   an uppercase label in the heading face, a brand-red rule on the left. No
   pastel tints. */
.gcrma-alert {
	position: relative;
	margin: 0 0 20px;
	padding: 14px 18px 14px 20px;
	border-left: 4px solid var(--color-brand-primary, #be3437);
	background: var(--color-ink, #221f20);
	color: #fff;
	font-size: 15px;
	line-height: 1.5;
}
.gcrma-alert[hidden] { display: none; }
.gcrma-alert::before {
	display: block;
	margin: 0 0 2px;
	font-family: var(--font-heading, inherit);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-brand-on-dark, #d6696b);
}
.gcrma-alert--error::before { content: "Not found"; }
[data-gcrma-form] .gcrma-alert--error::before { content: "Check this"; }
.gcrma-alert--info { border-left-color: var(--color-secondary, #6e7273); }
.gcrma-alert--info::before { content: "Please note"; color: #bdbdbd; }
.gcrma-alert--success { border-left-color: #3c9a52; }
.gcrma-alert--success::before { content: "Claim received"; color: #8fd39e; }
.gcrma-alert a { color: #fff; }

.gcrma-nav { display: flex; gap: 12px; justify-content: flex-end; }
.gcrma-button {
	display: inline-block;
	padding: 12px 24px;
	border: 2px solid var(--color-brand-primary, #c8302b);
	border-radius: var(--radius-button, 4px);
	background: var(--color-brand-primary, #c8302b);
	color: #fff;
	font: inherit;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	cursor: pointer;
}
.gcrma-button[hidden] { display: none; }
.gcrma-button:disabled { opacity: 0.6; cursor: wait; }
.gcrma-button--secondary { background: transparent; color: var(--color-brand-primary, #c8302b); }
.gcrma-button--secondary:hover { background: #fff5f5; }

/* ---------------------------------------------------------------- Status page */
.gcrma-lookup .gcrma-nav { justify-content: flex-start; }
.gcrma-status__head {
	display: grid;
	grid-template-columns: repeat(3, auto);
	gap: 24px;
	margin: 0 0 20px;
	padding: 20px 24px;
	border: 1px solid var(--color-border, #e3e3e3);
	border-radius: 6px;
	background: #fafafa;
}
.gcrma-status__label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #666; }
.gcrma-status__rma { font-size: 28px; font-weight: 900; font-family: var(--font-heading, inherit); letter-spacing: 0.04em; }
.gcrma-status__badge {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 999px;
	background: #e3e3e3;
	font-weight: 700;
	font-size: 14px;
}
.gcrma-status__badge--sage_imported { background: #fff2cc; }
.gcrma-status__badge--received,
.gcrma-status__badge--partially_received { background: #d9ecff; }
.gcrma-status__badge--shipped { background: #d4f5dd; }
.gcrma-status__badge--closed,
.gcrma-status__badge--denied { background: #e3e3e3; }
.gcrma-status__text { font-size: 16px; }
.gcrma-status__tracking { font-size: 16px; }
.gcrma-status__h2 { margin: 28px 0 10px; font-size: 18px; text-transform: uppercase; letter-spacing: 0.03em; }
.gcrma-status__items {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}
.gcrma-status__items th,
.gcrma-status__items td {
	padding: 10px 12px 10px 0;
	border-bottom: 1px solid var(--color-border, #e3e3e3);
	text-align: left;
	vertical-align: top;
}
.gcrma-status__items th {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #666;
}
.gcrma-status__items td:nth-child(2),
.gcrma-status__items th:nth-child(2) { width: 60px; text-align: center; }
.gcrma-status__links { margin: 20px 0 0; font-size: 14px; }
.gcrma-status__links a { color: var(--color-brand-primary, #be3437); font-weight: 700; }
.gcrma-status__links span { margin: 0 8px; color: #999; }
.gcrma-status__address { font-size: 16px; line-height: 1.6; }
.gcrma-muted { color: #666; font-size: 14px; }

.gcrma-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--color-border, #e3e3e3); }
.gcrma-timeline li { position: relative; margin: 0 0 14px; }
.gcrma-timeline li::before {
	content: "";
	position: absolute;
	left: -24px;
	top: 6px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--color-brand-primary, #c8302b);
}
.gcrma-timeline__date { display: block; font-size: 12px; color: #666; }
.gcrma-timeline__text { font-weight: 700; }

@media (max-width: 640px) {
	.gcrma-step { padding: 16px; }
	.gcrma-row,
	.gcrma-row--3 { grid-template-columns: 1fr; }
	.gcrma-status__head { grid-template-columns: 1fr; gap: 12px; }
	.gcrma-nav { flex-direction: column-reverse; }
	.gcrma-nav .gcrma-button { width: 100%; text-align: center; }
	.gcrma-review dl { grid-template-columns: 1fr; }
}
