/**
 * Austin Tree Experts Quote Form Styles
 */

.ate-quote-form-wrapper {
	max-width: 600px;
	margin: 40px auto;
	padding: 20px;
}

.ate-quote-form {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 40px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ate-form-step {
	animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.ate-quote-form h2 {
	margin-top: 0;
	margin-bottom: 10px;
	color: #2c5530;
	font-size: 24px;
	font-weight: 600;
}

.ate-quote-form p {
	color: #666;
	margin-bottom: 25px;
	line-height: 1.6;
}

/* Form Groups */
.ate-form-group {
	margin-bottom: 20px;
}

.ate-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

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

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

.ate-form-group input[type="text"],
.ate-form-group input[type="email"],
.ate-form-group input[type="tel"],
.ate-form-group input[type="url"],
.ate-form-group input[type="password"],
.ate-form-group textarea,
.ate-form-group select {
	width: 100%;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.3s ease;
	box-sizing: border-box;
}

.ate-form-group input[type="text"]:focus,
.ate-form-group input[type="email"]:focus,
.ate-form-group input[type="tel"]:focus,
.ate-form-group input[type="url"]:focus,
.ate-form-group input[type="password"]:focus,
.ate-form-group textarea:focus,
.ate-form-group select:focus {
	outline: none;
	border-color: #2c5530;
	box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.ate-form-group textarea {
	resize: vertical;
	min-height: 120px;
}

/* Error Messages */
.ate-error-message {
	display: none;
	color: #d32f2f;
	font-size: 12px;
	margin-top: 5px;
}

/* Buttons */
.ate-btn {
	display: inline-block;
	padding: 12px 24px;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
}

.ate-btn-primary {
	background-color: #2c5530;
	color: white;
}

.ate-btn-primary:hover:not(:disabled) {
	background-color: #1f3e23;
	box-shadow: 0 4px 12px rgba(44, 85, 48, 0.3);
}

.ate-btn-primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.ate-btn-secondary {
	background-color: #f5f5f5;
	color: #333;
	border: 1px solid #ddd;
}

.ate-btn-secondary:hover:not(:disabled) {
	background-color: #e8e8e8;
	border-color: #999;
}

/* Form Actions */
.ate-form-actions {
	display: flex;
	gap: 12px;
	margin-top: 30px;
	justify-content: space-between;
}

@media (max-width: 600px) {
	.ate-form-actions {
		flex-direction: column;
	}

	.ate-btn {
		width: 100%;
	}
}

/* Address Match Results */
.ate-match-list {
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	padding: 0;
	margin-bottom: 20px;
}

.ate-match-option {
	display: flex;
	align-items: center;
	padding: 15px;
	border-bottom: 1px solid #e0e0e0;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.ate-match-option:last-child {
	border-bottom: none;
}

.ate-match-option:hover {
	background-color: #f0f7f0;
}

.ate-match-option input[type="radio"] {
	margin-right: 12px;
	cursor: pointer;
	width: 18px;
	height: 18px;
}

.ate-match-name {
	font-weight: 500;
	color: #333;
}

/* Services Grid */
.ate-services-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
	margin-bottom: 25px;
}

@media (max-width: 600px) {
	.ate-services-grid {
		grid-template-columns: 1fr;
	}
}

.ate-service-checkbox {
	display: flex;
	align-items: center;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s ease;
	background: #fff;
}

.ate-service-checkbox:hover {
	border-color: #2c5530;
	background-color: #f9f9f9;
}

.ate-service-checkbox input[type="checkbox"] {
	margin-right: 10px;
	cursor: pointer;
	width: 18px;
	height: 18px;
	accent-color: #2c5530;
}

.ate-service-checkbox span {
	font-weight: 500;
	color: #333;
}

.ate-service-checkbox input[type="checkbox"]:checked + span {
	color: #2c5530;
	font-weight: 600;
}

/* Loading Spinner */
.ate-loading {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #666;
	font-size: 14px;
	margin-left: 10px;
}

.ate-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid #ddd;
	border-top-color: #2c5530;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

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

/* Success Message */
.ate-success-message {
	text-align: center;
	padding: 40px 20px;
}

.ate-success-content h2 {
	color: #2c5530;
	font-size: 28px;
	margin-bottom: 15px;
}

.ate-success-content p {
	color: #666;
	margin-bottom: 15px;
	line-height: 1.6;
}

.ate-success-contact {
	background: #f0f7f0;
	padding: 20px;
	border-radius: 4px;
	border-left: 4px solid #2c5530;
}

.ate-success-contact a {
	color: #2c5530;
	text-decoration: none;
	font-weight: 600;
}

.ate-success-contact a:hover {
	text-decoration: underline;
}

/* Duplicate Detection Interstitial */
.ate-dup-matches {
	margin-bottom: 20px;
}

.ate-dup-card {
	border: 1px solid #e0c97f;
	border-radius: 6px;
	margin-bottom: 15px;
	overflow: hidden;
	background: #fff;
}

.ate-dup-card-header {
	background: #fdf5e1;
	padding: 12px 16px;
	border-bottom: 1px solid #e0c97f;
	font-size: 16px;
}

.ate-dup-card-body {
	padding: 16px;
	font-size: 14px;
	color: #555;
	line-height: 1.7;
}

.ate-dup-address {
	color: #777;
}

.ate-dup-reasons {
	font-size: 12px;
	color: #999;
	margin-top: 6px;
	margin-bottom: 12px;
}

.ate-dup-select-btn {
	padding: 8px 20px;
	font-size: 13px;
}

.ate-quote-form h3 {
	margin-top: 30px;
	margin-bottom: 15px;
	color: #2c5530;
	font-size: 18px;
	font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
	.ate-quote-form-wrapper {
		padding: 10px;
	}

	.ate-quote-form {
		padding: 25px;
	}

	.ate-quote-form h2 {
		font-size: 20px;
	}
}

/* Accessibility */
.ate-form-group input:focus,
.ate-form-group textarea:focus,
.ate-form-group select:focus {
	outline: 2px solid #2c5530;
	outline-offset: 2px;
}

/* Upload Step */
.ate-upload-section {
	margin-bottom: 24px;
	padding: 16px;
	background: #f9f9f9;
	border-radius: 6px;
	border: 1px solid #eee;
}

.ate-upload-section h3 {
	margin: 0 0 4px 0;
	font-size: 16px;
	color: #2c5530;
}

.ate-upload-hint {
	font-size: 13px;
	color: #888;
	margin: 0 0 12px 0;
}

.ate-drop-zone {
	border: 2px dashed #ccc;
	border-radius: 6px;
	padding: 24px;
	text-align: center;
	color: #888;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s;
}

.ate-drop-zone:hover,
.ate-drop-zone.ate-drop-hover {
	border-color: #2c5530;
	background: #f0f7f1;
}

.ate-drop-icon {
	display: block;
	font-size: 28px;
	font-style: normal;
	margin-bottom: 8px;
}

.ate-drop-zone span {
	display: block;
	font-size: 14px;
	margin-bottom: 4px;
}

.ate-drop-zone small {
	display: block;
	font-size: 11px;
	color: #aaa;
}

.ate-file-label {
	color: #2c5530;
	text-decoration: underline;
	cursor: pointer;
	font-weight: 600;
}

.ate-file-list {
	margin-top: 8px;
}

.ate-file-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	margin-top: 6px;
	font-size: 13px;
}

.ate-file-item.ate-file-done {
	border-color: #2c5530;
	background: #f0f7f1;
}

.ate-file-item.ate-file-error {
	border-color: #d32f2f;
	background: #fef2f2;
}

.ate-file-name {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ate-file-size {
	color: #999;
	font-size: 11px;
	white-space: nowrap;
}

.ate-file-status {
	font-size: 14px;
	width: 18px;
	text-align: center;
}

.ate-file-done .ate-file-status {
	color: #2c5530;
}

.ate-file-error .ate-file-status {
	color: #d32f2f;
}

.ate-file-remove {
	background: none;
	border: none;
	color: #999;
	font-size: 18px;
	cursor: pointer;
	padding: 0 4px;
	line-height: 1;
}

.ate-file-remove:hover {
	color: #d32f2f;
}

.ate-file-progress {
	width: 18px;
	text-align: center;
}

.ate-spinner-sm {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid #ccc;
	border-top-color: #2c5530;
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
}

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

.ate-upload-status {
	text-align: center;
	padding: 10px;
	color: #666;
	font-size: 14px;
}

/* Print Styles */
@media print {
	.ate-quote-form-wrapper {
		max-width: 100%;
		margin: 0;
		padding: 0;
	}

	.ate-quote-form {
		padding: 0;
		box-shadow: none;
		border: none;
	}

	.ate-btn {
		display: none;
	}
}
