/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Accelerate Form Styles */
.accelerate-form {
	max-width: 600px;
	margin: 0 auto;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.accelerate-form-row {
	margin-bottom: 20px;
}

.accelerate-form-row-inline {
	display: flex;
	gap: 15px;
}

.accelerate-form-row-inline .accelerate-form-group {
	flex: 1;
	margin-bottom: 0px !important;
}

.accelerate-form-phone-number {
	width: 100%;
}

.accelerate-form-group {
	margin-bottom: 15px;
}

.accelerate-form-group label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
	font-size: 14px;
	color: #333;
}

.accelerate-form-group .required {
	color: #d63638;
}

.accelerate-form-input,
.accelerate-form-select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.5;
	color: #333;
	background-color: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.accelerate-form-input:focus,
.accelerate-form-select:focus {
	outline: none;
	border-color: #2271b1 !important;
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.18) !important;
}

.accelerate-form-input[readonly] {
	background-color: #f5f5f5;
	cursor: not-allowed;
}

.accelerate-form-input.error,
.accelerate-form-select.error {
	border-color: #d63638;
	box-shadow: 0 0 0 3px rgba(214, 54, 56, 0.12);
}

.accelerate-form-input.is-valid,
.accelerate-form-select.is-valid {
	border-color: #00a32a !important;
	box-shadow: 0 0 0 3px rgba(0, 163, 42, 0.12) !important;
}

.accelerate-form-input.is-valid:focus,
.accelerate-form-select.is-valid:focus {
	border-color: #00a32a !important;
	box-shadow: 0 0 0 4px rgba(0, 163, 42, 0.16) !important;
}

.accelerate-form-radio-group {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

.accelerate-form-radio {
	display: flex;
	align-items: center;
	cursor: pointer;
	font-weight: normal;
}

.accelerate-form-radio input[type="radio"] {
	margin-right: 8px;
	cursor: pointer;
}

.accelerate-form-radio span {
	font-weight: normal;
}

.accelerate-form-error {
	display: block;
	color: #d63638;
	font-size: 12px;
	margin-top: 5px;
	min-height: 18px;
}

.accelerate-form-address-lookup-row {
	margin-bottom: 0 !important;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-height 0.25s ease, opacity 0.2s ease, margin-bottom 0.2s ease;
}

.accelerate-form-address-lookup-row .accelerate-form-group {
	margin-bottom: 0;
}

.accelerate-form-address-lookup-message {
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	font-size: 12px;
	color: #666;
	transform: translateY(-4px);
	transition: max-height 0.25s ease, opacity 0.2s ease, transform 0.2s ease;
}

.accelerate-form-address-lookup-row.has-message {
	margin-bottom: 20px;
	max-height: 40px;
	opacity: 1;
}

.accelerate-form-address-lookup-row.has-message .accelerate-form-address-lookup-message {
	max-height: 24px;
	opacity: 1;
	transform: translateY(0);
}

.accelerate-form-address-lookup-message.is-error {
	color: #d63638;
}

.accelerate-person-form.is-looking-up-address input[name*="[street]"],
.accelerate-person-form.is-looking-up-address input[name*="[city]"] {
	background-color: #f5f5f5;
}

.accelerate-form-messages {
	margin-bottom: 20px;
	padding: 12px 15px;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.5;
}

.accelerate-form-messages.accelerate-form-success {
	background-color: #00a32a;
	color: #fff;
	border-left: 4px solid #00a32a;
}

.accelerate-form-messages.accelerate-form-error {
	background-color: #fcf0f1;
	color: #d63638;
	border-left: 4px solid #d63638;
}

.accelerate-form-messages p {
	margin: 0;
}

.accelerate-form-submit {
	background-color: #2271b1;
	color: #fff;
	border: none;
	padding: 12px 24px;
	font-size: 16px;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	width: 100%;
}

.accelerate-form-submit:hover:not(:disabled) {
	background-color: #135e96;
}

.accelerate-form-submit:disabled {
	background-color: #ccc;
	cursor: not-allowed;
	opacity: 0.7;
}

/* Debug output styles */
.accelerate-form-debug {
	background-color: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 15px;
	margin: 20px 0;
}

.accelerate-form-debug pre {
	margin: 0;
	font-size: 12px;
	line-height: 1.5;
	overflow-x: auto;
	white-space: pre-wrap;
	word-wrap: break-word;
}

/* Person form container */
.accelerate-person-form {
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	padding: 20px;
	margin-bottom: 20px;
	background-color: #fafafa;
}

.accelerate-person-form:first-child {
	background-color: transparent;
	border: none;
	padding: 0;
}

.accelerate-form-add-person,
.accelerate-form-remove-person,
.accelerate-form-copy-address {
	color: #fff;
	border: none;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.accelerate-form-add-person:hover {
	background-color: #555 !important;
}

.accelerate-form-remove-person:hover {
	background-color: #b32d2e !important;
}

.accelerate-form-copy-address:hover {
	background-color: #135e96 !important;
}

.accelerate-form-copy-address:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
	.accelerate-form {
		padding: 15px;
	}

	.accelerate-form-row-inline {
		flex-direction: column;
		gap: 0;
	}

	.accelerate-form-radio-group {
		flex-direction: column;
		gap: 10px;
	}

	.accelerate-form-input,
	.accelerate-form-select {
		font-size: 16px; /* Prevents zoom on iOS */
	}

	.accelerate-person-form {
		padding: 15px;
	}
}

@media (max-width: 480px) {
	.accelerate-form {
		padding: 10px;
	}

	.accelerate-form-row {
		margin-bottom: 15px;
	}

	.accelerate-form-group {
		margin-bottom: 12px;
	}
}
