/*
 * Whistleblowing Manager — stile pubblico
 * Palette: registro istituzionale ma accogliente, non asettico.
 * Nessun font esterno: le pagine pubbliche non devono chiamare servizi
 * di terze parti (Google Fonts ecc.) che logghino l'IP del segnalante.
 */

.wb-wrap {
	--wb-ink: #1b2a4a;
	--wb-ink-soft: #3a4a6b;
	--wb-paper: #faf9f6;
	--wb-paper-raised: #ffffff;
	--wb-accent: #4b7b6f;
	--wb-accent-soft: #e4ece9;
	--wb-gold: #b08d57;
	--wb-text: #2a2a2e;
	--wb-text-muted: #6b6f76;
	--wb-line: #e3ded4;
	--wb-danger: #a8433a;
	--wb-danger-soft: #f6e9e7;
	--wb-radius: 10px;
	--wb-serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
	--wb-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto, Helvetica, Arial, sans-serif;

	max-width: 640px;
	margin: 0 auto;
	padding: 1rem;
	font-family: var(--wb-sans);
	color: var(--wb-text);
	line-height: 1.55;
}

.wb-wrap * { box-sizing: border-box; }

.wb-card {
	background: var(--wb-paper-raised);
	border: 1px solid var(--wb-line);
	border-radius: var(--wb-radius);
	padding: 2rem 1.75rem;
	margin-bottom: 1.5rem;
	box-shadow: 0 1px 2px rgba(27, 42, 74, 0.04);
}

.wb-eyebrow {
	font-family: var(--wb-sans);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--wb-accent);
	margin: 0 0 0.6rem;
}

.wb-h2 {
	font-family: var(--wb-serif);
	font-weight: 400;
	font-size: 1.7rem;
	color: var(--wb-ink);
	margin: 0 0 0.75rem;
	line-height: 1.25;
}

.wb-lead {
	color: var(--wb-text-muted);
	font-size: 0.98rem;
	margin: 0 0 1.5rem;
}

.wb-fineprint {
	font-size: 0.82rem;
	color: var(--wb-text-muted);
	margin-top: 1.25rem;
}

.wb-form { display: flex; flex-direction: column; gap: 1.25rem; }
.wb-form--inline { flex-direction: row; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap; }
.wb-form--inline .wb-field { flex: 1 1 220px; margin: 0; }

.wb-field { display: flex; flex-direction: column; gap: 0.4rem; }
.wb-field label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--wb-ink-soft);
}
.wb-field--honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.wb-field input[type="text"],
.wb-field select,
.wb-field textarea {
	font-family: var(--wb-sans);
	font-size: 0.98rem;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--wb-line);
	border-radius: 8px;
	background: var(--wb-paper);
	color: var(--wb-text);
	width: 100%;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wb-field input[type="text"]:focus,
.wb-field select:focus,
.wb-field textarea:focus {
	outline: none;
	border-color: var(--wb-accent);
	box-shadow: 0 0 0 3px var(--wb-accent-soft);
}

.wb-field textarea { resize: vertical; min-height: 120px; }

.wb-hint { font-size: 0.8rem; color: var(--wb-text-muted); margin: 0.2rem 0 0; }

.wb-consent-group {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	background: var(--wb-paper);
	border: 1px solid var(--wb-line);
	border-radius: 8px;
	padding: 1rem 1.1rem;
}
.wb-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	font-size: 0.85rem;
	color: var(--wb-text);
	cursor: pointer;
}
.wb-checkbox input[type="checkbox"] {
	margin-top: 0.2rem;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	accent-color: var(--wb-accent);
}
.wb-checkbox a { color: var(--wb-accent); }

.wb-post-actions {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	justify-content: center;
	margin-top: 1.25rem;
}

.wb-btn {
	font-family: var(--wb-sans);
	font-size: 0.95rem;
	font-weight: 600;
	padding: 0.75rem 1.4rem;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	transition: transform 0.1s ease, background 0.15s ease;
	white-space: nowrap;
}
.wb-btn:active { transform: translateY(1px); }

.wb-btn--primary { background: var(--wb-ink); color: #fff; }
.wb-btn--primary:hover { background: #14213a; }

.wb-btn--ghost {
	background: transparent;
	color: var(--wb-accent);
	border: 1px solid var(--wb-accent);
}
.wb-btn--ghost:hover { background: var(--wb-accent-soft); }

.wb-alert {
	background: var(--wb-danger-soft);
	color: var(--wb-danger);
	border: 1px solid rgba(168, 67, 58, 0.25);
	border-radius: 8px;
	padding: 0.85rem 1rem;
	font-size: 0.9rem;
	margin-bottom: 1.25rem;
}
.wb-alert--success {
	background: var(--wb-accent-soft);
	color: var(--wb-accent);
	border-color: rgba(75, 123, 111, 0.25);
}

/* --- Sigillo di conferma: elemento firma della V1 --- */
.wb-card--seal { text-align: center; }

.wb-seal {
	width: 84px;
	height: 84px;
	margin: 0 auto 1.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
}
.wb-seal__ring {
	width: 84px;
	height: 84px;
	border-radius: 50%;
	background: linear-gradient(155deg, var(--wb-gold), #8f713f);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 3px 10px rgba(176, 141, 87, 0.35);
}
.wb-seal__ring-inner {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: 2px solid rgba(255,255,255,0.55);
	display: flex;
	align-items: center;
	justify-content: center;
}
.wb-seal__ring-inner::after {
	content: '';
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(255,255,255,0.9);
}

.wb-code-display {
	font-family: 'Courier New', ui-monospace, monospace;
	font-size: 1.4rem;
	letter-spacing: 0.08em;
	font-weight: 700;
	color: var(--wb-ink);
	background: var(--wb-paper);
	border: 1px dashed var(--wb-gold);
	border-radius: 8px;
	padding: 1rem;
	margin-bottom: 1rem;
	word-break: break-all;
}

/* --- Thread di verifica stato --- */
.wb-thread__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
}

.wb-badge {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 0.3rem 0.7rem;
	border-radius: 999px;
}
.wb-badge--new { background: var(--wb-accent-soft); color: var(--wb-accent); }
.wb-badge--in_progress { background: #fbf1de; color: var(--wb-gold); }
.wb-badge--closed { background: #ececec; color: #6b6f76; }

.wb-thread__date { font-size: 0.82rem; color: var(--wb-text-muted); }

.wb-thread__messages { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1.5rem; }

.wb-message {
	border-radius: 8px;
	padding: 0.85rem 1rem;
	border: 1px solid var(--wb-line);
}
.wb-message p { margin: 0.3rem 0 0; white-space: pre-line; }
.wb-message__label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--wb-text-muted); }

.wb-message--reporter { background: var(--wb-paper); }
.wb-message--rpct { background: var(--wb-accent-soft); border-color: rgba(75,123,111,0.25); }

.wb-reply-form { border-top: 1px solid var(--wb-line); padding-top: 1.25rem; }

.wb-attachment-list {
	list-style: none;
	margin: 0.6rem 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}
.wb-attachment-list a {
	font-size: 0.85rem;
	color: var(--wb-ink);
	text-decoration: none;
	border: 1px solid var(--wb-line);
	border-radius: 6px;
	padding: 0.35rem 0.6rem;
	display: inline-block;
	background: var(--wb-paper);
}
.wb-attachment-list a:hover { border-color: var(--wb-accent); color: var(--wb-accent); }

@media (max-width: 480px) {
	.wb-card { padding: 1.5rem 1.15rem; }
	.wb-h2 { font-size: 1.4rem; }
	.wb-form--inline { flex-direction: column; align-items: stretch; }
	.wb-code-display { font-size: 1.1rem; }
}
