/**
 * Frontend Styles for Lead Portal Collector
 *
 * @package Ingenius\LeadPortalCollector\Frontend
 * @since 1.0.0
 */

/* Form Container */
.lpc-form-container {
	max-width: 600px;
	margin: 2rem auto;
	padding: 0 1rem;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.lpc-lead-form {
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	padding: 2rem;
	border: 1px solid #e1e5e9;
}

/* Form Fields */
.lpc-form-fields {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.lpc-form-field {
	display: flex;
	flex-direction: column;
}

.lpc-form-field label {
	font-weight: 600;
	color: #374151;
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
}

.lpc-form-field.lpc-required label::after {
	content: " *";
	color: #dc2626;
}

/* Input Styles */
.lpc-input,
.lpc-textarea,
.lpc-select {
	width: 100%;
	padding: 0.75rem;
	border: 2px solid #d1d5db;
	border-radius: 8px;
	font-size: 1rem;
	transition: all 0.2s ease;
	background-color: #ffffff;
}

.lpc-input:focus,
.lpc-textarea:focus,
.lpc-select:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.lpc-input:hover,
.lpc-textarea:hover,
.lpc-select:hover {
	border-color: #9ca3af;
}

.lpc-textarea {
	resize: vertical;
	min-height: 100px;
}

.lpc-select {
	cursor: pointer;
}

/* Form Row for Side-by-side Fields */
.lpc-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

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

/* Field Groups */
.lpc-form-field-group {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 1.5rem;
	background-color: #f9fafb;
}

.lpc-form-field-group h4 {
	margin: 0 0 1rem 0;
	color: #374151;
	font-size: 1.125rem;
	font-weight: 600;
}

/* Checkbox Styles */
.lpc-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	cursor: pointer;
	font-size: 0.875rem;
	line-height: 1.4;
}

.lpc-checkbox-label input[type="checkbox"] {
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
	flex-shrink: 0;
	margin-top: 0.125rem;
}

.lpc-checkbox-text {
	color: #4b5563;
}

.lpc-checkbox-text a {
	color: #3b82f6;
	text-decoration: none;
}

.lpc-checkbox-text a:hover {
	text-decoration: underline;
}

/* Submit Button */
.lpc-submit-btn {
	background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
	color: white;
	border: none;
	border-radius: 8px;
	padding: 1rem 2rem;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	width: 100%;
	position: relative;
	overflow: hidden;
}

.lpc-submit-btn:hover:not(:disabled) {
	background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.lpc-submit-btn:active:not(:disabled) {
	transform: translateY(0);
}

.lpc-submit-btn:disabled {
	background: #9ca3af;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.lpc-btn-text,
.lpc-btn-loading {
	display: inline-block;
}

/* Messages */
.lpc-messages {
	margin-top: 1.5rem;
}

.lpc-success-message,
.lpc-error-message {
	padding: 1rem;
	border-radius: 8px;
	font-weight: 500;
	text-align: center;
}

.lpc-success-message {
	background-color: #d1fae5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.lpc-error-message {
	background-color: #fee2e2;
	color: #991b1b;
	border: 1px solid #fca5a5;
}

/* Error States */
.lpc-form-field.lpc-has-error .lpc-input,
.lpc-form-field.lpc-has-error .lpc-textarea,
.lpc-form-field.lpc-has-error .lpc-select {
	border-color: #dc2626;
}

.lpc-form-field.lpc-has-error .lpc-error-message {
	display: block;
	margin-top: 0.5rem;
	font-size: 0.875rem;
	color: #dc2626;
}

.lpc-form-field .lpc-error-message {
	display: none;
}

/* Honeypot */
.lpc-honeypot {
	position: absolute;
	left: -9999px;
	top: -9999px;
}

/* Responsive Design */
@media (max-width: 768px) {
	.lpc-form-container {
		margin: 1rem auto;
		padding: 0 0.5rem;
	}

	.lpc-lead-form {
		padding: 1.5rem;
	}

	.lpc-form-fields {
		gap: 1rem;
	}

	.lpc-form-field-group {
		padding: 1rem;
	}
}

@media (max-width: 480px) {
	.lpc-lead-form {
		padding: 1rem;
	}

	.lpc-submit-btn {
		padding: 0.875rem 1.5rem;
	}
}

/* Loading Animation */
.lpc-btn-loading {
	animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
}

/* Focus Visible for Accessibility */
.lpc-input:focus-visible,
.lpc-textarea:focus-visible,
.lpc-select:focus-visible,
.lpc-submit-btn:focus-visible {
	outline: 2px solid #3b82f6;
	outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
	.lpc-lead-form {
		border-width: 2px;
	}

	.lpc-input,
	.lpc-textarea,
	.lpc-select {
		border-width: 2px;
	}

	.lpc-submit-btn {
		border: 2px solid #ffffff;
	}
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
	.lpc-input,
	.lpc-textarea,
	.lpc-select,
	.lpc-submit-btn {
		transition: none;
	}

	.lpc-submit-btn:hover:not(:disabled) {
		transform: none;
	}

	.lpc-btn-loading {
		animation: none;
	}
}
