/**
 * Self Registration Form Styles
 *
 * @package OrcamentoWhatsAppPro
 */

/* Wrapper */
.owp-self-registration-wrapper {
	max-width: 600px;
	margin: 0 auto;
	padding: 30px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.owp-self-registration-wrapper .owp-form-title {
	margin: 0 0 10px;
	font-size: 24px;
	font-weight: 600;
	color: #333;
	text-align: center;
}

.owp-self-registration-wrapper .owp-form-subtitle {
	margin: 0 0 25px;
	font-size: 14px;
	color: #666;
	text-align: center;
	line-height: 1.5;
}

/* Form */
.owp-self-registration-form {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.owp-self-registration-form .owp-form-fields {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

/* Form Field */
.owp-self-registration-form .owp-form-field {
	display: flex;
	flex-direction: column;
	position: relative;
}

.owp-self-registration-form .owp-form-field label {
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 500;
	color: #333;
}

.owp-self-registration-form .owp-form-field label .required {
	color: #e74c3c;
	margin-left: 2px;
}

.owp-self-registration-form .owp-form-field input,
.owp-self-registration-form .owp-form-field select {
	width: 100%;
	padding: 12px 14px;
	font-size: 15px;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #fff;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
}

.owp-self-registration-form .owp-form-field input:focus,
.owp-self-registration-form .owp-form-field select:focus {
	outline: none;
	border-color: #7f54b3;
	box-shadow: 0 0 0 3px rgba(127, 84, 179, 0.15);
}

.owp-self-registration-form .owp-form-field input.error,
.owp-self-registration-form .owp-form-field select.error {
	border-color: #e74c3c;
	background-color: #fdf2f2;
}

.owp-self-registration-form .owp-form-field input.loading {
	background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="35" stroke="%237f54b3" stroke-width="8" fill="none" stroke-dasharray="164.93361431346415 56.97787143782138"><animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"/></circle></svg>');
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 20px 20px;
	padding-right: 40px;
}

.owp-self-registration-form .owp-form-field select {
	cursor: pointer;
	appearance: none;
	background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23666"><path d="M7 10l5 5 5-5z"/></svg>');
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 20px 20px;
	padding-right: 40px;
}

/* Field hints and messages */
.owp-self-registration-form .owp-field-hint {
	font-size: 12px;
	color: #888;
	margin-top: 4px;
}

.owp-self-registration-form .owp-field-error {
	font-size: 12px;
	color: #e74c3c;
	margin-top: 4px;
}

.owp-self-registration-form .owp-field-message {
	font-size: 12px;
	margin-top: 4px;
}

.owp-self-registration-form .owp-field-info {
	color: #7f54b3;
}

.owp-self-registration-form .owp-field-error {
	color: #e74c3c;
}

/* Honeypot */
.owp-self-registration-form .owp-hp-field {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Form Error */
.owp-self-registration-form .owp-form-error {
	padding: 12px 16px;
	margin-bottom: 20px;
	background: #fdf2f2;
	border: 1px solid #f5c6cb;
	border-radius: 6px;
	color: #721c24;
	font-size: 14px;
}

/* Form Actions */
.owp-self-registration-form .owp-form-actions {
	margin-top: 25px;
}

.owp-self-registration-form .owp-submit-btn {
	width: 100%;
	padding: 14px 24px;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	background: #7f54b3;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.2s, transform 0.1s;
}

.owp-self-registration-form .owp-submit-btn:hover {
	background: #6b4799;
}

.owp-self-registration-form .owp-submit-btn:active {
	transform: scale(0.98);
}

.owp-self-registration-form .owp-submit-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.owp-self-registration-form .owp-submit-btn .btn-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.owp-self-registration-form .owp-submit-btn .spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: #fff;
	animation: owp-spin 0.8s linear infinite;
}

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

/* Form Note */
.owp-self-registration-form .owp-form-note {
	margin-top: 15px;
	font-size: 12px;
	color: #888;
	text-align: center;
}

/* Success State */
.owp-form-success {
	text-align: center;
	padding: 20px 0;
}

.owp-form-success .owp-success-icon {
	margin-bottom: 20px;
	color: #27ae60;
}

.owp-form-success .owp-success-icon svg {
	width: 64px;
	height: 64px;
}

.owp-form-success .owp-success-title {
	margin: 0 0 15px;
	font-size: 22px;
	font-weight: 600;
	color: #27ae60;
}

.owp-form-success .owp-success-message {
	margin: 0 0 25px;
	font-size: 15px;
	color: #666;
	line-height: 1.6;
}

/* WhatsApp Button */
.owp-whatsapp-action {
	margin-top: 20px;
}

.owp-whatsapp-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 28px;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	background: #25D366;
	border-radius: 6px;
	text-decoration: none;
	transition: background-color 0.2s, transform 0.1s;
}

.owp-whatsapp-btn:hover {
	background: #1fb855;
	color: #fff;
}

.owp-whatsapp-btn:active {
	transform: scale(0.98);
}

.owp-whatsapp-btn svg {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

/* Notices */
.owp-self-registration-wrapper .owp-notice {
	padding: 15px 20px;
	border-radius: 6px;
	font-size: 15px;
	line-height: 1.5;
}

.owp-self-registration-wrapper .owp-notice-info {
	background: #e8f4fd;
	border: 1px solid #bee5eb;
	color: #0c5460;
}

.owp-self-registration-wrapper .owp-notice-warning {
	background: #fff3cd;
	border: 1px solid #ffeeba;
	color: #856404;
}

.owp-self-registration-wrapper .owp-notice p {
	margin: 0;
}

/* Responsive */
@media screen and (max-width: 600px) {
	.owp-self-registration-wrapper {
		padding: 20px 15px;
		margin: 0 10px;
		border-radius: 6px;
	}

	.owp-self-registration-wrapper .owp-form-title {
		font-size: 20px;
	}

	.owp-self-registration-form .owp-form-field input,
	.owp-self-registration-form .owp-form-field select {
		padding: 10px 12px;
		font-size: 16px; /* Prevents zoom on iOS */
	}

	.owp-self-registration-form .owp-submit-btn {
		padding: 12px 20px;
		font-size: 15px;
	}

	.owp-whatsapp-btn {
		padding: 12px 20px;
		font-size: 15px;
	}
}

/* Address fields layout - two columns for some fields */
@media screen and (min-width: 480px) {
	.owp-self-registration-form .owp-form-fields {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 15px;
	}

	.owp-self-registration-form .owp-field-nome_completo,
	.owp-self-registration-form .owp-field-razao_social,
	.owp-self-registration-form .owp-field-nome_fantasia,
	.owp-self-registration-form .owp-field-email,
	.owp-self-registration-form .owp-field-rua,
	.owp-self-registration-form .owp-field-senha {
		grid-column: 1 / -1;
	}
}
