/* Recesso Digitale — frontend */

/* Trigger di apertura: volutamente leggero e personalizzabile via tema.
   - .rd-recesso          contenitore (div)
   - .rd-recesso--center  variante centrata (footer auto-iniettato)
   - .rd-recesso__link    il link cliccabile (<a>) */
.rd-recesso { margin: 8px 0; }
.rd-recesso--center { text-align: center; }
.rd-recesso__link {
	cursor: pointer;
	text-decoration: underline;
	color: inherit;
}
.rd-recesso__link:hover { text-decoration: none; }

/* Variante auto-iniettata nel footer: testo più piccolo e grigio tenue. */
.rd-recesso--center { font-size: 13px; }
.rd-recesso--center .rd-recesso__link { color: #666; }

/* Honeypot: nascosto agli utenti, accessibile ai bot. */
.rd-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Modale */
.rd-modal[hidden] { display: none; }
.rd-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 5vh 16px;
	overflow-y: auto;
}
.rd-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
}
.rd-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 520px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	padding: 28px;
}
.rd-modal__close {
	position: absolute;
	top: 10px;
	right: 14px;
	font-size: 26px;
	line-height: 1;
	color: #64748b;
	background: none;
	border: none;
	cursor: pointer;
}
body.rd-modal-open { overflow: hidden; }

/* Form */
.rd-form__title {
	margin: 0 0 12px;
	font-size: 20px;
	color: #0f172a;
}
.rd-form__intro {
	margin: 0 0 18px;
	font-size: 14px;
	color: #475569;
	line-height: 1.5;
}
.rd-field { margin-bottom: 16px; }
.rd-field label {
	display: block;
	margin-bottom: 5px;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
}
.rd-field input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	font-size: 14px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
}
.rd-field input:focus {
	outline: none;
	border-color: #1d4ed8;
	box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}
.rd-field--error input { border-color: #dc2626; }
.rd-req { color: #dc2626; }
.rd-hint {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #64748b;
}
.rd-error {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #dc2626;
}

.rd-declaration {
	padding: 16px;
	margin-bottom: 16px;
	font-size: 14px;
	line-height: 1.6;
	color: #1e293b;
	background: #f1f5f9;
	border-left: 4px solid #1d4ed8;
	border-radius: 4px;
	white-space: pre-wrap;
}

.rd-form__feedback { font-size: 13px; margin-bottom: 10px; }
.rd-form__feedback--error { color: #dc2626; }
.rd-form__feedback--success { color: #16a34a; }

.rd-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}
.rd-btn {
	padding: 11px 20px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 6px;
	border: 1px solid transparent;
	cursor: pointer;
}
.rd-btn--primary { color: #fff; background: #1d4ed8; }
.rd-btn--primary:hover { background: #1742b0; }
.rd-btn--primary:disabled { opacity: 0.6; cursor: default; }
.rd-btn--ghost {
	color: #334155;
	background: #fff;
	border-color: #cbd5e1;
}

.rd-success {
	padding: 18px;
	font-size: 15px;
	line-height: 1.6;
	color: #14532d;
	background: #dcfce7;
	border-radius: 8px;
}

.rd-form--inline {
	max-width: 520px;
	padding: 24px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
}

/* Pagina pubblica di stato (stand-alone) */
body.rd-status-page {
	margin: 0;
	background: #f1f5f9;
	font-family: Arial, Helvetica, sans-serif;
	color: #1e293b;
}
.rd-status {
	max-width: 640px;
	margin: 6vh auto;
	padding: 32px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
}
.rd-status h1 { font-size: 20px; margin: 0 0 4px; }
.rd-status h2 { font-size: 22px; margin: 16px 0; }
.rd-status h3 { font-size: 15px; margin: 22px 0 8px; }
.rd-status__badge {
	display: inline-block;
	padding: 6px 14px;
	font-weight: 600;
	background: #dbeafe;
	color: #1e40af;
	border-radius: 20px;
}
.rd-status__meta { margin: 18px 0; }
.rd-status__meta dt { font-size: 12px; color: #64748b; margin-top: 10px; }
.rd-status__meta dd { margin: 2px 0 0; font-size: 15px; }
.rd-status__declaration {
	margin: 0;
	padding: 14px 16px;
	background: #f8fafc;
	border-left: 4px solid #1d4ed8;
	border-radius: 4px;
	line-height: 1.6;
}
.rd-status__messages { margin: 8px 0 0; padding: 0; list-style: none; }
.rd-status__messages li {
	padding: 12px 14px;
	margin-bottom: 8px;
	background: #f8fafc;
	border-radius: 6px;
}
.rd-status__msg-date { font-size: 12px; color: #64748b; }
.rd-status__msg-body { margin-top: 4px; line-height: 1.6; }
.rd-status__home { margin-top: 26px; font-size: 14px; }
