/**
 * Public styles for Envio Documentos RH
 * Mobile-first approach
 */

.envio-documentos-rh-form-container {
	max-width: 100%;
	margin: 0 0 30px 0;
	padding: 20px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.envio-documentos-rh-field {
	margin-bottom: 24px;
}

.envio-documentos-rh-field label {
	display: block;
	margin-bottom: 10px;
	font-weight: 600;
	color: #333;
	font-size: 16px; /* Tamanho mínimo recomendado para mobile */
	line-height: 1.5;
}

.envio-documentos-rh-field label .required {
	color: #d63638;
	margin-left: 3px;
	font-weight: 700;
}

.envio-documentos-rh-field input[type="text"],
.envio-documentos-rh-field input[type="email"],
.envio-documentos-rh-field input[type="tel"],
.envio-documentos-rh-field input[type="file"],
.envio-documentos-rh-field select,
.envio-documentos-rh-field textarea {
	width: 100%;
	padding: 14px 16px; /* Padding maior para touch */
	border: 2px solid #ddd;
	border-radius: 6px;
	font-size: 16px; /* Previne zoom automático no iOS */
	box-sizing: border-box;
	-webkit-appearance: none; /* Remove estilos padrão do iOS */
	appearance: none;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
	line-height: 1.5;
}

/* Focus states melhorados */
.envio-documentos-rh-field input[type="text"]:focus,
.envio-documentos-rh-field input[type="email"]:focus,
.envio-documentos-rh-field input[type="tel"]:focus,
.envio-documentos-rh-field select:focus,
.envio-documentos-rh-field textarea:focus {
	outline: none;
	border-color: #0cae54;
	box-shadow: 0 0 0 3px rgba(12, 174, 84, 0.1);
}

.envio-documentos-rh-field textarea {
	resize: vertical;
	min-height: 120px;
	font-family: inherit;
}

/* Estilização para select */
.envio-documentos-rh-field select {
	width: 100%;
	padding: 14px 16px;
	border: 2px solid #ddd;
	border-radius: 6px;
	font-size: 16px;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 12px;
	padding-right: 40px;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
	cursor: pointer;
}

.envio-documentos-rh-field select:focus {
	outline: none;
	border-color: #0cae54;
	box-shadow: 0 0 0 3px rgba(12, 174, 84, 0.1);
}

.envio-documentos-rh-field select option {
	padding: 10px;
}

/* Estilização especial para input de arquivo */
.envio-documentos-rh-field input[type="file"] {
	padding: 12px;
	cursor: pointer;
	font-size: 15px;
}

/* Wrapper para melhorar visual do file input */
.envio-documentos-rh-file-wrapper {
	position: relative;
}

.envio-documentos-rh-file-wrapper input[type="file"] {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
	z-index: 2;
}

.envio-documentos-rh-file-button {
	display: inline-block;
	padding: 14px 24px;
	background-color: #f3f4f6;
	border: 2px dashed #d1d5db;
	border-radius: 6px;
	color: #374151;
	font-weight: 500;
	font-size: 15px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-align: center;
	width: 100%;
	box-sizing: border-box;
}

.envio-documentos-rh-file-button:hover,
.envio-documentos-rh-file-wrapper:hover .envio-documentos-rh-file-button {
	background-color: #e5e7eb;
	border-color: #9ca3af;
}

.envio-documentos-rh-file-button:active {
	background-color: #d1d5db;
}

.envio-documentos-rh-file-info {
	margin-top: 10px;
	font-size: 14px;
	color: #6b7280;
	display: flex;
	align-items: center;
	gap: 8px;
}

.envio-documentos-rh-file-info.has-files {
	color: #0cae54;
	font-weight: 500;
}

.envio-documentos-rh-file-count {
	font-weight: 600;
}

.envio-documentos-rh-field .description {
	margin-top: 8px;
	font-size: 13px;
	color: #6b7280;
	font-style: normal;
	line-height: 1.5;
}

.envio-documentos-rh-actions {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid #e5e7eb;
}

.envio-documentos-rh-actions .button {
	width: 100%;
	padding: 16px 24px; /* Padding maior para área de toque */
	font-size: 18px; /* Fonte maior e mais visível */
	font-weight: 600;
	color: #fff;
	background-color: #0cae54;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	-webkit-tap-highlight-color: transparent; /* Remove highlight padrão do mobile */
	touch-action: manipulation; /* Melhora resposta ao toque */
	min-height: 56px; /* Altura mínima recomendada para touch targets */
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.envio-documentos-rh-actions .button:hover,
.envio-documentos-rh-actions .button:focus {
	background-color: #0ba04a;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	transform: translateY(-1px);
}

.envio-documentos-rh-actions .button:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.envio-documentos-rh-actions .button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	background-color: #0cae54;
	transform: none;
	box-shadow: none;
}

.envio-documentos-rh-message {
	padding: 16px 20px;
	margin-top: 24px;
	border-radius: 6px;
	font-size: 15px;
	line-height: 1.6;
	animation: slideDown 0.3s ease;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.envio-documentos-rh-message.success {
	background: #d4edda;
	border: 2px solid #c3e6cb;
	color: #155724;
}

.envio-documentos-rh-message.error {
	background: #f8d7da;
	border: 2px solid #f5c6cb;
	color: #721c24;
}

.envio-documentos-rh-message p {
	margin: 0;
}

/* Loading spinner para o botão */
.envio-documentos-rh-actions .button.loading {
	position: relative;
	color: transparent;
}

.envio-documentos-rh-actions .button.loading::after {
	content: '';
	position: absolute;
	width: 20px;
	height: 20px;
	top: 50%;
	left: 50%;
	margin-left: -10px;
	margin-top: -10px;
	border: 3px solid #ffffff;
	border-radius: 50%;
	border-top-color: transparent;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Tablet e desktop */
@media (min-width: 768px) {
	.envio-documentos-rh-form-container {
		padding: 32px;
	}

	.envio-documentos-rh-field {
		margin-bottom: 28px;
	}

	.envio-documentos-rh-field label {
		font-size: 15px;
	}

	.envio-documentos-rh-actions .button {
		max-width: 400px;
		margin: 0 auto;
	}
}

/* Desktop */
@media (min-width: 1024px) {
	.envio-documentos-rh-form-container {
		max-width: 100%;
		margin-left: 0;
		margin-right: 0;
	}
}

/* Melhorias para telas muito pequenas */
@media (max-width: 360px) {
	.envio-documentos-rh-form-container {
		padding: 16px;
		border-radius: 6px;
	}

	.envio-documentos-rh-field {
		margin-bottom: 20px;
	}

	.envio-documentos-rh-field input[type="text"],
	.envio-documentos-rh-field input[type="email"],
	.envio-documentos-rh-field input[type="tel"],
	.envio-documentos-rh-field textarea {
		padding: 12px;
		font-size: 16px; /* Manter 16px para prevenir zoom */
	}

	.envio-documentos-rh-actions .button {
		padding: 14px 20px;
		font-size: 16px;
	}
}
