/**
 * Disposeo Estimation Widget Styles
 */

/* Masquer les éléments Google auto-créés */
gmp-place-autocomplete,
.pac-container {
    display: none !important;
}

/* Form Container */
.disposeo-estimation-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 10px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid rgba(231, 90, 13, 0.1);
    background: rgba(255, 255, 255, 0.1);
}

.disposeo-estimation-form .wrapper {
    background: rgba(255, 255, 255, 1);
    padding: 32px;
    border-radius: 10px;
}

.disposeo-estimation-form h2 {
    font-family: "all-round-gothic", Sans-serif;
    font-size: 24px !important;
    font-weight: 700;
    color: #E75A0D !important;
    margin: 0 0 20px;
}
.disposeo-estimation-form h2 span {
    color: #66000E;
}

/* Form Sections */
.disposeo-estimation-form .form-section {
    margin-bottom: 20px;
}

.disposeo-estimation-form .form-section:last-child {
    margin-bottom: 0;
}

.disposeo-estimation-form .form-section label:not(.radio-label) {
    display: block;
    font-family: "Poppins", Sans-serif;
    margin-bottom: 10px;
    font-weight: 500;
    color: #140003;
    font-size: 14px;
}

/* Custom Select */
.disposeo-estimation-form .custom-select {
    position: relative;
}

.disposeo-estimation-form .custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 59px;
    padding: 0 20px 0 16px;
    border: 1px solid #E9E9E9;
    border-radius: 10px;
    font-size: 16px;
    line-height: 24px;
    color: #6C6C6C;
    font-weight: 400;
    background-color: #fff;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.disposeo-estimation-form .custom-select-trigger:hover {
    border-color: #aaa;
}

.disposeo-estimation-form .custom-select-trigger:focus {
    outline: none;
    border-color: var( --e-global-color-primary );
    box-shadow: 0 0 0 3px rgba(231, 90, 13, 0.1);
}

.disposeo-estimation-form .custom-select.is-open .custom-select-trigger {
    border-color: var( --e-global-color-primary );
}

.disposeo-estimation-form .custom-select.is-invalid .custom-select-trigger {
    border-color: var( --e-global-color-primary );
}

.disposeo-estimation-form .custom-select-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.disposeo-estimation-form .custom-select-icon {
    flex-shrink: 0;
}

.disposeo-estimation-form .custom-select-value {
    color: #6C6C6C;
}

.disposeo-estimation-form .custom-select-value.has-value {
    color: #140003;
}

.disposeo-estimation-form .custom-select-arrow {
    color: #666;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

.disposeo-estimation-form .custom-select.is-open .custom-select-arrow {
    transform: rotate(180deg);
}

.disposeo-estimation-form .custom-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
}

.disposeo-estimation-form .custom-select-option {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #140003;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s ease;
}

.disposeo-estimation-form .custom-select-option:last-child {
    border-bottom: none;
}

.disposeo-estimation-form .custom-select-option:hover,
.disposeo-estimation-form .custom-select-option.active {
    background-color: #f5f5f5;
}

.disposeo-estimation-form .custom-select-option.selected {
    background-color: #f5f5f5;
}

/* Radio Group */
.disposeo-estimation-form .radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.disposeo-estimation-form .radio-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 59px;
    padding: 0 20px;
    border: 1px solid #E9E9E9;
    border-radius: 10px;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    cursor: pointer;
    box-sizing: border-box;
}

.disposeo-estimation-form .radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.disposeo-estimation-form .radio-label .radio-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.disposeo-estimation-form .radio-label .radio-checked {
    display: none;
}

.disposeo-estimation-form .radio-label .radio-unchecked {
    display: block;
}

.disposeo-estimation-form .radio-label:has(input:checked) .radio-checked {
    display: block;
}

.disposeo-estimation-form .radio-label:has(input:checked) .radio-unchecked {
    display: none;
}

.disposeo-estimation-form .radio-label:has(input:checked) {
    border-color: var(--e-global-color-secondary, #66000E);
    border-width: 2px;
    background-color: rgba(102, 0, 14, 0.05);
}

/* City Inputs */
.disposeo-estimation-form .form-section--cities {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.disposeo-estimation-form .city-input-wrapper {
    position: relative;
}

.disposeo-estimation-form .city-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

.disposeo-estimation-form .city-input-wrapper input[type="text"] {
    width: 100%;
    height: 59px;
    padding: 0 16px 0 44px;
    border: 1px solid #E9E9E9;
    border-radius: 10px;
    font-size: 16px;
    line-height: 24px;
    color: #6C6C6C;
    box-sizing: border-box;
}

.disposeo-estimation-form .city-input-wrapper input[type="text"]:focus {
    outline: none;
    border-color: #E75A0D;
    box-shadow: 0 0 0 3px rgba(231, 90, 13, 0.1);
}

.disposeo-estimation-form .city-input-wrapper input[type="text"].is-valid {
    border-color: #28a745;
}

.disposeo-estimation-form .city-input-wrapper input[type="text"].is-invalid {
    border-color: #dc3545;
}

/* City Dropdown */
.disposeo-estimation-form .city-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
}

.disposeo-estimation-form .city-dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.disposeo-estimation-form .city-dropdown-item:last-child {
    border-bottom: none;
}

.disposeo-estimation-form .city-dropdown-item:hover,
.disposeo-estimation-form .city-dropdown-item.active {
    background-color: #f5f5f5;
}

/* CTA Button */
.disposeo-estimation-form .estimation-cta {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.disposeo-estimation-form .estimation-cta:hover {
    background: none;
}

.disposeo-estimation-form .cta-main {
    flex: 1;
    display: flex;
    align-items: center;
    background-color: #E75A0D;
    padding: 20px 24px;
    border-radius: 10px 0 0 10px;
    height: 64px;
    box-sizing: border-box;
}

.disposeo-estimation-form .cta-text {
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    letter-spacing: 1px;
    white-space: nowrap;
}

.disposeo-estimation-form .cta-arrow-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 59px;
    height: 64px;
    overflow: hidden;
}

.disposeo-estimation-form .cta-arrow-bg {
    position: absolute;
    inset: 0;
    background-color: #E75A0D;
    border-radius: 0 10px 10px 10px;
}

.disposeo-estimation-form .cta-arrow-icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 59px;
    height: 64px;
    background-color: #66000E;
    border-radius: 10px 10px 10px 0;
}

.disposeo-estimation-form .cta-arrow-icon svg {
    width: 15px;
    height: 15px;
    transform: translate(-50%, 50%);
    position: absolute;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.disposeo-estimation-form .cta-arrow-icon svg:first-child {
    bottom: 50%;
    left: 50%;
}

.disposeo-estimation-form .cta-arrow-icon svg:last-child {
    bottom: -14px;
    left: -14px;
}

.disposeo-estimation-form .estimation-cta:hover svg:first-child {
    bottom: calc(100% + 14px);
    left: calc(100% + 14px);
}

.disposeo-estimation-form .estimation-cta:hover svg:last-child {
    bottom: 50%;
    left: 50%;
}

/* Hover effect on main button */
.disposeo-estimation-form .estimation-cta:hover .cta-main {
    background-color: #E75A0D;
}

.disposeo-estimation-form .estimation-cta:hover .cta-arrow-icon {
    background-color: #520009;
}

/* Mobile button - hidden by default */
.disposeo-estimation-form .estimation-cta--mobile {
    display: none;
}

/* Google Reviews Section */
.disposeo-estimation-form .google-reviews-section {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.disposeo-estimation-form .google-reviews-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.disposeo-estimation-form .google-reviews-link:hover {
    opacity: 0.8;
}

.disposeo-estimation-form .google-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.disposeo-estimation-form .google-logo svg {
    width: 15px;
    height: 16px;
}

.disposeo-estimation-form .google-stars {
    display: flex;
    align-items: center;
    gap: 4.667px;
}

.disposeo-estimation-form .google-stars .star {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.disposeo-estimation-form .google-reviews-text {
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #140003;
    line-height: 18px;
    white-space: nowrap;
}

/* Popup */
.disposeo-estimation-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.disposeo-estimation-popup .popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.disposeo-estimation-popup .popup-container {
    position: relative;
    display: flex;
    max-width: 680px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.disposeo-estimation-popup .popup-image {
    flex-shrink: 0;
    width: 230px;
    background: #f5f5f5;
    overflow: hidden;
}

.disposeo-estimation-popup .popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.disposeo-estimation-popup .popup-content {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.disposeo-estimation-popup .popup-header {
    display: flex;
    justify-content: flex-end;
    padding: 20px;
}

.disposeo-estimation-popup .popup-close {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
    display: flex;
}

.disposeo-estimation-popup .popup-close:hover {
    opacity: 0.7;
    background: none;
}

.disposeo-estimation-popup .popup-body {
    flex: 1;
    padding: 16px 32px 32px;
}

/* Loading State */
.disposeo-estimation-popup .result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 20px;
    color: #66000E;
    font-size: 16px;
    font-family: "Poppins", sans-serif;
}

.disposeo-estimation-popup .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(231, 90, 13, 0.2);
    border-top-color: #E75A0D;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Estimation Results */
.estimation-result {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.estimation-result .result-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.estimation-result .result-title {
    margin: 0;
    font-family: "all-round-gothic", sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #66000E;
    line-height: 1;
}

.estimation-result .result-subtitle {
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-size: 12px;
    font-style: italic;
    color: #66000E;
    font-weight: 400;
    letter-spacing: 0.12px;
}

/* Price Box */
.estimation-result .result-price-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px;
    background: rgba(231, 90, 13, 0.02);
    border: 1px solid rgba(231, 90, 13, 0.1);
    border-radius: 8px;
}

.estimation-result .result-price-box .price-label {
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #66000E;
    line-height: 18px;
}

.estimation-result .result-price-box .price-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.estimation-result .result-price-box .price-amount {
    font-family: "all-round-gothic", sans-serif;
    font-size: 40px;
    font-weight: 700;
    color: #E75A0D;
    line-height: 1;
}

.estimation-result .result-price-box .price-amount small {
    font-size: 20px;
    font-weight: 400;
}

.estimation-result .result-price-box .price-currency {
    font-family: "all-round-gothic", sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #E75A0D;
}

/* Result Actions */
.estimation-result .result-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Primary CTA Button */
.estimation-result .result-cta-primary {
    display: flex;
    align-items: stretch;
    width: 100%;
    text-decoration: none;
}

.estimation-result .result-cta-primary .cta-main {
    flex: 1;
    display: flex;
    align-items: center;
    background-color: #E75A0D;
    padding: 20px 24px;
    border-radius: 10px 0 0 10px;
}

.estimation-result .result-cta-primary .cta-text {
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    letter-spacing: 1px;
    white-space: nowrap;
}

.estimation-result .result-cta-primary .cta-arrow-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 59px;
    height: 64px;
    overflow: hidden;
}

.estimation-result .result-cta-primary .cta-arrow-bg {
    position: absolute;
    inset: 0;
    background-color: #E75A0D;
    border-radius: 0 10px 10px 10px;
}

.estimation-result .result-cta-primary .cta-arrow-icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 59px;
    height: 64px;
    background-color: #66000E;
    border-radius: 10px 10px 10px 0;
}

.estimation-result .result-cta-primary .cta-arrow-icon svg {
    width: 14px;
    height: 14px;
    transform: translate(-50%, 50%);
    position: absolute;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.estimation-result .result-cta-primary .cta-arrow-icon svg:first-child {
    bottom: 50%;
    left: 50%;
}

.estimation-result .result-cta-primary .cta-arrow-icon svg:last-child {
    bottom: -14px;
    left: -14px;
}

.estimation-result .result-cta-primary:hover .cta-arrow-icon svg:first-child {
    bottom: calc(100% + 14px);
    left: calc(100% + 14px);
}

.estimation-result .result-cta-primary:hover .cta-arrow-icon svg:last-child {
    bottom: 50%;
    left: 50%;
}

.estimation-result .result-cta-primary:hover .cta-main {
    background-color: #d14f0a;
}

.estimation-result .result-cta-primary:hover .cta-arrow-bg {
    background-color: #d14f0a;
}

.estimation-result .result-cta-primary:hover .cta-arrow-icon {
    background-color: #520009;
}

/* Secondary CTA Link */
.estimation-result .result-cta-secondary {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.estimation-result .result-cta-secondary .cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #F9F5F1;
    border-radius: 100px;
    box-sizing: border-box;
}

.estimation-result .result-cta-secondary .cta-icon svg {
    width: 100%;
}

.estimation-result .result-cta-secondary .cta-text {
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #140003;
    text-decoration: underline;
}

.estimation-result .result-cta-secondary:hover .cta-text {
    color: #66000E;
}

/* Message Boxes */
.estimation-result .result-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    text-align: left;
}

.estimation-result .result-message svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.estimation-result .result-message p {
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #140003;
}

.estimation-result .result-message--info {
    background: rgba(231, 90, 13, 0.05);
    border: 1px solid rgba(231, 90, 13, 0.2);
}

.estimation-result .result-message--info svg {
    color: #E75A0D;
}

.estimation-result .result-message--warning {
    background: #FFF3E0;
    border: 1px solid #FFCC80;
}

.estimation-result .result-message--warning svg {
    color: #EF6C00;
}

.estimation-result .result-message--error {
    background: #FFEBEE;
    border: 1px solid #EF9A9A;
}

.estimation-result .result-message--error svg {
    color: #D32F2F;
}

/* Close Button in Error State */
.estimation-result .popup-close-btn {
    margin-top: 10px;
    padding: 12px 32px;
    background: #F9F5F1;
    border: none;
    border-radius: 8px;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #140003;
    cursor: pointer;
    transition: background 0.2s ease;
}

.estimation-result .popup-close-btn:hover {
    background: #efe9e3;
}

/* Responsive */
@media (max-width: 768px) {
    .disposeo-estimation-popup .popup-container {
        flex-direction: column;
        max-width: 400px;
    }

    .disposeo-estimation-popup .popup-image {
        display: none;
    }

    .disposeo-estimation-popup .popup-body {
        padding: 16px 24px 24px;
    }

    .estimation-result .result-cta-primary .cta-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .estimation-result .result-cta-primary .cta-main {
        padding: 16px 20px;
    }

    .estimation-result .result-cta-primary .cta-arrow-wrapper {
        width: 50px;
        height: 56px;
    }

    .estimation-result .result-cta-primary .cta-arrow-icon {
        width: 50px;
        height: 56px;
    }
}

@media screen and (max-width: 1024px) {
    .disposeo-estimation-form {
        padding: 6px;
    }

    .disposeo-estimation-form .wrapper {
        padding: 16px;
    }

    .disposeo-estimation-form h2 {
        font-size: 20px !important;
        line-height: normal !important;
    }

    .disposeo-estimation-popup {
        padding: 0;
        align-items: flex-end;
    }

    .disposeo-estimation-popup .popup-container {
        border-radius: 16px 16px 0 0;
    }

    .disposeo-estimation-popup .popup-header {
        padding: 16px 20px;
    }

    .disposeo-estimation-popup .popup-body {
        padding: 16px 20px 32px;
    }

    /* Hide desktop button, show mobile button */
    .disposeo-estimation-form .estimation-cta--desktop {
        display: none;
    }

    .disposeo-estimation-form .estimation-cta--mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: 100%;
        padding: 20px 24px;
        background-color: #E75A0D;
        border: none;
        border-radius: 10px;
        cursor: pointer;
        font-family: inherit;
    }

    .disposeo-estimation-form .estimation-cta--mobile .cta-text {
        font-family: "Poppins", sans-serif;
        font-size: 16px;
        font-weight: 500;
        color: #fff;
        letter-spacing: 1px;
    }

    .disposeo-estimation-form .estimation-cta--mobile svg {
        width: 12px;
        height: 16px;
        flex-shrink: 0;
    }
}