.cfp-loan-calculator {
    font-family: "Outfit", sans-serif;
}

.cfp-loan-calculator,
.cfp-loan-calculator * {
    box-sizing: border-box;
}

.calculator-container {
    display: flex;
    gap: 5rem;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.calculator-card {
    padding: 2rem;
    border-radius: 20px;
}

.calculator-inputs {
    flex: 1;
    min-width: 480px;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: transparent;
    color: #fff;
}

.input-block {
    display: flex;
    flex-direction: column;
}

.input-block label {
    margin-bottom: 0.75rem;
    font-family: "NM", Sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: #000;
}

.amount-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.2rem 1.25rem;
    border: 2px solid #3c3c3c;
    border-radius: 99px;
    background: #fff;
}

.amount-input-wrapper::before {
    content: "£";
    position: absolute;
    top: 50%;
    left: 1.25rem;
    transform: translateY(-50%);
    font-size: 2rem;
    font-weight: 700;
    color: #000;
    pointer-events: none;
}

.amount-input-wrapper input {
    width: 100%;
    padding-left: 2rem;
    border: 0;
    outline: 0;
    background: none;
    color: #000;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    appearance: textfield;
}

.amount-input-wrapper input::-webkit-outer-spin-button,
.amount-input-wrapper input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.amount-input-wrapper:focus-within {
    box-shadow: none;
    border-color: #3c3c3c;
}

.cfp-loan-calculator input[type="range"] {
    width: 100%;
    margin: 15px 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.cfp-loan-calculator input[type="range"]:focus {
    outline: 0;
}

.cfp-loan-calculator input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(to right, #f84f5f var(--slider-progress, 0%), #000 var(--slider-progress, 0%)) !important;
    cursor: pointer;
}

.cfp-loan-calculator input[type="range"]::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    margin-top: -8px;
    border: 2px solid #f84f5f;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    -webkit-appearance: none;
}

.cfp-loan-calculator input[type="range"]::-moz-range-track {
    height: 8px;
    border-radius: 10px;
    background: linear-gradient(to right, #f84f5f var(--slider-progress, 0%), #000 var(--slider-progress, 0%)) !important;
    cursor: pointer;
}

.cfp-loan-calculator input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border: 2px solid #f84f5f;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.term-options {
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
}

.term-options input[type="radio"] {
    display: none;
}

.term-options label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin-bottom: 0;
    border: 2px solid #3c3c3c;
    border-radius: 50%;
    background: #fff;
    color: #3c3c3c;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.term-options input[type="radio"]:checked + label {
    border: 0;
    background: #f84f5f;
    color: #fff;
}

.select-wrapper {
    position: relative;
}

.select-wrapper select {
    width: 100%;
    padding: 0.75rem 1.25rem;
    border: 2px solid #3c3c3c;
    border-radius: 99px;
    background: #fff;
    color: #000;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
}

.select-wrapper::after {
    content: "▼";
    position: absolute;
    top: 50%;
    right: 1.25rem;
    transform: translateY(-50%);
    color: #000;
    font-size: 1rem;
    pointer-events: none;
}

.calculator-results {
    flex: 1;
    min-width: 530px;
    max-width: 530px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 3px solid #f84f5f;
    background: #fff;
    color: #000;
}

.results-header {
    text-align: left;
}

.results-header .term-display,
.results-header .apr-display {
    font-size: 1.1rem;
    font-weight: 600;
    color: #555;
}

.results-header .monthly-payment {
    margin: 0.5rem 0;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.results-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 2rem 0;
}

.detail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-radius: 12px;
    background: #f5f5f5;
}

.detail-item span {
    color: #000;
    font-weight: 700;
}

.detail-item strong {
    font-size: 1.1rem;
    font-weight: 700;
}

.get-quote-btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0;
}

.get-quote-btn {
    width: 100%;
    padding: 1rem 2rem;
    border: 0;
    border-radius: 50px;
    background: #f84f5f;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.get-quote-btn:hover,
.get-quote-btn:focus-visible {
    background: #000;
    color: #fff;
}

:root {
    --btn-width: 389px;
    --btn-height: 94px;
    --wave-width: calc(var(--btn-width) + 24px);
    --wave-height: calc(var(--btn-height) + 26px);
    --wave-duration: 2.4s;
    --wave-gap: 0.6s;
}

.container {
    display: flex;
    justify-content: center;
    padding: 0;
}

.container a {
    text-decoration: none;
}

.wave-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--wave-width);
    max-width: 100%;
    height: calc(var(--wave-height) * 1.05);
    padding: 10px;
    overflow: visible;
}

.quote-button {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1.6vw, 12px);
    width: var(--btn-width);
    max-width: 100%;
    min-height: var(--btn-height);
    height: var(--btn-height);
    padding: 18px 24px;
    border: 0;
    border-radius: 10.08px;
    background: #fff554;
    color: #000;
    font-family: "NM", sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.08;
    text-align: center;
    cursor: pointer;
}

.cta-main {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 10px);
    color: #1f1f1f;
    font-size: 26.23px;
    font-weight: 600;
    white-space: nowrap;
}

.button-text {
    font-weight: 505;
    letter-spacing: 0.02em;
}

.cta-arrow,
.cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.cta-arrow {
    transform: translateY(1px);
    font-size: 22px;
}

.cta-sub {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2.5vw, 10px);
    transform: translateX(-2px);
    color: #3c3c3c;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.cta-icon {
    transform: translateY(-1px);
    font-size: 14px;
}

.cta-arrow svg {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: clamp(2.2px, 0.7vw, 2.7px);
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cta-icon svg {
    display: block;
    width: 1em;
    height: 1em;
    fill: currentColor;
    stroke: none;
}

.cta-icon .keyhole {
    transition: fill 0.2s ease;
}

.wave {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: var(--wave-width);
    height: var(--wave-height);
    border: 2px solid #fff554;
    border-radius: 12px;
    transform: translate(-50%, -50%);
    animation: cfp-pulse var(--wave-duration) linear infinite;
    opacity: 0.6;
}

.wave-2 {
    animation-delay: var(--wave-gap);
}

.quote-button:hover,
.quote-button:focus-visible {
    background: #000;
    color: #fff;
}

.quote-button:hover .cta-main,
.quote-button:hover .cta-sub,
.quote-button:hover .cta-arrow,
.quote-button:hover .cta-icon,
.quote-button:focus-visible .cta-main,
.quote-button:focus-visible .cta-sub,
.quote-button:focus-visible .cta-arrow,
.quote-button:focus-visible .cta-icon {
    color: #fff;
}

.quote-button:hover .cta-icon .keyhole,
.quote-button:focus-visible .cta-icon .keyhole {
    fill: #000;
}

body.home .qodef-qi-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    border: 0 solid transparent;
    text-decoration: none;
    transition: color 0.2s ease-out, background-color 0.2s ease-out, border-color 0.2s ease-out;
}

body.home .qodef-qi-button .qodef-m-text {
    display: inline-flex;
    align-items: center;
}

body.home .qodef-qi-button .qodef-m-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    transition: transform 0.3s cubic-bezier(0, 0.53, 0.18, 0.98), color 0.2s ease-out;
}

body.home .qodef-qi-button .qodef-m-icon svg {
    display: block;
    width: 1em;
    height: 1em;
    fill: currentColor;
}

body.home .qodef-qi-button.qodef-hover--icon-move-horizontal-short:hover .qodef-m-icon {
    transform: translateX(5px);
}

body.home #qodef-back-to-top {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 10000;
    width: 50px;
    height: 50px;
    margin: 0;
    opacity: 0;
    visibility: hidden;
}

body.home #qodef-back-to-top .qodef-back-to-top-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    border-radius: 4px;
    background: #f4f4f4;
    color: #111;
    overflow: hidden;
    transition: color 0.2s ease-out, background-color 0.2s ease-out;
}

body.home #qodef-back-to-top svg {
    display: block;
    width: 18px;
    height: auto;
    fill: transparent;
    stroke: currentColor;
    stroke-width: 40px;
    transform: rotate(-90deg);
    transition: 0.2s ease-out;
}

body.home #qodef-back-to-top:hover svg {
    fill: currentColor;
    stroke: transparent;
}

body.home #qodef-back-to-top.qodef--off {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0s 0.15s;
}

body.home #qodef-back-to-top.qodef--on {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

body.home .elementor-element-bc95f7f .elementor-swiper-button,
body.home .elementor-element-bc95f7f .elementor-swiper-button svg {
    display: none !important;
}

@keyframes cfp-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.85;
    }

    75% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.3;
    }

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

@media only screen and (max-width: 600px) {
    :root {
        --btn-width: 287.43px;
        --btn-height: 79.75px;
        --wave-width: calc(var(--btn-width) + 16px);
        --wave-height: calc(var(--btn-height) + 24px);
    }

    .quote-button {
        gap: 6px;
        padding: 16px 20px;
        border-radius: 7.49px;
    }

    .cta-main {
        gap: 5px;
        font-size: 19.49px;
    }

    .cta-sub {
        gap: 5px;
        font-size: 12px;
    }

    .cta-arrow {
        font-size: clamp(18px, 5.2vw, 20px);
    }

    .cta-icon {
        font-size: clamp(12px, 4.5vw, 16px);
    }

    .wave {
        border-radius: 10px;
    }

    .calculator-container {
        gap: 2rem !important;
    }

    .calculator-inputs,
    .calculator-results {
        min-width: 100%;
        max-width: 100%;
    }
}
