/* ==========================================================================
   Wealthpool / MB Capitals - Financial Calculators Theme Stylesheet
   Designed to seamlessly align with Esonix / Mona Sans Design System
   Primary: #122325 | Secondary: #344c4e | Accent: #02A8A4 | Bg: #fefbf5
   ========================================================================== */

:root {
  --calc-theme-dark: #122325;
  --calc-theme-secondary: #344c4e;
  --calc-theme-accent: #02A8A4;
  --calc-theme-accent-hover: #e5b35f;
  --calc-theme-bg: #fefbf5;
  --calc-theme-soft: #f7f5ef;
  --calc-theme-card-bg: #ffffff;
  --calc-theme-border: rgba(18, 35, 37, 0.09);
  --calc-theme-border-active: #344c4e;
  --calc-theme-text-primary: #122325;
  --calc-theme-text-muted: #727979;
  --calc-theme-success: #2e7d5b;
}

/* ==========================================
   Single Calculator Section & Container
   ========================================== */
.pxn-calculator-single-section {
  background-color: var(--calc-theme-bg);
  padding: 80px 0 100px;
  position: relative;
}

.calc_wrap {
  background: var(--calc-theme-card-bg);
  border: 1px solid var(--calc-theme-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(18, 35, 37, 0.05);
  margin-bottom: 30px;
}

.calc_wrap .row {
  --bs-gutter-x: 0;
}

/* Header Banner inside Calculator Box */
.calc_head_bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 36px;
  background: linear-gradient(135deg, #122325 0%, #1c3538 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.calc_head_bar .ch_icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background-color: var(--calc-theme-accent);
  color: var(--calc-theme-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.calc_head_bar h2 {
  color: #ffffff;
  font-family: var(--pxn-ff-heading);
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
}

.calc_head_bar p {
  color: rgba(254, 251, 245, 0.75);
  margin: 4px 0 0;
  font-size: 14px;
}

/* ==========================================
   Inputs Column
   ========================================== */
.calc_inputs {
  padding: 38px 36px;
  border-right: 1px solid var(--calc-theme-border);
  background-color: #ffffff;
}

.calc_field {
  margin-bottom: 24px;
}

.calc_field:last-child {
  margin-bottom: 0;
}

.calc_field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--pxn-ff-heading);
  font-weight: 600;
  color: var(--calc-theme-text-primary);
  font-size: 14.5px;
  margin-bottom: 10px;
}

.calc_field .val_badge {
  background: var(--calc-theme-secondary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  display: inline-block;
}

.calc_field input[type="number"] {
  width: 100%;
  border: 1.5px solid rgba(18, 35, 37, 0.12);
  border-radius: 12px;
  padding: 10px 16px;
  font-family: var(--pxn-ff-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--calc-theme-text-primary);
  background: #faf9f6;
  transition: all 0.25s ease;
  outline: none;
}

.calc_field input[type="number"]:focus {
  border-color: var(--calc-theme-secondary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(52, 76, 78, 0.12);
}

/* Custom styled Range Slider */
.calc_field input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 6px;
  background: #e5e7eb;
  outline: none;
  margin-top: 12px;
  cursor: pointer;
}

.calc_field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--calc-theme-secondary);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(18, 35, 37, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.calc_field input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.18);
  background: var(--calc-theme-accent);
}

.calc_field input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--calc-theme-secondary);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(18, 35, 37, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.calc_field input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.18);
  background: var(--calc-theme-accent);
}

/* Nice-Select Styling Overrides */
.calc_field .nice-select {
  width: 100%;
  height: 48px;
  line-height: 46px;
  border-radius: 12px;
  border: 1.5px solid rgba(18, 35, 37, 0.12);
  background-color: #faf9f6;
  font-size: 15px;
  font-weight: 600;
  color: var(--calc-theme-text-primary);
  padding: 0 16px;
}

.calc_field .nice-select:focus,
.calc_field .nice-select.open {
  border-color: var(--calc-theme-secondary);
  box-shadow: 0 0 0 3px rgba(52, 76, 78, 0.12);
}

/* Segmented Toggle */
.calc_toggle {
  display: inline-flex;
  background-color: var(--calc-theme-soft);
  padding: 5px;
  border-radius: 30px;
  margin-bottom: 24px;
  border: 1px solid var(--calc-theme-border);
}

.calc_toggle .ct_btn {
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--calc-theme-text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.calc_toggle .ct_btn.active {
  background: var(--calc-theme-dark);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(18, 35, 37, 0.2);
}

/* ==========================================
   Results Column
   ========================================== */
.calc_results {
  padding: 38px 36px;
  background-color: #ffffff;
}

.calc_results h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--calc-theme-text-muted);
  margin-bottom: 18px;
}

.calc_result_main {
  background: linear-gradient(135deg, #fefbf5 0%, #f7f3eb 100%);
  border: 1px solid rgba(251, 203, 121, 0.45);
  border-radius: 18px;
  padding: 22px 26px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 8px 20px rgba(251, 203, 121, 0.12);
}

.calc_result_main span {
  font-size: 13px;
  font-weight: 600;
  color: var(--calc-theme-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calc_result_main strong {
  font-size: 34px;
  font-weight: 800;
  color: var(--calc-theme-dark);
  font-family: var(--pxn-ff-heading);
  line-height: 1.1;
}

.calc_result_row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 4px;
  border-bottom: 1px dashed rgba(18, 35, 37, 0.1);
}

.calc_result_row .crr_label {
  font-size: 14.5px;
  color: var(--calc-theme-text-muted);
  font-weight: 500;
}

.calc_result_row .crr_value {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--calc-theme-dark);
  font-family: var(--pxn-ff-heading);
}

/* Split Ratio Bar */
.calc_chart_wrap {
  margin-top: 18px;
}

.calc_bar {
  height: 12px;
  border-radius: 10px;
  background-color: #eaedf0;
  display: flex;
  overflow: hidden;
  margin-bottom: 10px;
}

.calc_bar .cb_invest {
  background-color: var(--calc-theme-secondary);
  transition: width 0.35s ease;
}

.calc_bar .cb_return {
  background-color: var(--calc-theme-accent);
  transition: width 0.35s ease;
}

.calc_legend {
  display: flex;
  gap: 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--calc-theme-text-muted);
}

.calc_legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.calc_legend .dot.invest {
  background-color: var(--calc-theme-secondary);
}

.calc_legend .dot.return {
  background-color: var(--calc-theme-accent);
}

/* ==========================================
   SVG Growth Chart & Tooltip
   ========================================== */
.calc_chart_area {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--calc-theme-border);
}

.calc_chart_area h5 {
  font-size: 15px;
  font-weight: 700;
  color: var(--calc-theme-dark);
  margin-bottom: 14px;
}

.calc_growth {
  width: 100%;
  position: relative;
}

.calc_growth .cg_svg {
  width: 100%;
  height: auto;
  display: block;
}

.cg_grid {
  stroke: #ecefe6;
  stroke-width: 1;
  stroke-dasharray: 2 2;
}

.cg_axis {
  stroke: #d0d7de;
  stroke-width: 1;
}

.cg_ylab {
  fill: var(--calc-theme-text-muted);
  font-size: 11px;
  font-family: var(--pxn-ff-body);
  text-anchor: end;
}

.cg_xlab {
  fill: var(--calc-theme-text-muted);
  font-size: 11px;
  font-family: var(--pxn-ff-body);
  text-anchor: middle;
}

.cg_rlab {
  fill: var(--calc-theme-dark);
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
}

.cg_invest {
  fill: rgba(52, 76, 78, 0.16);
}

.cg_interest {
  fill: rgba(251, 203, 121, 0.35);
}

.cg_line {
  fill: none;
  stroke: var(--calc-theme-secondary);
  stroke-width: 2.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.cg_invline {
  fill: none;
  stroke: var(--calc-theme-text-muted);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  opacity: 0.65;
}

.cg_pt {
  fill: var(--calc-theme-secondary);
  opacity: 0.6;
}

.cg_guide {
  stroke: var(--calc-theme-secondary);
  stroke-width: 1.2;
  stroke-dasharray: 4 4;
}

.cg_hoverdot {
  fill: var(--calc-theme-accent);
  stroke: var(--calc-theme-dark);
  stroke-width: 2.5;
}

.cg_hit {
  cursor: crosshair;
}

.cg_tip {
  position: absolute;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 10;
  background: var(--calc-theme-dark);
  color: #ffffff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.55;
  white-space: nowrap;
  box-shadow: 0 10px 25px rgba(18, 35, 37, 0.25);
}

.cg_tip b {
  display: block;
  margin-bottom: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
}

.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-color: var(--calc-theme-secondary);
}

.cg_tip i.d2 {
  background-color: var(--calc-theme-accent);
}

.cg_tip .tt {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 6px;
  padding-top: 6px;
}

/* ==========================================
   HRA Comparison Bars
   ========================================== */
.hra_compare {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--calc-theme-border);
}

.hra_compare h5 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--calc-theme-dark);
  margin-bottom: 14px;
}

.hb_row {
  margin-bottom: 14px;
}

.hb_top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--calc-theme-text-muted);
  margin-bottom: 6px;
}

.hb_label span {
  color: var(--calc-theme-success);
  font-weight: 600;
}

.hb_val {
  font-weight: 700;
  color: var(--calc-theme-dark);
}

.hb_track {
  height: 10px;
  border-radius: 8px;
  background-color: #eaedf0;
  overflow: hidden;
}

.hb_fill {
  height: 100%;
  border-radius: 8px;
  background-color: rgba(52, 76, 78, 0.35);
  transition: width 0.35s ease;
}

.hb_min .hb_fill {
  background-color: var(--calc-theme-success);
}

.hb_min .hb_val {
  color: var(--calc-theme-success);
  font-weight: 800;
}

/* ==========================================
   Explanation & Worked Examples Box
   ========================================== */
.calc_explain {
  margin-top: 36px;
}

.calc_explain .ce_box {
  background-color: var(--calc-theme-card-bg);
  border: 1px solid var(--calc-theme-border);
  border-radius: 24px;
  padding: 40px 42px;
  box-shadow: 0 10px 30px rgba(18, 35, 37, 0.04);
}

.calc_explain h3 {
  font-family: var(--pxn-ff-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--calc-theme-dark);
  margin-bottom: 16px;
}

.calc_explain h4 {
  font-family: var(--pxn-ff-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--calc-theme-dark);
  margin: 26px 0 12px;
}

.calc_explain p {
  color: var(--calc-theme-text-muted);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 14px;
}

.calc_formula {
  background-color: var(--calc-theme-bg);
  border-left: 4px solid var(--calc-theme-accent);
  padding: 18px 24px;
  border-radius: 12px;
  font-family: 'Courier New', monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--calc-theme-dark);
  margin: 14px 0 18px;
  overflow-x: auto;
}

.calc_explain ul {
  padding-left: 22px;
  margin-bottom: 16px;
}

.calc_explain ul li {
  color: var(--calc-theme-text-muted);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 8px;
}

/* ==========================================
   Disclaimer Box
   ========================================== */
.calc_disclaimer {
  margin-top: 26px;
  padding: 22px 28px;
  background-color: var(--calc-theme-bg);
  border: 1px solid var(--calc-theme-border);
  border-left: 4px solid var(--calc-theme-accent);
  border-radius: 16px;
  color: var(--calc-theme-text-muted);
  font-size: 13.5px;
  line-height: 1.75;
}

.calc_disclaimer strong {
  color: var(--calc-theme-dark);
}

/* ==========================================
   Responsive Adaptations
   ========================================== */
@media (max-width: 991px) {
  .calc_inputs {
    border-right: none;
    border-bottom: 1px solid var(--calc-theme-border);
  }
  .calc_head_bar {
    padding: 20px 24px;
  }
  .calc_head_bar h2 {
    font-size: 22px;
  }
  .calc_inputs, .calc_results {
    padding: 28px 24px;
  }
  .calc_explain .ce_box {
    padding: 28px 24px;
  }
}

