/*
Luxury Form Style
Inspired by the newsletter design.
*/

:root {
    --luxury-bg-color: #F8F5F2; /* A soft, off-white */
    --luxury-card-bg-color: #FFFFFF;
    --luxury-primary-color: #B99A7B; /* A muted, sophisticated gold/brown */
    --luxury-primary-hover-color: #A88A6B;
    --luxury-text-color: #333333;
    --luxury-label-color: #555555;
    --luxury-border-color: #DCDCDC;
    --luxury-focus-ring-color: rgba(185, 154, 123, 0.4);
    --luxury-font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--luxury-bg-color);
}

#ge-estimator-form-wrapper {
    font-family: var(--luxury-font-family);
    color: var(--luxury-text-color);
    background-color: var(--luxury-bg-color);
    padding: 2rem;
    max-width: 800px;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.ge-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

#ge-estimator-form-wrapper h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 1px;
    color: var(--luxury-text-color);
    margin-bottom: 0.5rem;
}

#ge-estimator-form-wrapper p {
    font-size: 1.1rem;
    color: var(--luxury-label-color);
}

.ge-address-validation-note {
    font-size: 0.75rem !important;
    color: #666 !important;
    margin-top: 0.25rem;
}

.section-card {
    background-color: var(--luxury-card-bg-color);
    border: 1px solid var(--luxury-border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.section-card.hidden {
    display: none;
}

.section-card h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--luxury-text-color);
    border-bottom: 1px solid var(--luxury-border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
}

.step-number {
    background-color: var(--luxury-primary-color);
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-right: 1rem;
    font-weight: 500;
}

.ge-form-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .ge-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ge-form-grid-3-cols {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .ge-grid-col-span-2 {
        grid-column: span 2 / span 2;
    }
}


.form-input, select.form-input {
    width: 100%;
    background-color: #FDFDFD;
    border: 1px solid var(--luxury-border-color);
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--luxury-text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    height: 48px !important;
}

.form-input:focus, select.form-input:focus {
    border-color: var(--luxury-primary-color);
    box-shadow: 0 0 0 3px var(--luxury-focus-ring-color);
    outline: none;
}

.form-input[disabled],
.form-input[readonly] {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

label {
    font-size: 0.9rem;
    color: var(--luxury-label-color);
    margin-bottom: 0.5rem;
    display: block;
}

.ge-button-container {
    display: flex;
    margin-top: 1.5rem;
}

.ge-button-container.justify-end {
    justify-content: flex-end;
}

.ge-button-container.justify-between {
    justify-content: space-between;
}


.ge-button {
    background-color: var(--luxury-primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    padding: 14px 28px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.ge-button:hover {
    background-color: var(--luxury-primary-hover-color);
}

.ge-button.secondary {
    background-color: #BDBDBD;
}

.ge-button.secondary:hover {
    background-color: #AAAAAA;
}


.ge-progress-container {
    margin-bottom: 2rem;
}

.ge-progress-bar-background {
    background-color: #EAEAEA;
    border-radius: 3px;
    padding: 2px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

#ge-progress-bar {
    background-color: var(--luxury-primary-color);
    height: 6px;
    border-radius: 3px;
    transition: width 0.5s ease-in-out;
}

.ge-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--luxury-label-color);
    margin-top: 0.5rem;
}


#ge-estimator-form-wrapper select.form-input {
    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='%23B99A7B' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 1rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.2em 1.2em !important;
    padding-right: 3rem !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Locked estimate styles */
.ge-locked-estimate-box {
    background-color: #F8F8F8;
    border: 1px solid var(--luxury-border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.ge-locked-estimate-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.ge-locked-estimate-header h3 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--luxury-text-color);
}

.ge-locked-badge {
    background-color: #777;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}
.ge-locked-badge svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.375rem;
}

.ge-locked-estimate-values {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}
.ge-locked-estimate-values span {
    font-size: 2rem;
    font-weight: 500;
    color: var(--luxury-text-color);
}


.estimate-value-box {
    filter: none;
    background-color: var(--luxury-bg-color);
    border: 1px dashed var(--luxury-border-color);
    padding: 1rem 2rem;
    font-size: 2rem;
    font-weight: 300;
    color: var(--luxury-text-color);
}

/* Custom Checkbox */
.ge-consent-label {
    position: relative;
    padding-left: 2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    min-height: 1.5rem;
    user-select: none;
}

.ge-consent-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid var(--luxury-border-color);
    border-radius: 4px;
    background-color: var(--luxury-card-bg-color);
    transition: background-color 0.2s, border-color 0.2s;
}

#ge_consent:checked + .ge-consent-label::before {
    background-color: var(--luxury-primary-color);
    border-color: var(--luxury-primary-color);
}

.ge-consent-label::after {
    content: '';
    position: absolute;
    left: 0.375rem;
    top: 50%;
    width: 0.5rem;
    height: 1rem;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translateY(-60%) rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s;
}

#ge_consent:checked + .ge-consent-label::after {
    opacity: 1;
}

#ge_consent {
    opacity: 0;
    position: absolute;
}

/* Emulation Section */
.ge-emulation-container {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem 0;
}
.ge-emulation-container h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    border: none;
}
.ge-emulation-steps {
    position: relative;
    margin-top: 3rem;
    text-align: left;
}
.ge-emulation-line {
    position: absolute;
    left: 18px;
    top: 18px;
    bottom: 18px;
    width: 2px;
    background-color: var(--luxury-border-color);
    transform: translateX(-50%);
}
.emulation-step {
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 2rem;
}
.emulation-icon-container {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    background: var(--luxury-card-bg-color);
}
.emulation-step span {
    margin-left: 1rem;
    font-size: 1.1rem;
}

/* Spinner Animation */
.emulation-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #d1d5db; /* gray-300 */
    border-top-color: var(--luxury-primary-color); /* 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: var(--luxury-primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

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


/* Confirmation Section */
.ge-confirmation-container {
    text-align: center;
    padding: 2rem 0;
}
.ge-confirmation-box {
    background-color: #F8F8F8;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}
.ge-confirmation-box h3 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}
.ge-confirmation-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Hidden helper */
.hidden {
    display: none !important;
}

/* Address Search Form Styles */
.geneve-address-search-container {
    position: relative;
    font-family: var(--luxury-font-family);
    background-color: rgba(0, 0, 0, 0.6); /* Slightly darker for better contrast */
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.ge-address-search-text {
    color: white;
    text-align: center;
}

/* Add spacing when text is above the form */
.ge-address-search-text + .geneve-address-search-form {
    margin-top: 1rem;
}

/* Add spacing when text is below the form */
.geneve-address-search-form + .ge-address-search-text {
    margin-top: 1rem;
}

.geneve-address-search-form {
    display: flex;
    align-items: center;
}

.ge-address-search-input {
    flex-grow: 1;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid var(--luxury-primary-color); /* Underline style */
    color: white !important; /* Force white text color */
    font-size: 1.1rem;
    padding: 12px 0; /* Adjust padding */
    margin-right: 1.5rem;
    border-radius: 0; /* Remove border-radius for underline effect */
    transition: border-color 0.3s ease;
}

.ge-address-search-input:focus {
    outline: none;
    border-bottom-color: white;
    box-shadow: none; /* Override default focus */
}

.ge-address-search-input::placeholder {
    color: #ccc;
    font-weight: 300;
}

/* Re-style the button to match the luxury theme */
.geneve-address-search-form button {
    background-color: var(--luxury-primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    padding: 14px 28px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap; /* Prevent button text from wrapping */
}

.geneve-address-search-form button:hover {
    background-color: var(--luxury-primary-hover-color);
}

/* --- Google Places Autocomplete Styles --- */

/* Dark theme for the address search widget */
.ge-dark-autocomplete .pac-container {
    background-color: #2D2D2D;
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    font-family: var(--luxury-font-family);
}

.ge-dark-autocomplete .pac-item {
    padding: 12px 16px;
    font-size: 1rem;
    color: #E0E0E0;
    border-top: 1px solid #444;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.ge-dark-autocomplete .pac-item:hover {
    background-color: #383838;
}

.ge-dark-autocomplete .pac-item-query {
    color: #FFFFFF;
    font-weight: 500;
}

.ge-dark-autocomplete .pac-matched {
    color: var(--luxury-primary-color);
    font-weight: 500;
}

.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: 8px 16px;
    content: "";
}

/* Light theme for the main estimator form autocomplete */
body:not(.ge-dark-autocomplete) .pac-container {
    background-color: var(--luxury-card-bg-color) !important;
    border: 1px solid var(--luxury-border-color) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
    font-family: var(--luxury-font-family) !important;
}

body:not(.ge-dark-autocomplete) .pac-item {
    color: var(--luxury-text-color) !important;
    border-top: 1px solid var(--luxury-border-color) !important;
}

body:not(.ge-dark-autocomplete) .pac-item:hover {
    background-color: var(--luxury-bg-color) !important;
}

body:not(.ge-dark-autocomplete) .pac-item-query {
    color: var(--luxury-text-color) !important;
    font-weight: 500;
}

body:not(.ge-dark-autocomplete) .pac-matched {
    color: var(--luxury-primary-color) !important;
    font-weight: 500;
}