/* =========================================
   Niveau Calculators - Convera Theme Integration
   Theme Primary: #da2126  Dark: #263545  Accent: #da2126
========================================= */
:root {
    --calc-primary: #da2126;
    --calc-primary-2: #b5181d;
    --calc-dark: #263545;
    --calc-accent: #da2126;
    --calc-accent-2: #da2126;
    --calc-muted: #4f5c69;
    --calc-line: #e2e8f0;
    --calc-soft: #f8fafc;
    --calc-card-bg: #ffffff;
}

/* Calculator Listing Grid using Niveau theme classes */
.calc_listing_section {
    padding: 80px 0;
}

.calc_badge_tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(218, 33, 38, 0.1);
    color: #da2126;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    margin-bottom: 12px;
}

/* Ensure FontAwesome inside Convera theme service icon is centered and properly visible */
.tj-service-item-main .tj-service-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 32px !important;
    color: #da2126 !important;
    transition: all 0.3s ease-in-out !important;
}

.tj-service-item-main:hover .tj-service-icon {
    background-color: #da2126 !important;
    border-color: #da2126 !important;
    color: #ffffff !important;
}

.tj-service-item-main .tj-service-icon i {
    display: inline-block !important;
    line-height: 1 !important;
    font-size: 30px !important;
    color: inherit !important;
    transition: all 0.3s ease-in-out !important;
}

/* Single calculator layout */
.calc_single_section {
    padding: 80px 0 100px;
    background-color: var(--tj-color-theme-bg-2, #f5f7fa);
}

.calc_wrap {
    background: #ffffff;
    border: 1px solid var(--calc-line);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(38, 53, 69, 0.06);
    padding: 40px;
    margin-bottom: 40px;
}

.calc_head_bar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--calc-line);
}

.calc_head_bar .ch_icon {
    width: 68px;
    height: 68px;
    min-width: 68px;
    background: linear-gradient(135deg, #da2126 0%, #b5181d 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 28px;
    box-shadow: 0 8px 20px rgba(218, 33, 38, 0.25);
}

.calc_head_bar .ch_icon i {
    color: #ffffff !important;
    font-size: 28px !important;
    line-height: 1 !important;
}

.calc_head_bar h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--calc-dark);
    margin: 0 0 6px;
}

.calc_head_bar p {
    color: var(--calc-muted);
    margin: 0;
    font-size: 15px;
}

/* Inputs Column */
.calc_inputs {
    padding-right: 30px;
    border-right: 1px solid var(--calc-line);
}

.calc_field {
    margin-bottom: 24px;
}

.calc_field label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--calc-dark);
    margin-bottom: 10px;
}

.calc_field label .val_badge {
    background: rgba(218, 33, 38, 0.12);
    color: #da2126;
    padding: 3px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--tj-ff-manrope, 'Manrope', sans-serif);
}

.calc_field input[type=number],
.calc_field select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--calc-line);
    border-radius: 12px;
    font-size: 15px;
    color: var(--calc-dark);
    background: #ffffff;
    outline: none;
    transition: 0.25s;
    font-family: var(--tj-ff-inter, 'Inter', sans-serif);
}

.calc_field input[type=number]:focus,
.calc_field select:focus {
    border-color: var(--calc-primary);
    box-shadow: 0 0 0 3px rgba(218, 33, 38, 0.12);
}

.calc_field input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 6px;
    margin-top: 14px;
    background: linear-gradient(90deg, #da2126 0%, #da2126 100%);
    cursor: pointer;
}

.calc_field input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid #da2126;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.calc_field input[type=range]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid #da2126;
    cursor: pointer;
}

/* Toggle Tabs */
.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: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--calc-line);
    background: #ffffff;
    color: var(--calc-dark);
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
    font-size: 14px;
}

.calc_toggle .ct_btn.active {
    background: #da2126;
    color: #ffffff;
    border-color: #da2126;
    box-shadow: 0 4px 12px rgba(218, 33, 38, 0.25);
}

/* Results Column */
.calc_results {
    padding-left: 10px;
}

.calc_results h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--calc-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.calc_result_main {
    background: linear-gradient(135deg, #da2126 0%, #b5181d 100%);
    border-radius: 18px;
    padding: 24px 20px;
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(218, 33, 38, 0.2);
}

.calc_result_main span {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.calc_result_main strong {
    font-size: 34px;
    font-weight: 800;
    color: #ffffff;
    font-family: var(--tj-ff-manrope, 'Manrope', sans-serif);
}

.calc_result_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border: 1px solid var(--calc-line);
    border-radius: 14px;
    background: #f8fafc;
    margin-bottom: 12px;
}

.calc_result_row .crr_label {
    color: var(--calc-muted);
    font-size: 14px;
    font-weight: 500;
}

.calc_result_row .crr_value {
    font-weight: 700;
    color: var(--calc-dark);
    font-size: 17px;
    font-family: var(--tj-ff-manrope, 'Manrope', sans-serif);
}

.calc_results .calc_result_row:last-of-type .crr_value {
    color: #da2126;
}

/* Split Bar */
.calc_chart_wrap {
    margin-top: 24px;
}

.calc_bar {
    height: 14px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    background: var(--calc-line);
}

.calc_bar .cb_invest {
    background: #263545;
}

.calc_bar .cb_return {
    background: #da2126;
}

.calc_legend {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--calc-muted);
    font-weight: 500;
}

.calc_legend .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.calc_legend .dot.invest {
    background: #263545;
}

.calc_legend .dot.return {
    background: #da2126;
}

/* Growth & Lifecycle SVG Chart */
.calc_chart_area {
    margin-top: 26px;
}

.calc_chart_area h5 {
    font-size: 15px;
    font-weight: 700;
    color: var(--calc-dark);
    margin: 0 0 12px;
}

.calc_growth {
    width: 100%;
    position: relative;
}

.calc_growth .cg_svg {
    width: 100%;
    height: auto;
    display: block;
}

.cg_pt {
    fill: #da2126;
    opacity: 0.6;
}

.cg_guide {
    stroke: #da2126;
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.cg_hoverdot {
    fill: #da2126;
    stroke: #ffffff;
    stroke-width: 2.5;
}

.cg_hit {
    cursor: crosshair;
}

.cg_tip {
    position: absolute;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 20;
    background: #263545;
    color: #ffffff;
    border-radius: 10px;
    padding: 9px 13px;
    font-size: 12px;
    line-height: 1.55;
    white-space: nowrap;
    box-shadow: 0 12px 28px rgba(38, 53, 69, 0.35);
}

.cg_tip b {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
}

.cg_tip span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.cg_tip em {
    font-style: normal;
    font-weight: 700;
    margin-left: auto;
    padding-left: 14px;
    color: #ffffff;
}

.cg_tip i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex: none;
}

.cg_tip i.d1 {
    background: #8fa0b5;
}

.cg_tip i.d2 {
    background: #da2126;
}

.cg_tip .tt {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 5px;
    padding-top: 5px;
    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: #da2126;
    font-size: 11px;
    font-weight: 700;
    text-anchor: middle;
}

.cg_invest {
    fill: rgba(38, 53, 69, 0.12);
}

.cg_interest {
    fill: rgba(218, 33, 38, 0.22);
}

.cg_line {
    fill: none;
    stroke: #da2126;
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.cg_invline {
    fill: none;
    stroke: #263545;
    stroke-width: 1.4;
    stroke-dasharray: 5 4;
    opacity: 0.55;
}

.cg_dot {
    fill: #da2126;
    stroke: #ffffff;
    stroke-width: 2;
}

/* HRA Comparison Bars */
.hra_compare {
    margin-top: 24px;
}

.hra_compare h5 {
    font-size: 15px;
    font-weight: 700;
    color: var(--calc-dark);
    margin: 0 0 14px;
}

.hb_row {
    margin-bottom: 12px;
}

.hb_top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--calc-muted);
    margin-bottom: 6px;
    gap: 12px;
}

.hb_label span {
    color: #da2126;
    font-weight: 600;
}

.hb_val {
    font-weight: 700;
    color: var(--calc-dark);
    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(38, 53, 69, 0.3);
    transition: width 0.3s ease;
}

.hb_min .hb_fill {
    background: #da2126;
}

.hb_min .hb_val {
    color: #da2126;
}

/* Explanation Block (Description, Formula, Worked Examples) */
.calc_explain {
    margin-top: 40px;
}

.calc_explain .ce_box {
    background: #ffffff;
    border: 1px solid var(--calc-line);
    border-radius: 24px;
    padding: 36px;
    box-shadow: 0 10px 30px rgba(38, 53, 69, 0.04);
}

.calc_explain h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--calc-dark);
    margin-bottom: 16px;
}

.calc_explain h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--calc-dark);
    margin: 24px 0 12px;
}

.calc_explain p {
    color: var(--calc-muted);
    margin-bottom: 14px;
    line-height: 1.7;
    font-size: 15px;
}

.calc_formula {
    background: #f8fafc;
    border-left: 4px solid #da2126;
    padding: 18px 22px;
    border-radius: 10px;
    font-family: monospace;
    font-size: 15px;
    color: var(--calc-dark);
    margin: 14px 0;
}

.calc_explain ul {
    margin: 0 0 16px 0;
    padding-left: 22px;
    color: var(--calc-muted);
}

.calc_explain ul li {
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 15px;
}

/* Disclaimer Block */
.calc_disclaimer {
    margin-top: 30px;
    padding: 20px 24px;
    border: 1px solid var(--calc-line);
    border-left: 4px solid #da2126;
    border-radius: 14px;
    background: #ffffff;
    color: var(--calc-muted);
    font-size: 13px;
    line-height: 1.7;
}

.calc_disclaimer strong {
    color: var(--calc-dark);
}

/* Sidebar for other calculators */
.calc_sidebar_widget {
    background: #ffffff;
    border: 1px solid var(--calc-line);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(38, 53, 69, 0.04);
}

.calc_sidebar_widget h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--calc-dark);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--calc-line);
}

.calc_sidebar_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.calc_sidebar_list li {
    margin-bottom: 10px;
}

.calc_sidebar_list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--calc-dark);
    font-weight: 500;
    font-size: 14px;
    background: #f8fafc;
    transition: 0.25s ease;
}

.calc_sidebar_list li a:hover,
.calc_sidebar_list li.active a {
    background: #da2126;
    color: #ffffff;
}

.calc_sidebar_list li a i {
    font-size: 12px;
}

/* Nice-select customization inside calculator */
.calc_field .nice-select {
    width: 100% !important;
    float: none !important;
    height: 48px !important;
    line-height: 46px !important;
    border: 1px solid var(--calc-line) !important;
    border-radius: 12px !important;
    padding-left: 16px !important;
    font-size: 15px !important;
    color: var(--calc-dark) !important;
}

.calc_field .nice-select .list {
    width: 100% !important;
}

@media (max-width: 991px) {
    .calc_inputs {
        padding-right: 0;
        border-right: none;
        padding-bottom: 30px;
        margin-bottom: 30px;
        border-bottom: 1px solid var(--calc-line);
    }
    .calc_results {
        padding-left: 0;
    }
    .calc_wrap {
        padding: 24px;
    }
    .calc_explain .ce_box {
        padding: 24px;
    }
    .calc_result_main strong {
        font-size: 28px;
    }
}
