/* ==========================================================================
   True Investment Services - Comprehensive Financial Calculator Stylesheet
   Brand Logo Colors: #1E2568 / #22247A (Navy), #22A838 / #2E7D32 (Leaf Green), #FFFFFF
   Theme Colors: #FBD819 (Theme Gold), #2e2482 (Logo Blue), #7E7E7A
   ========================================================================== */

:root {
    --calc-primary: #1E2568;
    --calc-accent: #22A838;
    --calc-theme-gold: #FBD819;
    --calc-theme-dark: #2e2482;
    --calc-line: #E2E8F0;
    --calc-soft: #F8FAFC;
    --calc-muted: #475569;
    --calc-font: var(--pxn-ff-body, 'Urbanist', sans-serif);
    --calc-heading: var(--pxn-ff-heading, 'Urbanist', sans-serif);
}

.calc-section {
    padding: 70px 0 100px;
    background-color: #f8fafc;
}

/* Calculator Wrapper Card */
.calc_wrap {
    background: #ffffff;
    border: 1px solid var(--calc-line);
    border-radius: 20px;
    padding: 35px 40px 45px;
    box-shadow: 0 10px 30px rgba(46, 36, 130, 0.05);
    margin-bottom: 35px;
}

@media (max-width: 768px) {
    .calc_wrap {
        padding: 25px 20px 35px;
    }
}

/* Head Bar */
.calc_head_bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 25px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--calc-line);
}

.calc_head_bar .ch_icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1E2568 0%, #2e2482 100%);
    color: #FBD819;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(46, 36, 130, 0.15);
}

.calc_head_bar h2 {
    font-size: 26px;
    font-weight: 700;
    color: #2e2482;
    margin: 0 0 4px;
    font-family: var(--calc-heading);
}

.calc_head_bar p {
    font-size: 14.5px;
    color: var(--calc-muted);
    margin: 0;
}

/* Inputs Column */
.calc_inputs {
    padding-right: 25px;
}

@media (max-width: 991px) {
    .calc_inputs {
        padding-right: 0;
        padding-bottom: 30px;
        border-bottom: 1px solid var(--calc-line);
        margin-bottom: 30px;
    }
}

.calc_field {
    margin-bottom: 22px;
}

.calc_field label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: #2e2482;
    margin-bottom: 10px;
    font-family: var(--calc-heading);
}

.calc_field .val_badge {
    background: #1E2568;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    min-width: 70px;
    text-align: center;
    letter-spacing: 0.02em;
}

.calc_field input[type=number],
.calc_field select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #CBD5E1;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #0F172A;
    background: #ffffff;
    outline: none;
    transition: all 0.25s ease;
}

.calc_field input[type=number]:focus,
.calc_field select:focus {
    border-color: var(--calc-accent);
    box-shadow: 0 0 0 3px rgba(34, 168, 56, 0.15);
}

.calc_field input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 6px;
    margin-top: 14px;
    background: linear-gradient(90deg, #1E2568 0%, #22A838 100%);
    cursor: pointer;
}

.calc_field input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid #22A838;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.calc_field input[type=range]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid #22A838;
    cursor: pointer;
}

/* Toggle Switch */
.calc_toggle {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.calc_toggle .ct_btn {
    flex: 1;
    min-width: 110px;
    text-align: center;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid var(--calc-line);
    background: #ffffff;
    color: #2e2482;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 14px;
}

.calc_toggle .ct_btn.active {
    background: #1E2568;
    color: #ffffff;
    border-color: #1E2568;
    box-shadow: 0 4px 12px rgba(30, 37, 104, 0.2);
}

/* Results Column */
.calc_results h4 {
    font-size: 16px;
    color: var(--calc-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 22px;
    font-weight: 700;
}

.calc_result_main {
    background: linear-gradient(135deg, #1E2568 0%, #2e2482 100%);
    border-radius: 18px;
    padding: 26px 24px;
    color: #ffffff;
    text-align: center;
    margin-bottom: 22px;
    box-shadow: 0 8px 24px rgba(46, 36, 130, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.calc_result_main span {
    display: block;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.calc_result_main strong {
    font-size: 34px;
    font-weight: 800;
    color: #FBD819;
    letter-spacing: -0.02em;
}

.calc_result_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border: 1px solid var(--calc-line);
    border-radius: 14px;
    background: #ffffff;
    margin-bottom: 14px;
}

.calc_result_row .crr_label {
    color: var(--calc-muted);
    font-size: 15px;
    font-weight: 500;
}

.calc_result_row .crr_value {
    font-weight: 700;
    color: #2e2482;
    font-size: 18px;
}

.calc_results .calc_result_row:last-of-type .crr_value {
    color: #22A838;
}

/* Split Ratio Bar */
.calc_chart_wrap {
    margin-top: 26px;
}

.calc_bar {
    height: 16px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    background: var(--calc-line);
}

.calc_bar .cb_invest {
    background: #1E2568;
    transition: width 0.3s ease;
}

.calc_bar .cb_return {
    background: #22A838;
    transition: width 0.3s ease;
}

.calc_legend {
    display: flex;
    gap: 24px;
    margin-top: 14px;
    font-size: 14px;
    color: var(--calc-muted);
    font-weight: 600;
    justify-content: center;
}

.calc_legend .dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 7px;
}

.calc_legend .dot.invest {
    background: #1E2568;
}

.calc_legend .dot.return {
    background: #22A838;
}

/* Interactive SVG Growth Chart */
.calc_chart_area {
    margin-top: 28px;
}

.calc_chart_area h5 {
    font-size: 15px;
    font-weight: 700;
    color: #2e2482;
    margin: 0 0 12px;
    font-family: var(--calc-heading);
}

.calc_growth {
    width: 100%;
    position: relative;
}

.calc_growth .cg_svg {
    width: 100%;
    height: auto;
    display: block;
}

.cg_pt {
    fill: #22A838;
    opacity: 0.6;
}

.cg_guide {
    stroke: #1E2568;
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.cg_hoverdot {
    fill: #22A838;
    stroke: #ffffff;
    stroke-width: 2.5;
}

.cg_hit {
    cursor: crosshair;
}

.cg_tip {
    position: absolute;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 10;
    background: #2e2482;
    color: #ffffff;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12.5px;
    line-height: 1.55;
    white-space: nowrap;
    box-shadow: 0 12px 26px rgba(46, 36, 130, 0.35);
    border: 1px solid rgba(251, 216, 25, 0.3);
}

.cg_tip b {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 700;
    color: #FBD819;
}

.cg_tip span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cg_tip em {
    font-style: normal;
    font-weight: 700;
    margin-left: auto;
    padding-left: 16px;
    color: #ffffff;
}

.cg_tip i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex: none;
}

.cg_tip i.d1 {
    background: #1E2568;
}

.cg_tip i.d2 {
    background: #22A838;
}

.cg_tip .tt {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 6px;
    padding-top: 6px;
    font-weight: 700;
}

.cg_grid {
    stroke: #E2E8F0;
    stroke-width: 1;
}

.cg_axis {
    stroke: #CBD5E1;
    stroke-width: 1;
}

.cg_ylab {
    fill: #64748B;
    font-size: 11px;
    text-anchor: end;
}

.cg_xlab {
    fill: #64748B;
    font-size: 11px;
    text-anchor: middle;
}

.cg_rlab {
    fill: #22A838;
    font-size: 11px;
    font-weight: 700;
    text-anchor: middle;
}

.cg_invest {
    fill: rgba(30, 37, 104, 0.15);
}

.cg_interest {
    fill: rgba(34, 168, 56, 0.22);
}

.cg_line {
    fill: none;
    stroke: #22A838;
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.cg_invline {
    fill: none;
    stroke: #1E2568;
    stroke-width: 1.5;
    stroke-dasharray: 5 4;
    opacity: 0.65;
}

/* HRA "least of three" comparison bars */
.hra_compare {
    margin-top: 26px;
}

.hra_compare h5 {
    font-size: 15px;
    font-weight: 700;
    color: #2e2482;
    margin: 0 0 14px;
    font-family: var(--calc-heading);
}

.hb_row {
    margin-bottom: 14px;
}

.hb_top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    color: var(--calc-muted);
    margin-bottom: 6px;
    gap: 12px;
}

.hb_label span {
    color: #22A838;
    font-weight: 700;
}

.hb_val {
    font-weight: 700;
    color: #2e2482;
    white-space: nowrap;
}

.hb_track {
    height: 12px;
    border-radius: 8px;
    background: var(--calc-line);
    overflow: hidden;
}

.hb_fill {
    height: 100%;
    border-radius: 8px;
    background: rgba(30, 37, 104, 0.35);
    transition: width 0.3s ease;
}

.hb_min .hb_fill {
    background: #22A838;
}

.hb_min .hb_val {
    color: #22A838;
}

/* Explanation Block */
.calc_explain {
    margin-top: 35px;
}

.calc_explain .ce_box {
    background: #ffffff;
    border: 1px solid var(--calc-line);
    border-radius: 20px;
    padding: 35px 40px;
    box-shadow: 0 4px 20px rgba(46, 36, 130, 0.04);
}

.calc_explain h3 {
    font-size: 22px;
    color: #2e2482;
    margin-bottom: 14px;
    font-weight: 700;
    font-family: var(--calc-heading);
}

.calc_explain h4 {
    font-size: 18px;
    color: #2e2482;
    margin: 22px 0 10px;
    font-weight: 700;
    font-family: var(--calc-heading);
}

.calc_explain p {
    color: var(--calc-muted);
    margin-bottom: 14px;
    line-height: 1.8;
    font-size: 15px;
}

.calc_formula {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-left: 5px solid #22A838;
    padding: 18px 24px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 700;
    color: #2e2482;
    margin: 14px 0 18px;
    overflow-x: auto;
}

.calc_explain ul {
    margin: 0 0 16px 0;
    padding-left: 22px;
    color: var(--calc-muted);
}

.calc_explain ul li {
    margin-bottom: 9px;
    line-height: 1.7;
    font-size: 15px;
}

/* Regulatory Disclaimer */
.calc_disclaimer {
    margin-top: 35px;
    padding: 22px 28px;
    border: 1px solid rgba(251, 216, 25, 0.4);
    border-left: 5px solid #FBD819;
    border-radius: 12px;
    background: #FFFDF0;
    color: var(--calc-muted);
    font-size: 13px;
    line-height: 1.75;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.calc_disclaimer strong {
    color: #2e2482;
}
