/* =============================================================
   Gestión de Denuncias RRHH — Frontend
   Estilos scopeados bajo .rrhh- para no interferir con OnePress.
   ============================================================= */

.rrhh {
	box-sizing: border-box;
}

.rrhh *,
.rrhh *::before,
.rrhh *::after {
	box-sizing: inherit;
}

.rrhh .rrhh-honeypot {
	position: absolute !important;
	left: -9999px !important;
	opacity: 0;
	height: 0;
	width: 0;
	overflow: hidden;
}

/* ---------- Progreso del wizard ---------- */

.rrhh .rrhh-wizard-steps {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1.75rem;
	padding: 0;
}

.rrhh .rrhh-wizard-steps li {
	position: relative;
	flex: 1 1 auto;
	min-width: 9rem;
	text-align: center;
	font-size: 0.85rem;
	font-weight: 600;
	color: #6b7280;
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	padding: 0.55rem 0.9rem;
	transition: all 0.2s ease;
}

.rrhh .rrhh-wizard-steps li.is-active {
	color: #ffffff;
	background: #1d4ed8;
	border-color: #1d4ed8;
}

.rrhh .rrhh-wizard-steps li.is-done {
	color: #166534;
	background: #dcfce7;
	border-color: #bbf7d0;
}

/* ---------- Pasos ---------- */

.rrhh .rrhh-step {
	display: none;
}

.rrhh .rrhh-step.is-active {
	display: block;
}

.rrhh .rrhh-fieldset {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 1rem 1.25rem 1.1rem;
	margin: 0 0 1.5rem;
}

.rrhh .rrhh-legend {
	font-weight: 700;
	font-size: 0.95rem;
	color: #111827;
	padding: 0 0.5rem;
}

.rrhh .rrhh-choice {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	padding: 0.45rem 0;
	cursor: pointer;
	font-size: 0.95rem;
	color: #374151;
}

.rrhh .rrhh-choice input {
	margin-top: 0.25rem;
}

/* ---------- Grid y campos ---------- */

.rrhh .rrhh-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem 1.25rem;
	margin-bottom: 1rem;
}

@media (max-width: 640px) {
	.rrhh .rrhh-grid {
		grid-template-columns: 1fr;
	}
}

.rrhh .rrhh-field--full {
	grid-column: 1 / -1;
}

.rrhh .rrhh-field label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	color: #111827;
	margin-bottom: 0.35rem;
}

.rrhh .rrhh-opt {
	font-weight: 400;
	font-size: 0.78rem;
	color: #6b7280;
	text-transform: lowercase;
}

.rrhh .rrhh-field input[type="text"],
.rrhh .rrhh-field input[type="tel"],
.rrhh .rrhh-field input[type="email"],
.rrhh .rrhh-field input[type="file"],
.rrhh .rrhh-field select,
.rrhh .rrhh-field textarea {
	width: 100%;
	max-width: 100%;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	padding: 0.6rem 0.75rem;
	font-size: 0.95rem;
	font-family: inherit;
	color: #111827;
	background: #ffffff;
	line-height: 1.5;
}

.rrhh .rrhh-field input:focus,
.rrhh .rrhh-field select:focus,
.rrhh .rrhh-field textarea:focus {
	outline: none;
	border-color: #1d4ed8;
	box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.rrhh .rrhh-field input.is-invalid,
.rrhh .rrhh-field textarea.is-invalid,
.rrhh .rrhh-field select.is-invalid {
	border-color: #dc2626;
}

.rrhh .rrhh-field-hint {
	display: block;
	font-size: 0.8rem;
	color: #6b7280;
	margin-top: 0.3rem;
}

.rrhh .rrhh-error {
	display: block;
	font-size: 0.82rem;
	font-weight: 600;
	color: #b91c1c;
	margin-top: 0.35rem;
}

.rrhh .rrhh-hint {
	font-weight: 700;
	font-size: 0.9rem;
	color: #111827;
	margin: 0 0 0.6rem;
}

.rrhh .rrhh-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	margin: 0.75rem 0 1.25rem;
	font-size: 0.95rem;
	color: #374151;
	cursor: pointer;
}

.rrhh .rrhh-checkbox input {
	margin-top: 0.25rem;
}

/* ---------- Evidencia ---------- */

.rrhh .rrhh-evidencia-msg {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	margin-top: 0.4rem;
	color: #6b7280;
}

.rrhh .rrhh-evidencia-msg--info {
	color: #1d4ed8;
}

.rrhh .rrhh-evidencia-msg--ok {
	color: #166534;
}

.rrhh .rrhh-evidencia-preview {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-top: 0.6rem;
}

.rrhh .rrhh-evidencia-preview img {
	max-height: 120px;
	max-width: 160px;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	object-fit: contain;
}

.rrhh .rrhh-file-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: #b91c1c;
	background: #fee2e2;
	border: 1px solid #fecaca;
	border-radius: 6px;
	padding: 0.4rem 0.7rem;
}

/* ---------- Rúbrica ---------- */

.rrhh .rrhh-signature {
	margin-top: 1.5rem;
}

.rrhh .rrhh-signature-box {
	position: relative;
	border: 2px dashed #cbd5e1;
	border-radius: 8px;
	background: #ffffff;
	margin-bottom: 0.85rem;
}

.rrhh .rrhh-signature-box canvas {
	display: block;
	width: 100%;
	height: auto;
	touch-action: none;
	cursor: crosshair;
}

.rrhh .rrhh-signature-msg {
	margin: 0;
	padding: 0.45rem 0.75rem;
	font-size: 0.78rem;
	color: #6b7280;
	background: #f9fafb;
	border-top: 1px solid #e5e7eb;
	border-radius: 0 0 8px 8px;
}

/* ---------- Botones ---------- */

.rrhh .rrhh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	font-size: 0.95rem;
	font-weight: 600;
	border-radius: 6px;
	border: 1px solid transparent;
	padding: 0.65rem 1.4rem;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.rrhh .rrhh-btn--primary {
	background: #1d4ed8;
	color: #ffffff;
	border-color: #1d4ed8;
}

.rrhh .rrhh-btn--primary:hover {
	background: #1e40af;
	border-color: #1e40af;
}

.rrhh .rrhh-btn--primary:disabled {
	background: #93c5fd;
	border-color: #93c5fd;
	cursor: not-allowed;
}

.rrhh .rrhh-btn--ghost {
	background: #ffffff;
	color: #374151;
	border-color: #d1d5db;
}

.rrhh .rrhh-btn--ghost:hover:not(:disabled) {
	background: #f3f4f6;
}

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

.rrhh .rrhh-wizard-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 1.75rem;
}

/* ---------- Estado y éxito ---------- */

.rrhh .rrhh-status {
	margin-top: 1rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: #374151;
}

.rrhh .rrhh-status--error {
	color: #b91c1c;
}

.rrhh .rrhh-status--info {
	color: #1d4ed8;
}

.rrhh .rrhh-success {
	border: 1px solid #bbf7d0;
	background: #f0fdf4;
	border-radius: 8px;
	padding: 1.5rem;
	margin-top: 1rem;
}

.rrhh .rrhh-success h3 {
	margin: 0 0 0.75rem;
	color: #166534;
}

.rrhh .rrhh-code {
	display: inline-block;
	font-size: 1.15rem;
	letter-spacing: 1px;
	color: #166534;
	background: #ffffff;
	border: 1px solid #bbf7d0;
	border-radius: 6px;
	padding: 0.35rem 0.8rem;
	margin: 0.25rem 0;
}

/* ---------- Consulta de estado ---------- */

.rrhh .rrhh-consult {
	max-width: 640px;
}

.rrhh .rrhh-consult-form label {
	display: block;
	font-weight: 600;
	font-size: 0.95rem;
	color: #111827;
	margin-bottom: 0.5rem;
}

.rrhh .rrhh-consult-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: stretch;
}

.rrhh .rrhh-consult-input {
	flex: 1 1 240px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	padding: 0.65rem 0.85rem;
	font-size: 1rem;
	font-family: inherit;
	color: #111827;
	background: #ffffff;
	letter-spacing: 1px;
}

.rrhh .rrhh-consult-input:focus {
	outline: none;
	border-color: #1d4ed8;
	box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.rrhh .rrhh-consult-status {
	margin-top: 1rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: #374151;
}

.rrhh .rrhh-consult-status--info {
	color: #1d4ed8;
}

.rrhh .rrhh-consult-status--error {
	color: #b91c1c;
}

.rrhh .rrhh-consult-card {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #ffffff;
	margin-top: 1.25rem;
	overflow: hidden;
}

.rrhh .rrhh-consult-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	background: #f9fafb;
	border-bottom: 1px solid #e5e7eb;
	padding: 1rem 1.25rem;
}

.rrhh .rrhh-consult-codigo {
	font-size: 1.1rem;
	font-weight: 700;
	letter-spacing: 1px;
	color: #111827;
}

.rrhh .rrhh-badge {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	border-radius: 999px;
	padding: 0.35rem 0.9rem;
}

.rrhh .rrhh-badge--solicitado {
	color: #92400e;
	background: #fef3c7;
	border: 1px solid #fcd34d;
}

.rrhh .rrhh-badge--en-revision {
	color: #1e40af;
	background: #dbeafe;
	border: 1px solid #93c5fd;
}

.rrhh .rrhh-badge--finalizado {
	color: #166534;
	background: #dcfce7;
	border: 1px solid #86efac;
}

.rrhh .rrhh-badge--no-aplica {
	color: #374151;
	background: #f3f4f6;
	border: 1px solid #d1d5db;
}

.rrhh .rrhh-consult-list {
	margin: 0;
	padding: 0.5rem 1.25rem 1rem;
}

.rrhh .rrhh-consult-list div {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0.65rem 0;
	border-bottom: 1px solid #f3f4f6;
}

.rrhh .rrhh-consult-list div:last-child {
	border-bottom: none;
}

.rrhh .rrhh-consult-list dt {
	flex: 0 0 45%;
	max-width: 220px;
	font-size: 0.82rem;
	font-weight: 600;
	color: #6b7280;
}

.rrhh .rrhh-consult-list dd {
	flex: 1 1 auto;
	margin: 0;
	font-size: 0.95rem;
	color: #111827;
	white-space: pre-wrap;
}

.rrhh .rrhh-consult-remark {
	background: #fffbeb;
	border-radius: 0 0 8px 8px;
}

.rrhh .rrhh-consult-remark dd {
	color: #78350f;
}
