.section-card {
    transition: all 0.3s ease;
}
.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.form-input {
    transition: all 0.2s ease;
}
.form-input:focus {
    transform: scale(1.02);
}
.progress-bar {
    transition: width 0.5s ease;
}

.estimate-value-box {
    background-color: #E5E7EB; /* gray-200 */
    color: #9CA3AF; /* gray-400 */
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 18px;
    filter: blur(4px);
    -webkit-filter: blur(4px);
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
}

/* Spinner Animation */
.emulation-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #d1d5db; /* gray-300 */
    border-top-color: #000; /* black */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Checkmark Icon */
.emulation-checkmark {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #000; /* black */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emulation-checkmark svg {
    width: 16px;
    height: 16px;
}

/* Container for the icon */
.emulation-icon-container {
    width: 36px; /* Adjust to align with the line */
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Style Overrides for Theme Compatibility */
#ge-estimator-form-wrapper .form-input,
#ge-estimator-form-wrapper select,
#ge-estimator-form-wrapper input[type="text"],
#ge-estimator-form-wrapper input[type="number"],
#ge-estimator-form-wrapper input[type="email"],
#ge-estimator-form-wrapper input[type="tel"] {
    height: 48px !important;
    padding: 0.5rem 1rem !important;
    line-height: 1.5 !important;
    vertical-align: middle !important;
    font-size: 1rem !important;
}

#ge-estimator-form-wrapper select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 0.5rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.5em 1.5em !important;
    padding-right: 2.5rem !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Dark theme for Google Places Autocomplete, scoped to the address search form */
.ge-dark-autocomplete .pac-container {
    background-color: #1F2937; /* gray-800 */
    border: 1px solid #4B5563; /* gray-600 */
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1050; /* Ensure it's above other elements */
}

.ge-dark-autocomplete .pac-item {
    padding: 10px;
    font-size: 1rem;
    color: #D1D5DB; /* gray-300 */
    border-top: 1px solid #4B5563; /* gray-600 */
    cursor: pointer;
}

.ge-dark-autocomplete .pac-item:first-child {
    border-top: none;
}

.ge-dark-autocomplete .pac-item:hover {
    background-color: #374151; /* gray-700 */
}

.ge-dark-autocomplete .pac-item-query {
    font-size: 1rem;
    color: #F9FAFB; /* gray-50 */
}

.ge-dark-autocomplete .pac-matched {
    color: #F9FAFB; /* gray-50 */
    font-weight: 600;
}

.ge-dark-autocomplete .pac-logo:after {
    background-image: url('https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-dark.png');
    background-size: contain;
    background-repeat: no-repeat;
    height: 14px;
    width: 100px;
    display: block;
    margin: 5px;
    content: "";
}

/* Light theme for the main estimator form autocomplete */
body:not(.ge-dark-autocomplete) .pac-container {
    background-color: #f3f4f6 !important; /* gray-100 */
    border: 1px solid #d1d5db !important; /* gray-300 */
    border-radius: 6px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

body:not(.ge-dark-autocomplete) .pac-item {
    color: #1F2937 !important; /* gray-800 */
    border-top: 1px solid #e5e7eb !important; /* gray-200 */
}

body:not(.ge-dark-autocomplete) .pac-item:hover {
    background-color: #e5e7eb !important; /* gray-200 */
}

body:not(.ge-dark-autocomplete) .pac-item-query {
    color: #111827 !important; /* gray-900 */
}

body:not(.ge-dark-autocomplete) .pac-matched {
    color: #111827 !important; /* gray-900 */
    font-weight: 600 !important;
}


/* Semplice theme layout fix */
#ge-estimator-form-wrapper {
    width: 100% !important;
    flex-shrink: 0 !important; /* Prevent shrinking in a flex container */
    display: flex !important;
    flex-direction: column !important;
}

/* Custom focus style to override theme conflicts */
.ge-input-focus {
    border-color: #1f2937 !important; /* Tailwind gray-800 */
    box-shadow: 0 0 0 2px rgba(31, 41, 55, 0.2) !important;
}

/* Custom Checkbox Styling to Override Theme Conflicts */
#propertyForm label[for="ge_consent"] {
    position: relative;
    padding-left: 2rem; /* Make space for custom checkbox */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    min-height: 1.5rem; /* Ensure consistent height */
    user-select: none;
}

/* Create the custom checkbox box */
#propertyForm label[for="ge_consent"]::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem; /* 20px */
    height: 1.25rem; /* 20px */
    border: 2px solid #6b7280; /* border-gray-500 */
    border-radius: 0.25rem; /* rounded */
    background-color: #ffffff; /* bg-white */
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

/* Style the box when the checkbox is checked */
#propertyForm label[for="ge_consent"].ge-checkbox-checked::before {
    background-color: #1f2937; /* bg-gray-800 */
    border-color: #1f2937; /* border-gray-800 */
}

/* Create the checkmark using a pseudo-element */
#propertyForm label[for="ge_consent"].ge-checkbox-checked::after {
    content: '';
    position: absolute;
    left: 0.375rem; /* 6px */
    top: 50%;
    width: 0.5rem; /* 8px */
    height: 1rem; /* 16px */
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: translateY(-60%) rotate(45deg);
}

/* Hide the actual checkbox input, but keep it accessible */
#ge_consent {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
