/* ==========================================================================
   Whistleblowing Form — Magellano Core
   ========================================================================== */

.wb-form {
	max-width: 720px;
	margin: 0 auto;
	font-family: inherit;
	color: #333;
	line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Barra di avanzamento
   -------------------------------------------------------------------------- */

.wb-progress {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 32px;
}

.wb-progress__track {
	flex: 1;
	height: 6px;
	background: #e0e0e0;
	border-radius: 3px;
	overflow: hidden;
}

.wb-progress__bar {
	height: 100%;
	background: #1a1a2e;
	border-radius: 3px;
	width: 0%;
	transition: width 0.4s ease;
}

.wb-progress__text {
	font-size: 13px;
	color: #777;
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Step
   -------------------------------------------------------------------------- */

.wb-step {
	display: none;
}

.wb-step--active {
	display: block;
}

.wb-step__title {
	font-size: 22px;
	font-weight: 700;
	color: #1a1a2e;
	margin: 0 0 8px;
}

.wb-step__desc {
	color: #666;
	margin: 0 0 24px;
	font-size: 15px;
}

/* --------------------------------------------------------------------------
   Info box
   -------------------------------------------------------------------------- */

.wb-info-box {
	background: #f5f7fa;
	border-left: 4px solid #1a1a2e;
	border-radius: 0 6px 6px 0;
	padding: 16px 20px;
	margin-bottom: 24px;
	font-size: 14px;
}

.wb-info-box p {
	margin: 0 0 10px;
}

.wb-info-box p:last-child {
	margin-bottom: 0;
}

.wb-info-box a {
	color: #1a1a2e;
	font-weight: 600;
}

.wb-info-box--blue {
	background: #f0f7ff;
	border-left-color: #3498db;
}

/* --------------------------------------------------------------------------
   Tipo di segnalazione — radio card
   -------------------------------------------------------------------------- */

.wb-type-options {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 8px;
}

@media (max-width: 560px) {
	.wb-type-options {
		grid-template-columns: 1fr;
	}
}

.wb-radio-card {
	display: block;
	cursor: pointer;
}

.wb-radio-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.wb-radio-card__content {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 20px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	transition: border-color 0.2s, background 0.2s;
	background: #fff;
}

.wb-radio-card input[type="radio"]:checked + .wb-radio-card__content {
	border-color: #1a1a2e;
	background: #f5f7fa;
}

.wb-radio-card:hover .wb-radio-card__content {
	border-color: #999;
}

.wb-radio-card input[type="radio"]:focus-visible + .wb-radio-card__content {
	outline: 2px solid #1a1a2e;
	outline-offset: 2px;
}

.wb-radio-card__icon {
	font-size: 28px;
	line-height: 1;
	flex-shrink: 0;
}

.wb-radio-card__title {
	display: block;
	font-size: 16px;
	margin-bottom: 6px;
	color: #1a1a2e;
}

.wb-radio-card__desc {
	margin: 0;
	font-size: 13px;
	color: #666;
	line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Categoria — radio list
   -------------------------------------------------------------------------- */

.wb-category-options {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.wb-radio-label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

.wb-radio-label:hover {
	background: #f5f7fa;
	border-color: #bbb;
}

.wb-radio-label input[type="radio"] {
	accent-color: #1a1a2e;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.wb-radio-label:has(input:checked) {
	background: #f5f7fa;
	border-color: #1a1a2e;
}

.wb-radio-text {
	font-size: 15px;
	color: #333;
}

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

.wb-field {
	margin-bottom: 20px;
}

.wb-field--other {
	margin-top: 10px;
	padding-left: 28px;
}

.wb-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #333;
	margin-bottom: 6px;
}

.wb-required {
	color: #c0392b;
	margin-left: 2px;
}

.wb-optional {
	font-weight: 400;
	color: #888;
	font-size: 13px;
}

.wb-input,
.wb-textarea {
	display: block;
	width: 100%;
	padding: 10px 12px;
	font-size: 15px;
	font-family: inherit;
	color: #333;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 6px;
	box-sizing: border-box;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.wb-input:focus,
.wb-textarea:focus {
	outline: none;
	border-color: #1a1a2e;
	box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.1);
}

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

.wb-char-count {
	display: block;
	font-size: 12px;
	color: #888;
	margin-top: 4px;
}

.wb-char-count.wb-char-count--ok {
	color: #27ae60;
}

/* --------------------------------------------------------------------------
   Upload file
   -------------------------------------------------------------------------- */

.wb-upload-area {
	border: 2px dashed #ccc;
	border-radius: 8px;
	padding: 30px 20px;
	text-align: center;
	transition: border-color 0.2s, background 0.2s;
	cursor: pointer;
	position: relative;
}

.wb-upload-area:hover,
.wb-upload-area.wb-drag-over {
	border-color: #1a1a2e;
	background: #f5f7fa;
}

.wb-file-input {
	position: absolute;
	inset: 0;
	opacity: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
}

.wb-upload-label {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	pointer-events: none;
}

.wb-upload-icon {
	font-size: 36px;
}

.wb-upload-text {
	font-size: 15px;
	color: #555;
	line-height: 1.5;
}

.wb-upload-text small {
	font-size: 12px;
	color: #888;
}

.wb-file-list {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	text-align: left;
}

.wb-file-list li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	background: #f5f7fa;
	border-radius: 4px;
	font-size: 13px;
	margin-top: 6px;
	color: #333;
}

.wb-file-list__remove {
	margin-left: auto;
	background: none;
	border: none;
	color: #c0392b;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	padding: 0 4px;
}

/* --------------------------------------------------------------------------
   Dati segnalante
   -------------------------------------------------------------------------- */

.wb-reporter-fields {
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid #e0e0e0;
}

/* --------------------------------------------------------------------------
   Riepilogo
   -------------------------------------------------------------------------- */

.wb-review-section {
	margin-bottom: 24px;
}

.wb-review-title {
	font-size: 16px;
	font-weight: 700;
	color: #1a1a2e;
	margin: 0 0 12px;
}

.wb-review dl {
	margin: 0;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
}

.wb-review dt {
	padding: 10px 12px;
	background: #f5f7fa;
	font-weight: 600;
	font-size: 13px;
	border-bottom: 1px solid #e0e0e0;
	border-right: 1px solid #e0e0e0;
}

.wb-review dd {
	padding: 10px 12px;
	margin: 0;
	font-size: 13px;
	background: #fff;
	border-bottom: 1px solid #e0e0e0;
	word-break: break-word;
}

.wb-review dt:last-of-type,
.wb-review dd:last-of-type {
	border-bottom: none;
}

/* --------------------------------------------------------------------------
   Checkbox
   -------------------------------------------------------------------------- */

.wb-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
	margin-bottom: 16px;
}

.wb-checkbox-label input[type="checkbox"] {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	margin-top: 2px;
	accent-color: #1a1a2e;
	cursor: pointer;
}

.wb-checkbox-text {
	font-size: 14px;
	color: #444;
	line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Errori
   -------------------------------------------------------------------------- */

.wb-error {
	display: block;
	color: #c0392b;
	font-size: 13px;
	margin-top: 4px;
}

.wb-step-error {
	background: #fdf3f2;
	border: 1px solid #e74c3c;
	border-radius: 6px;
	padding: 12px 16px;
	margin-bottom: 20px;
	font-size: 14px;
}

.wb-field--error .wb-input,
.wb-field--error .wb-textarea {
	border-color: #c0392b;
}

.wb-field--error .wb-checkbox-label input {
	outline: 2px solid #c0392b;
}

/* --------------------------------------------------------------------------
   Navigazione
   -------------------------------------------------------------------------- */

.wb-navigation {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid #e0e0e0;
}

.wb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	font-size: 15px;
	font-family: inherit;
	font-weight: 600;
	border-radius: 6px;
	border: 2px solid transparent;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s, opacity 0.2s;
	text-decoration: none;
}

.wb-btn--primary {
	background: #1a1a2e;
	color: #fff;
	border-color: #1a1a2e;
}

.wb-btn--primary:hover:not(:disabled) {
	background: #2d2d4e;
	border-color: #2d2d4e;
}

.wb-btn--secondary {
	background: transparent;
	color: #1a1a2e;
	border-color: #1a1a2e;
}

.wb-btn--secondary:hover:not(:disabled) {
	background: #f5f7fa;
}

.wb-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.wb-btn--next {
	margin-left: auto;
}

.wb-btn--submit {
	margin-left: auto;
}

/* --------------------------------------------------------------------------
   Schermata di successo
   -------------------------------------------------------------------------- */

.wb-success {
	text-align: center;
	padding: 40px 20px;
}

.wb-success__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	background: #27ae60;
	color: #fff;
	font-size: 36px;
	border-radius: 50%;
	margin-bottom: 24px;
}

.wb-success__title {
	font-size: 24px;
	font-weight: 700;
	color: #1a1a2e;
	margin: 0 0 12px;
}

.wb-success__protocol {
	display: inline-block;
	background: #f5f7fa;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 12px 24px;
	margin: 16px 0;
	font-size: 14px;
}

.wb-success__protocol strong {
	display: block;
	font-size: 20px;
	color: #1a1a2e;
	margin-top: 4px;
	font-family: monospace;
	letter-spacing: 1px;
}

.wb-receipt-note,
.wb-anonymous-note {
	font-size: 14px;
	color: #555;
	max-width: 440px;
	margin: 12px auto 0;
}

/* --------------------------------------------------------------------------
   Schermata errore invio
   -------------------------------------------------------------------------- */

.wb-send-error {
	text-align: center;
	padding: 40px 20px;
}

.wb-send-error__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	background: #e67e22;
	color: #fff;
	font-size: 42px;
	font-weight: 700;
	line-height: 1;
	border-radius: 50%;
	margin-bottom: 24px;
}

.wb-send-error__title {
	font-size: 24px;
	font-weight: 700;
	color: #1a1a2e;
	margin: 0 0 12px;
}

.wb-send-error p {
	font-size: 15px;
	color: #555;
	max-width: 440px;
	margin: 0 auto 28px;
	line-height: 1.6;
}

.wb-send-error__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
}
