/* ============================================================
   Return Request — front-end form
   Palette allineata al tema (brand green + Montserrat, angoli
   squadrati, pulsante uppercase).
   NB: dimensioni in px (non rem) perché alcuni temi impostano
   html{font-size:62.5%} e le unità rem diventerebbero minuscole.
   Per adattarlo ad un altro tema basta cambiare le 4 variabili.
   ============================================================ */
.reso-wrap {
	--reso-primary: #125f2d;          /* verde scuro (pulsanti) */
	--reso-primary-hover: #0e4a24;
	--reso-accent: #aeca39;           /* verde lime (brand) */
	--reso-ring: rgba(18, 95, 45, .2);

	--reso-border: #e5e5e5;           /* bordo card */
	--reso-field-bg: #f7f7f7;         /* sfondo campi */
	--reso-field-border: #d5d7d5;     /* bordo campi */
	--reso-text: #292a27;
	--reso-muted: #5f6560;

	max-width: 620px;
	margin: 28px 0;
	padding: 30px 30px 26px;
	background: #fff;
	border: 1px solid var(--reso-border);
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
	color: var(--reso-text);
	font-size: 16px;
	line-height: 1.55;
}
.reso-wrap,
.reso-wrap *,
.reso-wrap *::before,
.reso-wrap *::after {
	box-sizing: border-box;
}

/* --- Header --- */
.reso-title {
	display: inline-block;
	margin: 0 0 16px;
	padding-bottom: 8px;
	border-bottom: 3px solid var(--reso-accent);
	font-size: 23px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .6px;
	line-height: 1.25;
	color: var(--reso-text);
}
.reso-intro {
	margin: 0 0 24px;
	color: var(--reso-muted);
	font-size: 16px;
	line-height: 1.55;
}

/* --- Fields --- */
.reso-form .reso-field {
	display: flex;
	flex-direction: column;
	margin: 0 0 20px;
}
.reso-form label {
	margin-bottom: 8px;
	font-size: 16px;
	font-weight: 600;
	color: var(--reso-text);
}
.reso-wrap .reso-form input[type="text"],
.reso-wrap .reso-form input[type="email"],
.reso-wrap .reso-form select,
.reso-wrap .reso-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--reso-field-border);
	border-radius: 3px;
	background: var(--reso-field-bg);
	color: var(--reso-text);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.5;
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
	appearance: none;
	-webkit-appearance: none;
}
.reso-wrap .reso-form input::placeholder,
.reso-wrap .reso-form textarea::placeholder {
	color: #98a09a;
}
.reso-wrap .reso-form input[type="text"]:hover,
.reso-wrap .reso-form input[type="email"]:hover,
.reso-wrap .reso-form select:hover,
.reso-wrap .reso-form textarea:hover {
	border-color: #b3b7b3;
}
.reso-wrap .reso-form input[type="text"]:focus,
.reso-wrap .reso-form input[type="email"]:focus,
.reso-wrap .reso-form select:focus,
.reso-wrap .reso-form textarea:focus {
	outline: none;
	border-color: var(--reso-primary);
	box-shadow: 0 0 0 3px var(--reso-ring);
	background: #fff;
}
.reso-wrap .reso-form textarea {
	min-height: 112px;
	resize: vertical;
}

/* Freccia custom della select */
.reso-wrap .reso-form select {
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555555' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 20px;
	cursor: pointer;
}

/* --- Submit (allineato ai pulsanti del tema) --- */
.reso-actions {
	margin: 24px 0 0;
}
.reso-wrap .reso-submit {
	display: inline-block;
	min-width: 210px;
	padding: 15px 28px;
	border: 0;
	border-radius: 3px;
	background: var(--reso-primary);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 1.2px;
	cursor: pointer;
	transition: background .15s ease, transform .1s ease;
}
.reso-wrap .reso-submit:hover {
	background: var(--reso-primary-hover);
}
.reso-wrap .reso-submit:active {
	transform: translateY(1px);
}
.reso-wrap .reso-submit:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px var(--reso-ring);
}
.reso-wrap .reso-submit[disabled] {
	opacity: .65;
	cursor: default;
}

/* --- Privacy checkbox --- */
.reso-form .reso-field--check {
	margin-top: 22px;
}
.reso-wrap .reso-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--reso-text);
	cursor: pointer;
}
.reso-wrap .reso-check input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	flex: 0 0 auto;
	accent-color: var(--reso-primary);
	cursor: pointer;
}
.reso-wrap .reso-check a {
	color: var(--reso-primary);
	font-weight: 600;
	text-decoration: underline;
}
.reso-wrap .reso-check a:hover {
	text-decoration: none;
}

/* --- Empty state --- */
.reso-empty {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 16px 18px;
	background: var(--reso-field-bg);
	border: 1px solid var(--reso-field-border);
	border-left: 3px solid var(--reso-accent);
	border-radius: 3px;
	color: var(--reso-muted);
	font-size: 16px;
	line-height: 1.5;
}
/* Form manuale mostrato come fallback sotto l'alert "nessun ordine idoneo" */
.reso-empty + .reso-form {
	margin-top: 22px;
}
.reso-empty::before {
	content: "";
	width: 22px;
	height: 22px;
	flex: 0 0 auto;
	margin-top: 1px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23125f2d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ============================================================
   Notices (renderizzate prima di .reso-wrap)
   ============================================================ */
.reso-notice {
	max-width: 620px;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 18px;
	padding: 14px 16px;
	border: 1px solid transparent;
	border-left-width: 4px;
	border-radius: 3px;
	font-size: 16px;
	line-height: 1.5;
}
.reso-notice::before {
	content: "";
	width: 22px;
	height: 22px;
	flex: 0 0 auto;
	margin-top: 1px;
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
}
.reso-notice--ok {
	background: #eef7ed;
	border-color: #c7e3bf;
	border-left-color: #125f2d;
	color: #0f4d26;
}
.reso-notice--ok::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23125f2d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}
.reso-notice--err {
	background: #fef3f2;
	border-color: #fecdca;
	border-left-color: #d92d20;
	color: #912018;
}
.reso-notice--err::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d92d20' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v5M12 16h.01'/%3E%3C/svg%3E");
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 560px) {
	.reso-wrap {
		padding: 22px 18px 18px;
	}
	.reso-wrap .reso-submit {
		width: 100%;
	}
}
