/**
 * Camden Two Forms Stylesheet
 * Forms: Contact Enquiry & Complimentary Consultation Booking
 */

.cp-lead-form-wrap {
	width: 100%;
	box-sizing: border-box;
	position: relative;
}

.cp-lead-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
	width: 100%;
	box-sizing: border-box;
}

.cp-field-group {
	position: relative;
	box-sizing: border-box;
}

.cp-lead-input {
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
}

.cp-lead-input:focus {
	border-color: #BE955C !important;
	box-shadow: 0 0 0 3px rgba(190, 149, 92, 0.22) !important;
	outline: none !important;
}

.cp-lead-input.has-error {
	border-color: #d9383a !important;
	background-color: #fff9f9 !important;
}

select.cp-lead-input {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235E6878' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 36px !important;
	cursor: pointer;
}

.cp-type-toggle-group .cp-type-btn {
	transition: all 0.2s ease;
	outline: none;
}

.cp-type-toggle-group .cp-type-btn:hover:not(.is-active) {
	border-color: #133054;
	color: #133054;
	background-color: #f7f9fc;
}

.cp-type-toggle-group .cp-type-btn.is-active {
	border-color: #133054 !important;
	background-color: #133054 !important;
	color: #ffffff !important;
	box-shadow: 0 2px 8px rgba(19, 48, 84, 0.25);
}

.cp-lead-submit-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(19, 48, 84, 0.22);
	transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.cp-lead-submit-btn:hover:not(:disabled) {
	background-color: #0B2240 !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(19, 48, 84, 0.32);
}

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

.cp-lead-submit-btn:disabled {
	opacity: 0.75;
	cursor: not-allowed;
}

/* Spinner Animation */
.cp-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-radius: 50%;
	border-top-color: #ffffff;
	animation: cpSpin 0.7s linear infinite;
}

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

/* Alert Banner */
.cp-lead-alert {
	padding: 14px 16px;
	border-radius: 6px;
	font-size: 14px;
	line-height: 1.5;
	font-weight: 600;
	margin-bottom: 6px;
	box-sizing: border-box;
}

.cp-lead-alert.is-error {
	background-color: #FDF2F2;
	border: 1px solid #F0B8B8;
	color: #9E1C1C;
}

.cp-lead-alert.is-success {
	background-color: #F0FDF4;
	border: 1px solid #BBF7D0;
	color: #166534;
}

/* Success Card Animation */
.cp-lead-success {
	animation: cpFadeUp 0.35s ease-out both;
}

@keyframes cpFadeUp {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.cp-reset-lead-btn {
	transition: all 0.2s ease;
}

.cp-reset-lead-btn:hover {
	border-color: #133054 !important;
	background-color: #133054 !important;
	color: #ffffff !important;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
	.cp-lead-input {
		font-size: 16px !important; /* Stops iOS Safari auto-zoom */
		padding: 13px 14px !important;
	}

	.cp-lead-submit-btn {
		width: 100% !important;
		min-height: 52px !important;
		font-size: 15.5px !important;
	}

	.cp-type-toggle-group {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		width: 100%;
	}

	.cp-type-toggle-group .cp-type-btn {
		text-align: center;
		justify-content: center;
		padding: 12px 10px !important;
		font-size: 13px !important;
	}
}
