/* HM Returns — front klienta.
 *
 * Branding sterowany zmiennymi --hm-*. Domyślne wartości = paleta HairMax;
 * na innym sklepie (np. velumea) wystarczy nadpisać zmienne w :root motywu,
 * bez dotykania tego pliku.
 */

:root {
	--hm-primary: #72b4bf;          /* teal/cyan — kolor wiodący marki */
	--hm-primary-dark: #5a9aa5;     /* hover / akcenty */
	--hm-accent: #ed4b38;           /* czerwień — pola wymagane, ostrzeżenia */
	--hm-border: #e2e3e0;           /* jasnoszara linia */
	--hm-border-soft: #f0f0ee;
	--hm-bg-soft: #f5f5f2;          /* off-white tło bloków */
	--hm-text: #333333;
	--hm-text-muted: #777777;
	--hm-radius: 4px;
	--hm-font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.hm-returns,
.hm-return-form,
.hm-return-summary,
.hm-returns-order-cta {
	font-family: var(--hm-font);
	color: var(--hm-text);
}

.hm-returns {
	margin-bottom: 2em;
}

/* --- Lista zwrotów + zamówienia kwalifikujące się --- */

.hm-returns-list {
	width: 100%;
	margin-bottom: 2em;
}

.hm-returns-eligible {
	list-style: none;
	margin: 0 0 1.5em;
	padding: 0;
}

.hm-returns-eligible li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	flex-wrap: wrap;
	padding: 0.85em 0;
	border-bottom: 1px solid var(--hm-border);
}

.hm-returns-eligible small {
	color: var(--hm-text-muted);
}

/* --- Formularz (krok 1) --- */

.hm-return-form {
	max-width: 620px;
}

.hm-return-form .hm-field {
	margin: 0 0 1.5em;
}

.hm-return-form fieldset {
	border: 1px solid var(--hm-border);
	border-radius: var(--hm-radius);
	padding: 1em 1.25em;
	margin: 0 0 1.5em;
}

.hm-return-form legend {
	font-weight: 600;
	font-size: 0.95em;
	padding: 0 0.4em;
}

.hm-return-form label {
	display: block;
	font-weight: 500;
	margin-bottom: 0.4em;
}

.hm-field--type label {
	font-weight: 400;
	margin: 0.35em 0;
}

.hm-field--type input[type="radio"] {
	margin-right: 0.5em;
	accent-color: var(--hm-primary);
}

/* Pola tekstowe wypełniają kontener (do max-width formularza). */
.hm-return-form input[type="text"],
.hm-return-form input[type="email"],
.hm-return-form input[type="number"],
.hm-return-form textarea {
	width: 100%;
	box-sizing: border-box;
	font-family: var(--hm-font);
	border: 1px solid var(--hm-border);
	border-radius: var(--hm-radius);
	padding: 0.6em 0.75em;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hm-return-form input[type="text"]:focus,
.hm-return-form input[type="email"]:focus,
.hm-return-form input[type="number"]:focus,
.hm-return-form textarea:focus {
	border-color: var(--hm-primary);
	box-shadow: 0 0 0 2px rgba(114, 180, 191, 0.2);
	outline: none;
}

.hm-return-form textarea {
	min-height: 90px;
}

.hm-return-form .required {
	color: var(--hm-accent);
}

/* Pozycje zamówienia */
.hm-items {
	margin: 0;
}

.hm-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	padding: 0.6em 0;
	border-bottom: 1px solid var(--hm-border-soft);
}

.hm-item:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.hm-item__name {
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 400;
}

.hm-item__name input[type="checkbox"] {
	flex: 0 0 auto;
	accent-color: var(--hm-primary);
}

.hm-item__qty {
	display: flex;
	align-items: center;
	gap: 0.4em;
	white-space: nowrap;
	flex: 0 0 auto;
}

.hm-item__qty input[type="number"] {
	width: 64px;
	text-align: center;
}

.hm-item__max {
	color: var(--hm-text-muted);
}

.hm-field--submit {
	margin-top: 0.5em;
}

/* --- Podsumowanie (krok 2) --- */

.hm-return-summary {
	max-width: 720px;
}

.hm-legal-box {
	border: 1px solid var(--hm-border);
	border-left: 3px solid var(--hm-primary);
	border-radius: var(--hm-radius);
	background: var(--hm-bg-soft);
	padding: 1.25em 1.5em;
	margin: 1em 0 1.5em;
}

.hm-legal-box h3 {
	margin-top: 0;
}

.hm-legal-box ul {
	margin: 0.5em 0 1em 1.2em;
}

.hm-bank-status {
	margin-bottom: 1.5em;
}

.hm-form--confirm .hm-field--submit {
	display: flex;
	align-items: center;
	gap: 1em;
	flex-wrap: wrap;
}

/* Przyciski marki — !important, bo nadpisujemy style motywu/Woo dla .button. */
.hm-button--confirm,
.hm-returns-order-cta .button {
	background: var(--hm-primary) !important;
	border-color: var(--hm-primary) !important;
	color: #fff !important;
	font-family: var(--hm-font) !important;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.hm-button--confirm:hover,
.hm-returns-order-cta .button:hover {
	background: var(--hm-primary-dark) !important;
	border-color: var(--hm-primary-dark) !important;
}

.hm-button--secondary {
	background: transparent !important;
	border: 1px solid var(--hm-border) !important;
	color: var(--hm-text) !important;
	font-family: var(--hm-font) !important;
}

.hm-button--secondary:hover {
	border-color: var(--hm-primary) !important;
	color: var(--hm-primary) !important;
}

/* --- Statusy --- */

.hm-status {
	display: inline-block;
	padding: 0.15em 0.6em;
	border-radius: 3px;
	background: var(--hm-bg-soft);
	font-size: 0.85em;
}

.hm-status--confirmed,
.hm-status--accepted,
.hm-status--refunded {
	background: #e3f1f3;
	color: #2c6e79;
}

.hm-status--rejected {
	background: #fbe3df;
	color: #a3271a;
}
