/* ============================================
   Investment Calculator page
   /investments/calculator/
   ============================================ */

/* --- Hero banner --- */
.inv-calculator-bg {
    background: #eef4fb url("../images/banners/investment_calculator.png") no-repeat center right;
    background-size: cover;
}

@media (max-width: 767px) {
    .inv-calculator-bg {
        background-position: 70% center;
    }
}

/* --- Section headings --- */
.inv-calc-heading {
    text-align: center;
    margin: 60px auto 40px;
    max-width: 640px;
}

    .inv-calc-heading h2 {
        color: #111b1d;
    }

    .inv-calc-heading p {
        color: #5f5f5f;
        margin-top: 12px;
    }

/* AXA brand slash: thick skewed stroke, not a "/" character */
.inv-red-slash {
    display: inline-block;
    width: 0.32em;
    height: 0.82em;
    background: #e2001a;
    transform: skewX(-22deg);
    margin: 0 0.28em 0 0.12em;
    vertical-align: -0.02em;
}

/* --- Calculator wrapper --- */
.inv-calc-wrapper {
    margin-bottom: 80px;
}

/* Equal-height columns (Bootstrap 3 floats -> flex) */
@media (min-width: 768px) {
    .inv-calc-wrapper .row {
        display: flex;
    }

        .inv-calc-wrapper .row > [class*="col-"] {
            display: flex;
            flex-direction: column;
            float: none;
        }

    .inv-calc-card,
    .inv-calc-result {
        flex: 1;
    }
}

/* --- Calculator card (left) --- */
.inv-calc-card {
    background: #f7f8f9;
    border: 1px solid #eef0f2;
    border-radius: 16px;
    padding: 28px 24px;
    height: 100%;
}

    .inv-calc-card h3 {
        margin: 0 0 8px;
        color: #111b1d;
    }

.inv-calc-intro {
    color: #5f5f5f;
    margin-bottom: 24px;
}

.inv-calc-field {
    margin-bottom: 22px;
}

    .inv-calc-field label {
        display: block;
        color: #343c3d;
        margin-bottom: 10px;
    }

.inv-calc-error {
    display: block;
    color: #c91432;
    font-size: 13px;
    margin-top: 6px;
    min-height: 16px;
}

/* --- Frequency segmented control --- */
.inv-calc-freq {
    display: flex;
    gap: 12px;
}

.inv-calc-freq-option {
    flex: 1;
    height: 40px;
    padding: 0 8px;
    line-height: 1;
    border: 1px solid #ccd6dd;
    border-radius: 8px;
    background: #ffffff;
    color: #999999;
    font-size: 14px;
    cursor: pointer;
    transition: border-color .15s, color .15s;
}

    .inv-calc-freq-option:hover {
        border-color: #00008f;
        color: #00008f;
    }

    .inv-calc-freq-option.active {
        border-color: #00008f;
        color: #00008f;
        font-weight: 700;
    }

/* --- Sliders --- */
.inv-calc-slider {
    display: flex;
    align-items: center;
    gap: 14px;
}

    .inv-calc-slider input[type="range"] {
        -webkit-appearance: none;
        appearance: none;
        flex: 1;
        width: 100%;
        height: 4px;
        border-radius: 999px;
        background: #ccd6dd;
        outline: none;
    }

        .inv-calc-slider input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #ffffff;
            border: 5px solid #00008f;
            cursor: pointer;
        }

        .inv-calc-slider input[type="range"]::-moz-range-thumb {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #ffffff;
            border: 5px solid #00008f;
            cursor: pointer;
        }

.inv-calc-slider-value {
    width: 58px;
    padding: 8px;
    border: 1px solid #ccd6dd;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    color: #343c3d;
    background: #fff;
    -moz-appearance: textfield;
}

    .inv-calc-slider-value:focus {
        outline: none;
        border-color: #00008f;
    }

    .inv-calc-slider-value::-webkit-outer-spin-button,
    .inv-calc-slider-value::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

.inv-calc-amount-box {
    width: 96px;
}

/* --- Rate chip + note --- */
.inv-calc-rate {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e4e9ee;
    border-radius: 8px;
    background: #fff;
    padding: 4px 10px 4px 4px;
}

    .inv-calc-rate .inv-calc-slider-value {
        border-color: #ccd6dd;
        color: #00008f;
        font-weight: 700;
    }

.inv-calc-rate-note {
    color: #b6bdc4;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Result panel (right, light theme) --- */
.inv-calc-result {
    background: #f3f8fe;
    border: 1px solid #dbe7f5;
    border-radius: 16px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Empty state shows until the first calculation; JS adds .has-result.
   The SVG asset is the full navy panel design, so it fills edge-to-edge */
.inv-calc-result:not(.has-result) {
    padding: 0;
    border: 0;
}

.inv-calc-empty {
    position: relative;
    flex: 1;
    min-height: 420px;
}

    .inv-calc-empty img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 16px;
        display: block;
    }

.inv-calc-result-body {
    display: none;
}

.inv-calc-result.has-result .inv-calc-empty {
    display: none;
}

.inv-calc-result.has-result .inv-calc-result-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Future value headline */
.inv-calc-fv {
    margin-bottom: 16px;
}

    .inv-calc-fv > span {
        display: block;
        color: #00008f;
        font-size: 14px;
        margin-bottom: 6px;
    }

    .inv-calc-fv b {
        color: #00008f;
        font-size: 28px;
        line-height: 1.2;
    }

        .inv-calc-fv b small {
            font-size: 14px;
            color: #1cc54e;
            font-weight: 700;
        }

/* Stat boxes */
.inv-calc-stats {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.inv-calc-stat {
    flex: 1;
    min-width: 150px;
    background: #ffffff;
    border: 1px solid #e0e8f0;
    border-radius: 10px;
    padding: 12px 14px;
}

    .inv-calc-stat span {
        display: block;
        color: #767676;
        margin-bottom: 4px;
    }

    .inv-calc-stat b {
        color: #00008f;
        font-size: 18px;
    }

.inv-calc-stat-interest b {
    color: #1cc54e;
}

.inv-calc-disclaimer {
    color: #9aa4ad;
    font-size: 12px;
    font-style: italic;
    margin-bottom: 16px;
}

.inv-calc-chart {
    position: relative;
    flex: 1;
    min-height: 220px;
    margin-bottom: 20px;
    background: #ffffff;
    border: 1px solid #e0e8f0;
    border-radius: 10px;
    padding: 12px;
}

    .inv-calc-chart canvas {
        max-width: 100%;
    }

.inv-calc-result .button {
    background: #ffffff;
}

/* --- CTA band --- */
.inv-calc-cta {
    background: #00008f;
    color: #ffffff;
    overflow: hidden;
}

    .inv-calc-cta .container {
        position: relative;
    }

    .inv-calc-cta h2 {
        color: #ffffff;
        padding-top: 56px;
    }

    .inv-calc-cta p {
        color: rgba(255, 255, 255, 0.85);
        margin: 14px 0 28px;
    }

.inv-calc-cta-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 56px;
}

    .inv-calc-cta-buttons .button.white span {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

.inv-cta-store-icon {
    vertical-align: middle;
}

/* Phone is anchored top-right and cropped by the band's bottom edge
   (band height comes from the text column; section has overflow:hidden) */
@media (min-width: 992px) {
    .inv-calc-cta-phone img {
        position: absolute;
        top: 36px;
        right: 4%;
        width: 290px;
        max-width: none;
        display: block;
    }
}

@media (max-width: 991px) {
    .inv-calc-cta {
        text-align: center;
    }

    .inv-calc-cta h2 {
        max-width: 620px;
        margin: 0 auto;
        line-height: 1.08;
    }

    .inv-calc-cta p {
        max-width: 540px;
        margin-left: auto;
        margin-right: auto;
    }

    .inv-calc-cta-buttons {
        justify-content: center;
        padding-bottom: 36px;
    }

    .inv-calc-cta-phone img {
        display: block;
        width: 100%;
        max-width: 220px;
        margin: 0 auto -60px;
    }
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .inv-calc-cta h2 {
        padding-top: 44px;
        font-size: 30px;
        line-height: 1.12;
    }

    .inv-calc-cta p {
        margin-top: 18px;
        margin-bottom: 28px;
        line-height: 1.5;
    }

    .inv-calc-cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding-bottom: 40px;
    }

    .inv-calc-cta-buttons .button {
        margin: 0;
    }

    .inv-calc-cta-phone img {
        max-width: 210px;
        margin-bottom: -48px;
    }

    .inv-calc-result {
        margin-top: 24px;
        height: auto;
    }

    .inv-calc-chart {
        min-height: 200px;
    }

    .inv-calc-rate {
        padding-right: 6px;
    }
}

/* --- Floating app download CTA --- */
.inv-calc-app-float {
    position: fixed;
    /* sits just past the vertical middle, clear of the fixed Live Support tab
       (38px wide, right:0, centred vertically) */
    top: calc(50% + 60px);
    right: 62px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: 6px;
    background: #00008f;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0, 0, 143, 0.25);
    transition: background 0.2s ease, transform 0.2s ease;
}

    .inv-calc-app-float:hover,
    .inv-calc-app-float:focus {
        background: #000073;
        color: #ffffff;
        text-decoration: none;
        transform: translateY(-2px);
    }

    .inv-calc-app-float .inv-cta-store-icon {
        flex: none;
    }

@media (max-width: 767px) {
    .inv-calc-app-float {
        top: auto;
        bottom: 20px;
        right: 16px;
        left: 16px;
        justify-content: center;
        padding: 13px 18px;
        font-size: 14px;
    }
}
