:root {
    --bg-white: #ffffff;
    --text-black: #000000;
    --text-muted: rgba(0, 0, 0, 0.47);
    --border-soft: rgba(0, 0, 0, 0.27);
    --map-placeholder: #7D7B7B;
    --font-poppins: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-poppins);
    background-color: var(--bg-white);
    color: var(--text-black);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.Estimator {
    width: 100%;
    max-width: 1728px;
    /* Based on prompt's design width */
    height: 100vh;
    position: relative;
    background: white;
}

/* Header Section */
.Header {
    width: 100%;
    height: 75px;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
    /* Subtle divider */
}

.SpartanxLogoGrey {
    position: absolute;
    left: 36px;
    top: 22px;
    width: 195px;
    height: 33px;
}

.SpartanxLogoGrey img {
    width: 100%;
    height: auto;
}

.OnlineEstimator {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 19px;
    width: 436px;
    color: var(--text-muted);
    font-size: 33px;
    font-weight: 400;
    text-align: center;
}

.RestartContainer {
    position: absolute;
    right: 36px;
    /* 1728 - 1554 - 138 = 36 */
    top: 13px;
    width: 138px;
    height: 49px;
}

.Restart {
    width: 100%;
    height: 100%;
    border-radius: 50px;
    border: 1px solid var(--border-soft);
    background: transparent;
    color: var(--text-black);
    font-family: var(--font-poppins);
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
}

.Restart:hover {
    background: rgba(0, 0, 0, 0.02);
    border-color: var(--text-black);
}

/* Main Content Area */
.Maincontent {
    position: absolute;
    left: 50%;
    top: 24%;
    transform: translateX(-50%);
    width: 80%;
    height: 500px;
    display: flex;
}

.Left {
    width: 40%;
    height: 100%;
    position: relative;
    flex-shrink: 0;
}

.PaylessforpowerSvg {
    position: absolute;
    width: 100%;
    bottom: 1.5%;
    padding-right: 20px;
}

.PaylessforpowerSvg img {
    width: 100%;
    max-height: 500px;
}

.Right {
    width: 60%;
    height: 100%;
    position: relative;
}




/* Step 1 Styles */
.EnterYourAddress {
    position: absolute;
    left: 0px;
    top: -10px;
    width: 436px;
    color: var(--text-black);
    font-size: 33px;
    font-weight: 400;
}

.address-field {
    position: absolute;
    left: 0px;
    top: 65px;
    width: 100%;
}

.address-field input {
    width: 100%;
    border: none;
    font-size: 28px;
    padding: 10px 0;
    font-family: var(--font-poppins);
    outline: none;
    background: transparent;
}

.Line1 {
    position: absolute;
    left: 0px;
    top: 120px;
    width: 60%;
    height: 1px;
    background: var(--text-black);

}

.Mapcontainer {
    position: absolute;
    left: 0px;
    top: 140px;
    width: 100%;
    height: 340px;
    background: var(--map-placeholder);
    border-radius: 20px;
    overflow: hidden;
}

.Mapcontainer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#map {
    width: 100%;
    height: 100%;
}

/* Google Autocomplete dropdown styling */
.pac-container {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    font-family: var(--font-poppins);
    margin-top: 6px;
}

.pac-item {
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer;
}

.pac-item:hover {
    background: #f0f6ff;
}


/* Bill Step — input group */
.step-input-group {
    position: relative;
}

/* Bill amount input row — sits below the heading like .address-field */
.bill-input-container {
    position: absolute;
    left: 0;
    top: 65px;
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.currency {
    font-family: var(--font-poppins);
    font-size: 60px;
    font-weight: 300;
    color: #000000;
    line-height: 1;
    padding-bottom: 1px;
    margin-top: -25px;
}

.bill-input-container input[type="number"] {
    border: none;
    font-size: 60px;
    font-family: var(--font-poppins);
    font-weight: 400;
    outline: none;
    background: transparent;
    color: var(--text-black);
    width: 180px;
    padding: 0px 0;
    -moz-appearance: textfield;
    margin-top: -25px;
}

.bill-input-container input[type="number"]::-webkit-outer-spin-button,
.bill-input-container input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Slider — sits below Line1 */
.bill-slider-container {
    position: absolute;
    left: 0;
    top: 88px;
    width: 60%;
    padding-top: 16px;
}

.bill-slider-container input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 1px;
    background: var(--border-soft);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.bill-slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2191FF;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.bill-slider-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.bill-slider-container input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2191FF;
    border: none;
    cursor: pointer;
}

/* Confirm wrapper — sits below the map in the Right column */
.confirm-wrapper {
    position: absolute;
    left: 0;
    top: 490px;
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

.confirm-btn {
    background: linear-gradient(90deg, #2ED47A 0%, #2191FF 100%);
    border: none;
    border-radius: 50px;
    color: #ffffff;
    font-family: var(--font-poppins);
    font-size: 16px;
    font-weight: 500;
    padding: 15px 32px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

/* Bill step: button floated right alongside the dollar input */
.confirm-btn--inline {
    position: absolute;
    right: 0;
    top: 68px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.confirm-btn--inline:hover {
    background: linear-gradient(90deg, #2ED47A 0%, #15a78c 100%);
    border: none;
}

.confirm-wrapper--results {
    position: relative;
    top: auto;
    margin-top: 32px;
}

.confirm-btn:hover {
    background: linear-gradient(90deg, #2ED47A 0%, #15a78c 100%);
    border-color: var(--text-black);
}

/* Results Card Styling */
.results-card {
    position: relative;
    display: flex;
    justify-content: center;
}

.results-bg {
    position: absolute;
    top: -210px;
    width: 1126px;
    height: 938px;
    object-fit: contain;
    display: flex;
    justify-content: center;
    align-items: center;
}

.results-overlay {
    position: absolute;
    top: -40px;
    width: 850px;
    height: 600px;
    font-family: var(--font-poppins);
}

.location-row {
    position: absolute;
    top: 40px;
    left: 55px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #333;
}

.pin-icon {
    width: 50px;
    height: 50px;
}

.location-text {
    font-size: 32px;
    font-weight: 300;
    width: 540px;
}

.reduction-text {
    position: absolute;
    top: 200px;
    left: 89px;
    font-size: 29px;
    font-weight: 300;
    width: 540px;
}

.stat-reduction {
    position: absolute;
    top: 260px;
    left: 118px;
    font-size: 58px;
    font-weight: 500;
    color: #2191FF;
}

.increase-text {
    position: absolute;
    top: 200px;
    right: -157px;
    font-size: 29px;
    font-weight: 300;
    width: 540px;
}

.stat-increase {
    position: absolute;
    top: 260px;
    right: 80px;
    font-size: 58px;
    font-weight: 500;
    color: #2191FF;
}

.upfront-cost {
    position: absolute;
    bottom: 35px;
    left: 220px;
    transform: translateX(-50%);
    font-size: 37px;
    font-weight: 400;
    color: #555;
}

.results-btn-container {
    position: absolute;
    bottom: 25px;
    right: 40px;
}

.results-btn {
    background: linear-gradient(90deg, #2ED47A 0%, #2191FF 100%);
    border: none;
    color: white;
    padding: 16px 40px;
    font-weight: 500;
    font-size: 25px;
    letter-spacing: 0.5px;
}

.results-btn:hover {
    background: linear-gradient(310deg, #28c06e 0%, #1a7ae0 100%);
    border: none;
    color: white;
}

/* Tablet / Small Laptop Breakpoint */
@media (max-width: 1330px) {

    .Maincontent {
        position: absolute;

    }
}

/* Mobile Breakpoint */
@media (max-width: 1020px) {
    body {
        height: auto;
        overflow-y: auto;
    }

    .Estimator {
        height: auto;
        min-height: 100vh;
    }

    .Header {
        height: 90px;
    }

    .SpartanxLogoGrey {
        position: absolute;
        left: 20px;
        top: 25px;
        width: 150px;
        /* Slightly smaller for mobile */
    }

    .OnlineEstimator {
        position: absolute;
        left: 20px;
        top: 51px;
        /* Under the logo */
        transform: none;
        width: auto;
        font-size: 14px;
        /* Very small text */
        text-align: left;
        font-weight: 500;
    }

    .RestartContainer {
        display: block;
        /* Restore button */
        position: absolute;
        right: 20px;
        top: 25px;
        width: 110px;
        height: 40px;
    }

    .Restart {
        font-size: 13px;
        height: 100%;
        width: 100%;
    }

    .Maincontent {
        position: relative;
        left: 0;
        top: 50px;
        transform: none;
        width: 100%;
        height: auto;
        flex-direction: column;
        padding-left: 10%;
        padding-right: 10%;
    }

    .Left {
        width: 100%;
        height: auto;
        display: flex;
        justify-content: center;
    }

    .PaylessforpowerSvg {
        position: relative;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
        margin-bottom: 20px;
    }

    .Right {
        width: 100%;
        height: auto;
    }

    .EnterYourAddress {
        position: relative;
        top: 0;
        width: 100%;
        font-size: 28px;
        text-align: left;
        margin-bottom: 30px;
    }

    .address-field {
        position: relative;
        top: 0;
    }

    .address-field input {
        font-size: 20px;
        text-align: left;
    }

    .bill-input-container,
    .bill-slider-container {
        position: relative;
        left: 0;
        top: -4px;
        width: 60%;
        margin-bottom: -40px;
    }

    .bill-input-container {
        display: flex;
        justify-content: flex-start;
    }

    .Line1 {
        position: absolute;
        top: 126px;
    }

    .Mapcontainer {
        position: relative;
        top: 0;
        margin-top: 70px;
        min-height: 470px;
        width: 110%;
        margin-left: -5%;
    }

    .bill-banner {
        margin-top: 95px;
    }
}

/* Smooth Swap Transition for Results Page (Desktop Only) */
@media (min-width: 1461px) {

    .Left,
    .Right,
    .Maincontent {
        transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1),
            left 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    }

    .results-active .Left {
        transform: translateX(150%);
    }

    .results-active .Right {
        transform: translateX(-66.67%);
    }
}

/* Results Page mobile layout starts earlier at 1460px */
@media (max-width: 1460px) {
    .results-active .Maincontent {
        position: relative;
        left: 0 !important;
        top: 50px;
        transform: none !important;
        width: 100%;
        height: auto;
        flex-direction: column;
        padding-left: 10%;
        padding-right: 10%;
    }

    .results-card {
        margin-top: 45px;
    }

    .results-active .Left,
    .results-active .Right {
        width: 100%;
        height: auto;
        transform: none !important;
        transition: none !important;
    }

    .results-active .PaylessforpowerSvg {
        position: relative;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
        margin-bottom: 20px;
    }

    .results-active .Left {
        display: flex;
        justify-content: center;
    }
}

/* Results card scaling <900px */
@media (max-width: 900px) {

    .results-card {
        scale: 0.9;

    }
}

/* Results card scaling <800px */
@media (max-width: 800px) {

    .results-card {
        scale: 0.8;

    }

    .results-btn-container {
        bottom: -145px;
        right: 334px;
        scale: 1.2;
    }

    .upfront-cost {
        bottom: 44px;
        left: 420px;
    }
}

/* Results card scaling <700px */
@media (max-width: 700px) {

    .results-card {
        scale: 0.7;

    }

    .results-btn-container {
        bottom: -185px;
        right: 334px;
        scale: 1.3;
    }
}

/* Results card scaling <600px */
@media (max-width: 600px) {

    .results-card {
        scale: 0.6;

    }
}

/* Results card scaling <500px */
@media (max-width: 500px) {

    .results-card {
        scale: 0.5;

    }
}

/* Lead Capture & Success Transitions */

.ContactSection,
.FinalSection {
    display: none;
    position: absolute;
    left: 50%;
    top: 15%;
    transform: translateX(-50%);
    width: 600px;
    text-align: center;
    font-family: var(--font-poppins);
    z-index: 100;
}

/* Show classes triggered by JS */
.ContactSection.active,
.FinalSection.active {
    display: block;
}

/* Animations */
.move-fade-out-up {
    animation: fadeOutUp 0.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.move-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.move-fade-out-down {
    animation: fadeOutDown 0.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes fadeOutUp {
    0% {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -100px);
        visibility: hidden;
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translate(-50%, 100px);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes fadeOutDown {
    0% {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, 100px);
        visibility: hidden;
    }
}

/* Contact Page Styles */
.ContactHeader img {
    max-width: 400px;
    height: auto;
    margin-bottom: 20px;
}

.ContactInstruction {
    font-size: 24px;
    font-weight: 300;
    color: #333;
    margin-bottom: 30px;
}

.ContactForm {
    width: 100%;
}

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

.form-group input {
    width: 80%;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #ddd;
    background: #fff;
    font-family: var(--font-poppins);
    font-size: 18px;
    font-weight: 300;
    color: #333;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: border-color 0.2s;
}

.form-group input::placeholder {
    color: #aaa;
}

.form-group input:focus {
    outline: none;
    border-color: #2191FF;
}

.form-btn-container {
    margin-top: 40px;
}

/* Final Success Page Styles */
.FinalSection {
    top: 20%;
}

.FinalHeader img {
    max-width: 350px;
    height: auto;
    margin-bottom: 30px;
}

.FinalMessage {
    font-size: 24px;
    line-height: 1.4;
    font-weight: 300;
    color: #344054;
    margin-bottom: 50px;
}

.FinalBtnContainer .confirm-btn {
    background: #2191FF !important;
    border: none !important;
    padding: 16px 50px;
}

.FinalBtnContainer .confirm-btn:hover {
    background: #1a7ae0 !important;
}

/* Tablet/Mobile Overrides for Lead Capture */
@media (max-width: 1020px) {

    .ContactSection,
    .FinalSection {
        width: 90%;
        top: 100px;
    }

    .ContactInstruction,
    .FinalMessage {
        font-size: 20px;
    }
}

/* Results Loading State */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    width: 100%;
}

.loader-dial {
    width: 120px;
    height: 120px;
    animation: rotate-loader 1.5s linear infinite;
}

@keyframes rotate-loader {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.fade-out {
    opacity: 0 !important;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.fade-in {
    opacity: 1 !important;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}