.uniapp-lead-wrap {
	max-width: 800px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	color: #333;
	line-height: 1.6;
}

.uniapp-lead-form-header {
	margin-bottom: 1.25rem;
}

.uniapp-lead-form-title {
	font-size: 1.75rem;
	font-weight: 700;
	color: #2c5aa0;
	margin: 0 0 0.5rem 0;
	line-height: 1.2;
}

.uniapp-lead-form-description {
	font-size: 0.95rem;
	color: #2c5aa0;
	margin: 0;
	line-height: 1.4;
}

.uniapp-lead-form {
	margin: 0;
	background: #f5f5f0;
	padding: 1.5rem;
	border-radius: 12px;
}

.uniapp-lead-company-toggle {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 0;
}

.uniapp-lead-company-label {
	font-weight: 600;
	margin: 0;
	font-size: 1rem;
	color: #333;
}

.uniapp-lead-toggle {
	display: flex;
	border: 2px solid #2c5aa0;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
}

.uniapp-lead-toggle-btn {
	padding: 8px 16px;
	border: none;
	background: #fff;
	color: #2c5aa0;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.9rem;
	transition: all 0.2s ease;
	position: relative;
}

.uniapp-lead-toggle-btn--yes {
	border-right: 2px solid #2c5aa0;
}

.uniapp-lead-toggle-btn--active {
	background: #2c5aa0;
	color: #fff;
}

.uniapp-lead-toggle-btn:hover:not(.uniapp-lead-toggle-btn--active) {
	background: #f5f7fa;
}

.uniapp-lead-form-section {
	margin-bottom: 24px;
}

.uniapp-lead-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-bottom: 0;
}

.uniapp-lead-colspan {
	grid-column: 1 / -1;
}

.uniapp-lead-field-group {
	display: contents;
}

.uniapp-lead-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 5px;
	color: #333;
	font-size: 0.9rem;
}

.uniapp-lead-form label .required-asterisk {
	color: #d32f2f;
	font-weight: 700;
	margin-left: 2px;
}

.uniapp-lead-privacy {
	margin-top: 0.75rem;
	padding: 0;
	background: transparent;
	border-radius: 0;
	font-size: 0.8rem;
	line-height: 1.5;
	color: #666;
}

.uniapp-lead-privacy p {
	margin: 0;
}

.uniapp-lead-privacy a {
	color: #2c5aa0;
	text-decoration: underline;
}

.uniapp-lead-privacy a:hover {
	color: #1e3f73;
	text-decoration: none;
}

/* Base styles for all form inputs - consistent across all types */
/* Target all inputs except hidden, submit, button, and checkbox/radio */
.uniapp-lead-form input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
.uniapp-lead-form select,
.uniapp-lead-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 12px;
	border: 1px solid #d0d0d0;
	border-radius: 8px;
	font-size: 0.95rem;
	font-family: inherit;
	background: #fff;
	color: #333;
	transition: all 0.2s ease;
	line-height: 1.4;
	min-height: 40px;
}

/* Explicitly target all text input types for extra specificity */
.uniapp-lead-form input[type="text"],
.uniapp-lead-form input[type="email"],
.uniapp-lead-form input[type="tel"],
.uniapp-lead-form input[type="number"],
.uniapp-lead-form input[type="password"],
.uniapp-lead-form input[type="search"],
.uniapp-lead-form input[type="url"] {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 12px;
	border: 1px solid #d0d0d0;
	border-radius: 8px;
	font-size: 0.95rem;
	font-family: inherit;
	background: #fff;
	color: #333;
	transition: all 0.2s ease;
	line-height: 1.4;
	min-height: 40px;
}

/* File input - same base style, with custom button */
.uniapp-lead-form input[type="file"] {
	padding: 8px 12px;
	cursor: pointer;
	background: #fff;
}

.uniapp-lead-form input[type="file"]::file-selector-button {
	padding: 6px 12px;
	margin-right: 10px;
	border: 1px solid #d0d0d0;
	border-radius: 6px;
	background: #fff;
	color: #333;
	font-size: 0.9rem;
	font-family: inherit;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.uniapp-lead-form input[type="file"]::file-selector-button:hover {
	background: #f5f5f5;
	border-color: #2c5aa0;
}

/* Select dropdown - same base style with custom arrow */
.uniapp-lead-form select {
	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;
	padding-right: 40px;
	cursor: pointer;
}

/* Textarea - same base style, with vertical resize */
.uniapp-lead-form textarea {
	resize: vertical;
	min-height: 80px;
	font-family: inherit;
	line-height: 1.4;
}

/* Focus states for all inputs */
.uniapp-lead-form input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):focus,
.uniapp-lead-form select:focus,
.uniapp-lead-form textarea:focus {
	outline: none;
	border-color: #2c5aa0;
	box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.15);
}

/* Invalid states */
.uniapp-lead-form input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):invalid:not(:focus):not(:placeholder-shown),
.uniapp-lead-form textarea:invalid:not(:focus):not(:placeholder-shown) {
	border-color: #d32f2f;
}

.uniapp-lead-form textarea {
	resize: vertical;
	min-height: 120px;
	font-family: inherit;
}

.uniapp-lead-form button[type="submit"] {
	width: 100%;
	padding: 12px 24px;
	background: #4caf50;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	margin-top: 0.75rem;
	text-transform: none;
	letter-spacing: 0.3px;
}

.uniapp-lead-form button[type="submit"]:hover {
	background: #45a049;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.uniapp-lead-form button[type="submit"]:active {
	transform: translateY(0);
}

.uniapp-lead-form button[type="submit"]:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.uniapp-lead-notice {
	padding: 16px 20px;
	margin-bottom: 1.5rem;
	border-radius: 6px;
	font-weight: 500;
	border-left: 4px solid;
}

.uniapp-lead-notice--success {
	background: #e8f5e9;
	border-left-color: #4caf50;
	color: #2e7d32;
}

.uniapp-lead-notice--error {
	background: #ffebee;
	border-left-color: #f44336;
	color: #c62828;
}

.uniapp-lead-dev-output {
	margin: 24px 0;
	padding: 16px;
	background: #f5f5f5;
	border: 2px solid #4ECDC4;
	border-radius: 6px;
}

.uniapp-lead-dev-output h3 {
	margin: 0 0 16px 0;
	color: #333;
	font-size: 1.2rem;
}

.uniapp-lead-dev-errors {
	margin-bottom: 16px;
	padding: 12px;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 4px;
}

.uniapp-lead-dev-errors strong {
	color: #856404;
	display: block;
	margin-bottom: 8px;
}

.uniapp-lead-dev-errors ul {
	margin: 8px 0 0 0;
	padding-left: 20px;
}

.uniapp-lead-dev-errors li {
	color: #856404;
	margin-bottom: 4px;
}

.uniapp-lead-dev-success {
	margin-bottom: 16px;
	padding: 12px;
	background: #d4edda;
	border: 1px solid #28a745;
	border-radius: 4px;
	color: #155724;
	font-weight: 600;
}

.uniapp-lead-dev-output details {
	margin-bottom: 12px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 12px;
}

.uniapp-lead-dev-output summary {
	cursor: pointer;
	font-weight: 600;
	color: #333;
	margin-bottom: 8px;
	padding: 8px;
	background: #f9f9f9;
	border-radius: 3px;
}

.uniapp-lead-dev-output summary:hover {
	background: #f0f0f0;
}

.uniapp-lead-dev-output pre {
	margin: 12px 0 0 0;
	padding: 12px;
	background: #1e1e1e;
	color: #d4d4d4;
	border-radius: 4px;
	overflow-x: auto;
	font-size: 0.875rem;
	line-height: 1.5;
	font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
}

.uniapp-lead-hp {
	position: absolute;
	left: -10000px;
	top: -10000px;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

@media (max-width: 768px) {
	.uniapp-lead-wrap {
		max-width: 100%;
		padding: 0 1rem;
	}
	
	.uniapp-lead-form-header {
		margin-bottom: 1.5rem;
	}
	
	.uniapp-lead-form-title {
		font-size: 1.75rem;
	}
	
	.uniapp-lead-form-description {
		font-size: 0.95rem;
	}
	
	.uniapp-lead-form {
		padding: 1.5rem;
	}
	
	.uniapp-lead-grid {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}
	
	.uniapp-lead-company-toggle {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
	
	.uniapp-lead-toggle {
		width: 100%;
	}
	
	.uniapp-lead-toggle-btn {
		flex: 1;
	}
}