/* MRTM Soci — area riservata. Usa i colori del tema MRTM Racing se presente. */

.mrtm-area {
	--m-fg: var(--fg, #1F2226);
	--m-soft: var(--fg-soft, #4A5058);
	--m-line: var(--line, #D5D8DB);
	--m-surface: var(--surface, #FFFFFF);
	--m-accent: var(--kerb, #D21F2C);
	--m-accent-dark: var(--kerb-dark, #A8141F);
	--m-display: var(--display, "Arial Narrow", sans-serif);
	--m-ok: #1F7A4D;
	max-width: 760px;
	color: var(--m-fg);
}

.mrtm-area h2 { font-family: var(--m-display); font-weight: 800; font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); line-height: 1; margin: 0 0 .5em; }
.mrtm-area h3 { margin: 0; font-family: inherit; font-weight: 600; font-size: 1.15rem; line-height: 1.3; }

/* Pulsanti */
.mrtm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: .7em 1.3em;
	border: 0;
	border-radius: 3px;
	background: var(--m-accent);
	color: #fff !important;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
}
.mrtm-btn:hover { background: var(--m-accent-dark); }
.mrtm-btn--big { min-height: 56px; padding: .9em 2em; font-size: 1.1rem; }
.mrtm-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Accesso */
.mrtm-login { padding: clamp(20px, 4vw, 40px); background: var(--m-surface); border-top: 5px solid var(--m-accent); }
.mrtm-login form p { margin: 0 0 16px; }
.mrtm-login label { display: block; margin-bottom: 6px; font-weight: 600; }
.mrtm-login input[type="text"],
.mrtm-login input[type="password"] {
	width: 100%;
	max-width: 420px;
	min-height: 48px;
	padding: 10px 14px;
	border: 2px solid var(--m-line);
	border-radius: 3px;
	background: var(--m-surface);
	color: var(--m-fg);
	font: inherit;
}
.mrtm-login input:focus { border-color: var(--m-fg); outline: 3px solid #9CC9D8; }
.mrtm-login .login-remember label { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.mrtm-login .login-submit input { min-height: 48px; padding: 0 28px; border: 0; border-radius: 3px; background: var(--m-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.mrtm-login__help { margin: 8px 0 0; color: var(--m-soft); }

/* Utente collegato */
.mrtm-who {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 8px 24px;
	margin-bottom: 32px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--m-line);
}
.mrtm-who p { margin: 0; }
.mrtm-who__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* Messaggi */
.mrtm-flash, .mrtm-notice, .mrtm-voted {
	margin: 0 0 28px;
	padding: 16px 20px;
	border-left: 5px solid var(--m-fg);
	background: var(--m-surface);
}
.mrtm-flash p, .mrtm-notice p, .mrtm-voted p { margin: 0; }
.mrtm-flash p + p, .mrtm-notice p + p, .mrtm-voted p + p { margin-top: 6px; }
.mrtm-flash--ok, .mrtm-voted { border-color: var(--m-ok); }
.mrtm-flash--error { border-color: var(--m-accent); }

/* Elenco votazioni */
.mrtm-section + .mrtm-section { margin-top: 48px; }
.mrtm-votes { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--m-fg); }
.mrtm-vote {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 0;
	border-bottom: 1px solid var(--m-line);
}
.mrtm-vote h3 a { color: inherit; text-decoration: none; }
.mrtm-vote h3 a:hover { text-decoration: underline; }
.mrtm-vote p { margin: 4px 0 0; color: var(--m-soft); font-size: .92rem; }
.mrtm-empty { color: var(--m-soft); }

.mrtm-pill { flex-shrink: 0; padding: 4px 12px; border-radius: 99px; font-size: .85rem; font-weight: 600; border: 1px solid var(--m-line); }
.mrtm-pill--done, .mrtm-pill--approved { border-color: var(--m-ok); color: var(--m-ok); }
.mrtm-pill--rejected, .mrtm-pill--no_quorum { border-color: var(--m-accent); color: var(--m-accent); }

/* Scheda */
.mrtm-back { margin: 0 0 20px; }
.mrtm-question { font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem) !important; }
.mrtm-meta { color: var(--m-soft); margin: 0 0 20px; }
.mrtm-desc { margin-bottom: 28px; padding: 18px 20px; background: var(--m-surface); }
.mrtm-desc p:last-child { margin-bottom: 0; }

.mrtm-ballot fieldset { margin: 0 0 20px; padding: 0; border: 0; }
.mrtm-ballot legend { margin-bottom: 12px; font-weight: 600; }
.mrtm-choice {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 10px;
	padding: 16px 18px;
	border: 2px solid var(--m-line);
	border-radius: 3px;
	background: var(--m-surface);
	font-size: 1.1rem;
	cursor: pointer;
	transition: border-color .12s;
}
.mrtm-choice:hover { border-color: var(--m-soft); }
.mrtm-choice input { width: 22px; height: 22px; margin: 0; accent-color: var(--m-accent); flex-shrink: 0; }
.mrtm-choice:has(input:checked) { border-color: var(--m-fg); box-shadow: inset 5px 0 0 var(--m-accent); }
.mrtm-choice:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.mrtm-choice--abstain, .mrtm-choice--blank { font-size: 1rem; color: var(--m-soft); }

.mrtm-confirm { display: flex; gap: 12px; align-items: flex-start; margin: 24px 0 12px; font-size: .98rem; cursor: pointer; }
.mrtm-confirm input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--m-accent); flex-shrink: 0; }
.mrtm-secret { margin: 0 0 20px; color: var(--m-soft); font-size: .92rem; }

/* Risultati */
.mrtm-results { margin-top: 32px; padding-top: 20px; border-top: 2px solid var(--m-fg); }
.mrtm-outcome { display: inline-block; margin: 8px 0 20px; padding: 6px 14px; font-family: var(--m-display); font-weight: 800; font-size: 1.6rem; color: #fff; background: var(--m-fg); }
.mrtm-outcome--approved { background: var(--m-ok); }
.mrtm-outcome--rejected, .mrtm-outcome--no_quorum { background: var(--m-accent); }
.mrtm-bars { margin: 0 0 16px; }
.mrtm-bars > div { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 12px; align-items: center; padding: 8px 0; }
.mrtm-bars dt { font-weight: 600; }
.mrtm-bars dd { display: flex; align-items: center; gap: 10px; margin: 0; }
.mrtm-bars__bar { display: block; height: 14px; width: var(--w); min-width: 2px; background: var(--m-fg); }
.mrtm-bars__n { font-variant-numeric: tabular-nums; font-weight: 600; }

@media (max-width: 560px) {
	.mrtm-vote { flex-direction: column; align-items: flex-start; }
	.mrtm-bars > div { grid-template-columns: 1fr; gap: 4px; }
}
