/**
 * YWH Account — styles de l'espace client.
 *
 * Volontairement minimal : la typographie, les couleurs de texte et les boutons
 * sont hérités du thème. Seules les variables ci-dessous sont à ajuster.
 */

.ywh-returns,
.ywh-privacy {
	--ywh-border: color-mix(in srgb, currentColor 15%, transparent);
	--ywh-muted: color-mix(in srgb, currentColor 65%, transparent);
	--ywh-surface: color-mix(in srgb, currentColor 4%, transparent);
	--ywh-danger: #a4262c;
	--ywh-space: 1.5rem;
}

.ywh-returns__section,
.ywh-privacy__section {
	margin-block-end: calc(var(--ywh-space) * 2);
}

.ywh-returns__section h3,
.ywh-privacy__section h3 {
	margin-block-end: 0.75rem;
}

/* --- Listes de demandes ------------------------------------------------- */

.ywh-returns__note {
	margin: 0.4rem 0 0;
	color: var(--ywh-muted);
	font-size: 0.9em;
}

.ywh-returns__status {
	display: inline-block;
	padding: 0.15em 0.6em;
	border: 1px solid var(--ywh-border);
	border-radius: 999px;
	font-size: 0.85em;
	line-height: 1.6;
	white-space: nowrap;
}

.ywh-returns__status--rejected {
	border-color: var(--ywh-danger);
	color: var(--ywh-danger);
}

/* --- Bloc commande dépliable -------------------------------------------- */

.ywh-returns__order {
	margin-block-end: 0.75rem;
	border: 1px solid var(--ywh-border);
	border-radius: 4px;
}

.ywh-returns__order-summary {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	align-items: baseline;
	justify-content: space-between;
	padding: 0.9rem 1.1rem;
	cursor: pointer;
}

.ywh-returns__order[open] .ywh-returns__order-summary {
	border-block-end: 1px solid var(--ywh-border);
}

.ywh-returns__order-number {
	font-weight: 600;
}

.ywh-returns__deadline {
	color: var(--ywh-muted);
	font-size: 0.9em;
}

.ywh-returns__form {
	padding: 1.1rem;
}

/* --- Formulaire --------------------------------------------------------- */

.ywh-returns__fieldset {
	margin: 0 0 var(--ywh-space);
	padding: 0;
	border: 0;
}

.ywh-returns__fieldset legend {
	margin-block-end: 0.5rem;
	padding: 0;
	font-weight: 600;
}

.ywh-returns__items {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ywh-returns__item {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	align-items: center;
	justify-content: space-between;
	padding-block: 0.6rem;
	border-block-end: 1px solid var(--ywh-border);
}

.ywh-returns__item:last-child {
	border-block-end: 0;
}

.ywh-returns__item-name {
	flex: 1 1 12rem;
	margin: 0;
}

.ywh-returns__item-qty {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.ywh-returns__item-qty input {
	inline-size: 4.5rem;
}

.ywh-returns__item-max {
	color: var(--ywh-muted);
	font-size: 0.9em;
}

.ywh-returns__radio {
	display: flex;
	gap: 0.5rem;
	align-items: baseline;
	margin: 0 0 0.4rem;
}

.ywh-returns__field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-block-end: var(--ywh-space);
}

.ywh-returns__field textarea {
	inline-size: 100%;
}

.ywh-returns__optional {
	color: var(--ywh-muted);
	font-weight: 400;
}

/* --- Mentions légales --------------------------------------------------- */

.ywh-returns__legal,
.ywh-privacy__retention {
	color: var(--ywh-muted);
	font-size: 0.9em;
	line-height: 1.6;
}

.ywh-returns__legal-form summary {
	cursor: pointer;
	font-weight: 600;
}

.ywh-returns__legal-text {
	margin: 1rem 0 0;
	padding: 1rem 1.25rem;
	border-inline-start: 3px solid var(--ywh-border);
	background: var(--ywh-surface);
	font-size: 0.9em;
}

.ywh-returns__empty {
	color: var(--ywh-muted);
}

/* --- RGPD --------------------------------------------------------------- */

.ywh-privacy__intro {
	margin-block-end: calc(var(--ywh-space) * 1.5);
}

.ywh-privacy__section--danger {
	padding: 1.25rem;
	border: 1px solid var(--ywh-danger);
	border-radius: 4px;
}

.ywh-privacy__section--danger h3 {
	color: var(--ywh-danger);
}

.ywh-privacy__confirm {
	display: flex;
	gap: 0.5rem;
	align-items: baseline;
}

.ywh-privacy__button--danger {
	background: var(--ywh-danger);
	color: #fff;
}

/* --- Accessibilité ------------------------------------------------------ */

.ywh-returns :focus-visible,
.ywh-privacy :focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.ywh-returns__item {
		align-items: flex-start;
	}
}
