/*
 * HeyRun Member: frontend
 *
 * Font: ereditati dal tema, nessun typeface imposto.
 * Colori: letti dalle variabili di Woodmart con fallback neutri, così il programma
 * segue il tema invece di combatterlo.
 * Tutto è scopato sotto .hrm per non sporcare il resto del sito.
 */

.hrm,
.hrm-price-label {
	--hrm-accent: var(--wd-primary-color, #14161a);
	--hrm-accent-ink: #fff;
	--hrm-ink: var(--wd-title-color, #14161a);
	--hrm-muted: #6a7078;
	--hrm-line: #e1e4e8;
	--hrm-surface: #fff;
	--hrm-surface-2: #f6f7f8;
	--hrm-radius: var(--wd-form-brd-radius, 10px);
	--hrm-ok-bg: #edf9f1;   --hrm-ok-ink: #1c6b3d;   --hrm-ok-line: #bfe5cd;
	--hrm-err-bg: #fdf0ef;  --hrm-err-ink: #a3231c;  --hrm-err-line: #f3c9c5;
	--hrm-info-bg: #eff4fb; --hrm-info-ink: #1e4a86; --hrm-info-line: #c8daf1;
}

.hrm {
	box-sizing: border-box;
	width: 100%;
	margin-inline: auto;
	color: var(--hrm-ink);
}
.hrm *, .hrm *::before, .hrm *::after { box-sizing: inherit; }
.hrm fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.hrm-signup, .hrm-account { max-width: 620px; }
.hrm-unsub { max-width: 940px; }

.hrm-vh {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* -------------------------------------------------------------- Scheda */

.hrm-card {
	background: var(--hrm-surface);
	border: 1px solid var(--hrm-line);
	border-radius: var(--hrm-radius);
	padding: clamp(22px, 4vw, 38px);
}
.hrm-card__head { margin: 0 0 26px; text-align: center; }
.hrm-card__title {
	margin: 0 0 8px;
	font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem);
	line-height: 1.2;
	color: var(--hrm-ink);
}
.hrm-card__lead {
	margin: 0 auto;
	max-width: 46ch;
	color: var(--hrm-muted);
	font-size: .95rem;
	line-height: 1.55;
}
.hrm-card__foot {
	margin: 22px 0 0;
	padding-top: 18px;
	border-top: 1px solid var(--hrm-line);
	text-align: center;
	font-size: .9rem;
	line-height: 1.5;
	color: var(--hrm-muted);
}
.hrm-card__foot a { color: var(--hrm-accent); }

/* -------------------------------------------------------------- Campi */

.hrm-grid { display: grid; gap: 16px; }
@media (min-width: 560px) { .hrm-grid--2 { grid-template-columns: 1fr 1fr; } }

.hrm-field { margin: 0 0 16px; }
.hrm-grid .hrm-field { margin: 0; }
.hrm-field > label {
	display: block;
	margin-bottom: 7px;
	font-size: .88rem;
	font-weight: 600;
	color: var(--hrm-ink);
}
.hrm-field input[type=text],
.hrm-field input[type=email],
.hrm-field input[type=password] {
	width: 100%;
	padding: 12px 14px;
	font: inherit;
	line-height: 1.3;
	color: inherit;
	background: var(--hrm-surface);
	border: 1px solid var(--hrm-line);
	border-radius: var(--hrm-radius);
	transition: border-color .15s ease;
}
.hrm-field input:focus {
	border-color: var(--hrm-accent);
	outline: 2px solid var(--hrm-accent);
	outline-offset: 1px;
}
.hrm-req { color: #c0392b; }
.hrm-hint {
	display: block;
	margin-top: 7px;
	font-size: .82rem;
	line-height: 1.45;
	color: var(--hrm-muted);
}

/* Honeypot: invisibile all'utente, presente per i bot. */
.hrm-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px; height: 1px;
	overflow: hidden;
}

/* -------------------------------------------------------------- Consensi */

.hrm-consents {
	margin: 24px 0 0;
	padding: 18px 20px;
	background: var(--hrm-surface-2);
	border: 1px solid var(--hrm-line);
	border-radius: var(--hrm-radius);
}
.hrm-check {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 11px;
	align-items: start;
	margin: 0 0 14px;
	font-size: .87rem;
	line-height: 1.5;
	color: var(--hrm-ink);
	cursor: pointer;
}
.hrm-check:last-child { margin-bottom: 0; }
.hrm-check input[type=checkbox] {
	width: 18px; height: 18px;
	margin: .15em 0 0;
	accent-color: var(--hrm-accent);
	flex: 0 0 auto;
}
.hrm-check a { color: var(--hrm-accent); }

/* -------------------------------------------------------------- Pulsanti */

.hrm-actions { margin: 24px 0 0; text-align: center; }
/*
 * Woodmart stila i bottoni con :is(.btn,.button,button,[type=submit],[type=button]),
 * stessa specificità delle nostre classi e caricato dopo: una regola normale perderebbe.
 * Invece di forzare con !important gli passiamo le sue stesse variabili, così è il tema
 * a colorare il bottone, e ne ereditiamo altezza, padding, transizioni e stato hover.
 * Le dichiarazioni diritte sotto restano come fallback per temi che non espongono --btn-*.
 */
.hrm .hrm-btn {
	--btn-brd-width: 1px;
	--btn-brd-style: solid;
	--btn-brd-radius: var(--hrm-radius);

	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 14px 26px;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	border: 1px solid transparent;
	border-radius: var(--hrm-radius);
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
@media (min-width: 560px) { .hrm .hrm-btn { width: auto; } }

.hrm .hrm-btn--primary {
	--btn-bgcolor: var(--hrm-accent);
	--btn-color: var(--hrm-accent-ink);
	--btn-brd-color: var(--hrm-accent);
	background-color: var(--hrm-accent);
	color: var(--hrm-accent-ink);
	border-color: var(--hrm-accent);
}
.hrm .hrm-btn--primary:hover, .hrm .hrm-btn--primary:focus { filter: brightness(1.08); }

.hrm .hrm-btn--ghost {
	--btn-bgcolor: transparent;
	--btn-color: var(--hrm-ink);
	--btn-brd-color: var(--hrm-line);
	--btn-color-hover: var(--hrm-accent);
	--btn-brd-color-hover: var(--hrm-accent);
	background-color: transparent;
	color: var(--hrm-ink);
	border-color: var(--hrm-line);
}
.hrm .hrm-btn--ghost:hover { border-color: var(--hrm-accent); color: var(--hrm-accent); }

.hrm .hrm-btn--danger {
	--btn-bgcolor: transparent;
	--btn-color: var(--hrm-err-ink);
	--btn-brd-color: var(--hrm-err-line);
	--btn-bgcolor-hover: var(--hrm-err-bg);
	--btn-color-hover: var(--hrm-err-ink);
	background-color: transparent;
	color: var(--hrm-err-ink);
	border-color: var(--hrm-err-line);
}
.hrm .hrm-btn--danger:hover { background-color: var(--hrm-err-bg); color: var(--hrm-err-ink); }

.hrm .hrm-btn:focus-visible { outline: 2px solid var(--hrm-accent); outline-offset: 2px; }

/* -------------------------------------------------------------- Messaggi */

.hrm-notice {
	margin: 0 0 22px;
	padding: 13px 16px;
	font-size: .92rem;
	line-height: 1.5;
	border: 1px solid;
	border-radius: var(--hrm-radius);
}
.hrm-notice--success { background: var(--hrm-ok-bg);   border-color: var(--hrm-ok-line);   color: var(--hrm-ok-ink); }
.hrm-notice--error   { background: var(--hrm-err-bg);  border-color: var(--hrm-err-line);  color: var(--hrm-err-ink); }
.hrm-notice--info    { background: var(--hrm-info-bg); border-color: var(--hrm-info-line); color: var(--hrm-info-ink); }

/* -------------------------------------------------------------- Account */

.hrm-state {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 13px;
	font-size: .82rem;
	font-weight: 600;
	border-radius: 999px;
}
.hrm-state::before {
	content: "";
	width: 8px; height: 8px;
	border-radius: 50%;
	background: currentColor;
}
.hrm-state--active  { background: var(--hrm-ok-bg);   color: var(--hrm-ok-ink); }
.hrm-state--pending { background: #fdf6e7;            color: #8a5a06; }
.hrm-state--revoked,
.hrm-state--none    { background: var(--hrm-surface-2); color: var(--hrm-muted); }

.hrm-account__headline {
	margin: 16px auto 10px;
	max-width: 46ch;
	font-size: 1.08rem;
	line-height: 1.5;
	text-align: center;
}
.hrm-account__meta {
	margin: 0 0 20px;
	font-size: .9rem;
	line-height: 1.55;
	text-align: center;
	color: var(--hrm-muted);
}
.hrm-account__manage {
	margin: 24px 0 0;
	padding-top: 22px;
	border-top: 1px solid var(--hrm-line);
	text-align: center;
}
.hrm-account__manage p {
	margin: 0 auto 16px;
	max-width: 46ch;
	font-size: .9rem;
	line-height: 1.55;
	color: var(--hrm-muted);
}
.hrm-account form { text-align: center; }

/* -------------------------------------------------------------- Disiscrizione */

.hrm-head { margin: 0 0 28px; text-align: center; }
.hrm-head h2 { margin: 0 0 10px; font-size: clamp(1.3rem, 1rem + 1.2vw, 1.7rem); line-height: 1.2; }
.hrm-head p { margin: 0 auto; max-width: 58ch; color: var(--hrm-muted); line-height: 1.6; }

.hrm-choices { display: grid; gap: 18px; }
@media (min-width: 720px) { .hrm-choices { grid-template-columns: repeat(2, 1fr); } }
.hrm-choice {
	display: flex;
	flex-direction: column;
	padding: 26px;
	background: var(--hrm-surface);
	border: 1px solid var(--hrm-line);
	border-radius: var(--hrm-radius);
}
.hrm-choice--keep { border-width: 2px; border-color: var(--hrm-accent); padding: 25px; }
.hrm-choice h3 { margin: 0 0 10px; font-size: 1.05rem; line-height: 1.3; }
.hrm-choice > p { margin: 0 0 18px; font-size: .92rem; line-height: 1.6; color: var(--hrm-muted); }
.hrm-choice form, .hrm-choice .hrm-choice__current { margin-top: auto; }
.hrm-choice .hrm-consents { margin: 0 0 16px; padding: 14px 16px; }
.hrm .hrm-choice .hrm-btn { width: 100%; }
.hrm-choice__current { font-size: .9rem; font-weight: 600; color: var(--hrm-muted); }

.hrm-foot-note {
	margin: 26px auto 0;
	max-width: 62ch;
	text-align: center;
	font-size: .85rem;
	line-height: 1.6;
	color: var(--hrm-muted);
}

/* -------------------------------------------------------------- Scheda prodotto */

.hrm-price-label {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 9px;
	font-size: .6em;
	font-weight: 700;
	line-height: 1.6;
	white-space: nowrap;
	vertical-align: middle;
	color: var(--hrm-accent-ink);
	background: var(--hrm-accent);
	border-radius: 999px;
}

.hrm-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 20px;
	margin: 20px 0;
	padding: 16px 20px;
	background: var(--hrm-surface-2);
	border: 1px solid var(--hrm-line);
	border-left: 3px solid var(--hrm-accent);
	border-radius: var(--hrm-radius);
}
.hrm-cta__body { flex: 1 1 220px; min-width: 0; }
.hrm-cta__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 9px; margin: 0 0 5px; }
@media (max-width: 479px) { .hrm-cta__price-label { flex: 1 0 100%; } }
.hrm-cta__price-label { font-size: .8rem; color: var(--hrm-muted); }
.hrm-cta__price-value { font-size: 1.3rem; font-weight: 700; color: var(--hrm-ink); }
.hrm-cta__text { margin: 0; font-size: .92rem; line-height: 1.5; }
.hrm .hrm-cta__body + .hrm-btn, .hrm-cta .hrm-btn { width: auto; padding: 11px 22px; font-size: .92rem; flex: 0 0 auto; }

/* -------------------------------------------------------------- Stato inline */

.hrm-status { margin: 16px 0 0; font-size: .95rem; line-height: 1.55; }
.hrm-status a { color: var(--hrm-accent); }

@media (prefers-reduced-motion: reduce) {
	.hrm *, .hrm *::before, .hrm *::after { transition: none !important; }
}
