/* ==========================================================
   RETIREMENT OUTPUT SCREEN
========================================================== */

#output-section {
  display: none;
}

#output-section.active {
  display: block;
}

/* ==========================================================
   HEADER
========================================================== */

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.output-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0b4c87;
}

.inflation-rate {
  font-size: 12px;
  font-weight: 500;
  color: #0b4c87;
}
.recalculate_heading_btn,
.recalculate_back_btn {
  display: none;
  align-items: center;
  gap: 6px;
  background: #ebf4ff;
  border: 1px;
  border-radius: 20px;
  padding: 6px 14px;
  font: normal normal 600 13px/16px Mulish;
  color: #094b7f;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: auto;
}

.recalculate_heading_btn:hover,
.recalculate_back_btn:hover {
  background: #fef5f1;
  transform: translateY(-1px);
}

.recalculate_heading_btn img,
.recalculate_back_btn img {
  width: 14px;
  height: 13px;
}
.recalculate_back_btn img  {
  margin:-2px 0
}
.output-header-wrapper {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
@media (max-width: 768px) {
  .output-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #0b4c87;
  }
  .output-header-wrapper {
    display: flex;
    flex-direction: column;
  }
  .inflation-rate {
    font-size: 10px;
    font-weight: 500;
    color: #0b4c87;
  }
  .recalculate_heading_btn {
    padding: 5px 10px;
    font-size: 11px;
    gap: 4px;
  }

  .recalculate_heading_btn img {
    width: 12px;
    height: 11px;
  }
}

/* ==========================================================
   CORPUS CARD
========================================================== */

.output-wrapper {
  display: flex;
  flex-direction: row;
  /* gap: 10px; */
  gap: 45px;
}

.output-hero {
  width: 100%;
  background: transparent linear-gradient(90deg, #fcc491 0%, #ffe7d3 100%) 0% 0%
    no-repeat padding-box;
  border-radius: 10px;
  padding: 9px 15px 9px 24px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  align-content: center;
}

.output-hero .label {
  flex: 0 0 50%;
  font-size: 12px;
  color: #094b7f;
  line-height: 1.5;
  max-width: 70%;
  font: normal normal 600 12px/16px Mulish;
}
.output-hero .label strong {
  color: #b02a30 !important;
  font-style: italic;
  font-size: 14px;
  font-weight: 700;
}
.output-hero .big-num {
  color: #c5302a !important;
  text-align: right;
  font: normal normal 800 26px/33px Mulish;
  height: 100%;
}

.output-hero .sub {
  display: none;
}

/* Hide savings/deficit tiles for PRD */
.output-grid {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #faf3e5 0% 0% no-repeat padding-box;
  border-radius: 10px;
  padding: 9px 24px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.output-tile {
  background: #faf3e5;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  justify-content: space-between;
  align-items: flex-start;
}
.output-tile .tile-label {
  font-size: 12px;
  font-weight: 600;
  color: #444444;
}
.output-tile .tile-val {
  font-size: 26px;
  font-weight: 800;
  line-height: 33px;
  color: #444444;
}
.output-tile .tile-val.pos {
  color: #444444;
}
.output-tile .tile-val.neg {
  color: #ff6b6b;
}
.output-tile.deficit-tile {
  justify-content: flex-start;
  align-items: center;
  padding-top: 5px;
  position: relative;
}
.output-tile.deficit-tile:after,
.output-tile.deficit-tile::before {
  content: "";
  width: 100%;
  height: 5px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  position: absolute;
  top: 0;
  left: 0;
}
.output-tile.deficit-tile::before {
  background-color: #444444 !important;
  width: 60px;
  z-index: 9;
}
.output-tile.deficit-tile .tile-val,
.deficit-label {
  font-size: 10px;
  font-weight: 600 !important;
  line-height: 13px !important;
}
.deficit-tile .deficit-bar-track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  margin-top: 10px;
}
.deficit-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}
.deficit-bar-fill.good {
  background: linear-gradient(90deg, #4caf50, #81c784);
}
.deficit-bar-fill.warn {
  background: linear-gradient(90deg, var(--gold), #ffb74d);
}

@media (max-width: 560px) {
  .output-sliders,
  .output-grid,
  .lifestyle-grid {
    grid-template-columns: 1fr;
  }
  .invest-cta,
  .surplus-cta {
    flex-direction: column;
    text-align: center;
  }
  .wait-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================
   INVEST CTA
========================================================== */

.invest-cta {
  padding: 8px 24px;
  margin: 20px 0 0px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* background: #fef2ed 0% 0% no-repeat padding-box; */
  background: #fef2ed;
  border: 1px solid #f07f22;
  border-radius: 10px;
}

.invest-cta .cta-label {
  color: #b02a30;
  text-transform: uppercase;
  text-align: left;
  font: normal normal 600 14px/20px Mulish;
  font-weight: 600;
}
.invest-cta .cta-label br {
  display: none;
}
.invest-cta small {
  display: none;
}

.invest-cta .cta-amt {
  text-align: right;
  font: normal normal 900 30px/38px Mulish;
  color: #b02a30 !important;
}

.invest-cta .cta-unit {
  font-size: 14px;
  color: #b02a30;
  text-align: right;
}

.amount-wrapper {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ==========================================================
   SURPLUS CARD
========================================================== */

.surplus-cta {
  padding: 17px 13px;
  margin-bottom: 20px;
  border-radius: 10px;
  background: #f3f4ec;
}

.surplus-cta .cta-text {
  font-size: 18px;
  line-height: 24px;
  color: #3f5701;
  font-style: italic;
  font-weight: 700;
}
@media (max-width: 768px) {
  .surplus-cta {
    text-align: left !important;
  }
  .surplus-cta .cta-icon {
    display: none;
  }
  .surplus-cta .cta-text {
    font-size: 16px;
  }
}
/* ==========================================================
   CHART SECTION
========================================================== */

.chart-wrap {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-top: 2px solid #e5e7eb;
  border-radius: 0 !important;
  padding-top: 10px;
}

.chart-wrap .section-title {
  display: none;
}

.chart-with-sliders {
  display: flex;
  align-items: stretch;
}

/* ==========================================================
   VERTICAL SLIDER LABELS
========================================================== */

.cvs-label {
  background: #edf2f7;
  color: #66768a;
  border-radius: 20px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
}

.chart-vslider--right .cvs-label {
  background: #fde9e7;
  color: #cf3d35;
}

.cvs-hint {
  color: #cf5f52;
  font-weight: 600;
}

.cvs-min {
  color: #94a3b8;
}

/* ==========================================================
   HIDE ADJUST ASSUMPTIONS
========================================================== */

#adjust-assumptions-section {
  display: none !important;
}

/* Fallback if ID not added yet */

.output-sliders {
  display: none !important;
}

/* ==========================================================
 WAIT COST SECTION
========================================================== */
.wait-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.wait-card {
  background: #fffbf8 0% 0% no-repeat padding-box;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  opacity: 1;
  text-align: center;
  padding: 18px 4px;
}

.wait-card.best {
  border: 1px solid var(--unnamed-color-e85d05);
  background: #fff3e8 0% 0% no-repeat padding-box;
  border: 1px solid #e85d05;
  border-radius: 10px;
  opacity: 1;
  text-align: center;
}

.wait-card .wc-icon {
  font-size: 1.3rem;
  margin-bottom: 6px;
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.wait-card .wc-label {
  font-size: 12px;
  color: #444444;
  margin-bottom: 8px;
}

.wait-card .wc-badge {
  display: inline-block;
  font-weight: 600;
  padding: 2px 19px;
  border-radius: 20px;
  background: #f6e3c2;
  color: #fff;
  margin-bottom: 8px;
  color: #444444;
  font-size: 10px;
  text-align: center;
  font: normal normal 600 10px/14px Mulish;
}
.wait-card .wc-amt {
  font-size: 14px;
  color: #e85d05;
  line-height: 1.1;
  font: normal normal 800 16px/14px Mulish;
}

.wait-card .wc-extra {
  margin-top: 4px;
  text-align: center;
  font: normal normal 600 10px/14px Mulish;
  letter-spacing: 0px;
  color: #444444;
}

.wait-card.best .wc-amt {
  color: #b02a30;
}

.wait-card.best .wc-label {
  margin-bottom: 0px;
}

@media (max-width: 560px) {
  .output-sliders,
  .output-grid,
  .lifestyle-grid {
    grid-template-columns: 1fr;
  }

  .invest-cta,
  .surplus-cta {
    flex-direction: column;
    text-align: center;
  }

  .wait-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* ==========================================================
   RESULT CTA BUTTON
========================================================== */

.result-cta-btn,
.output-section .calc-btn {
  width: 520px;
  max-width: 100%;
  height: 64px;
  border: 0;
  border-radius: 999px;
  background: #ea8433;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: block;
  margin: 30px auto 0;
  cursor: pointer;
}
#output-clcc-btn {
  display: none;
}

/* ==========================================================
   MOBILE
========================================================== */

.custom-divider {
  height: 2px;
  background: #d6dde6;
  margin-bottom: 15px;
}
.chart-with-sliders {
  display: flex;
  align-items: stretch;
  gap: 20px;
}

.chart-vslider {
  /* width: 90px; */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chart-canvas-wrap {
  flex: 1;
  min-height: 270px;
}

.cvs-title {
  font-size: 10px;
  font-weight: 700;
  color: #cf5f52;
  margin-bottom: 5px;
}

.chart-vslider--left > .cvs-title {
  color: #718096;
}

.cvs-top-value {
  background: #edf2f7;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #5f7088;
  margin-bottom: 4px;
}

.cvs-red {
  background: #fde9e7;
  color: #cf3d35;
}

.cvs-bottom-value {
  margin-top: 10px;
  color: #94a3b8;
  font-size: 10px;
}
#retireAgeVerticalSlider,
#returnsVerticalSlider {
  height: 180px;
  width: 8px;
  border: none;
  border-radius: 50px;
  background: #dbe3ee !important;
}

#retireAgeVerticalSlider .ui-slider-handle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: 3px solid #f58220 !important;
  margin-left: -6px;
}

#returnsVerticalSlider .ui-slider-handle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: 3px solid #c92c2c;
  margin-left: -6px;
}
/* #retireAgeVerticalSlider,
#returnsVerticalSlider {
  pointer-events: auto !important;
  position: relative;
  z-index: 100;
  background: #e2e8f0 !important;
} */
/* Vertical sliders */
#retireAgeVerticalSlider .ui-slider-handle,
#returnsVerticalSlider .ui-slider-handle {
  left: -6px !important;
  top: auto !important;
  margin-left: 0 !important;
}
.ui-slider.ui-slider-vertical {
  width: 8px;
  border-radius: 999px;
  background: #e2e8f0 !important;
  border: none !important;
}

/* Left fill */
#retireAgeVerticalSlider .ui-slider-range {
  background: #f58220 !important;
}

/* Right fill */
#returnsVerticalSlider .ui-slider-range {
  background: #b02a30 !important;
}

#returnsVerticalSlider .ui-slider-handle {
  border: 4px solid #b02a30 !important;
}
/* Track */
.ui-slider-vertical {
  background: #e2e8f0 !important;
  border: none !important;
  width: 8px;
  border-radius: 999px;
}

/* Active portion */
#retireAgeVerticalSlider .ui-slider-range {
  background: #f58220 !important;
}

/* Handle */
#retireAgeVerticalSlider .ui-slider-handle {
  border: 3px solid #f58220 !important;
  background: #fff !important;
}
.wait-cost-section {
  padding: 30px;
  max-width: 750px;
  min-width: 750px;
  margin: auto;
  background: #ffffff 0% 0% no-repeat padding-box;
  box-shadow: 0px 0px 6px #00000029;
  border: 1px solid #f4f1ec;
  border-radius: 20px;
  display: none;
  margin: 20px 0px 0;
}
.wait-cost-wrapper {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-radius: 50%;
  background: #fff3e8;
}
.wait-cost-wrapper img {
  width: 15px;
}
.wc-wrapper {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-radius: 50%;
  background: #fbd38c;
}
.wc-wrapper img {
  width: 14px;
}
@media (max-width: 768px) {
  .chart-with-sliders {
    gap: 0px;
  }
  .output-header {
    align-items: flex-start;
    gap: 12px;
  }
  .output-wrapper {
    flex-direction: column;
    gap: 0;
  }
  .output-hero {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    width: 100% !important;
  }

  .output-hero .label {
    max-width: 100%;
    font-size: 11px;
    flex: 0 0 58%;
    color: #444;;
  }
  .output-hero .label strong {
    font-size: 13px;
  }
  .output-hero .big-num {
    font-size: 22px !important;
  }

  .invest-cta {
    flex-direction: row;
    text-align: center;
    padding: 12px 14px;
  }

  .invest-cta .cta-label {
    font-size: 14px;
    line-height: 18px;
    color: #444444;
  }
  .invest-cta .cta-label br {
    display: flex;
  }
  .invest-cta .cta-amt {
    font-size: 24px !important;
    line-height: 30px;
  }
  .invest-cta .cta-unit {
    font-size: 10px;
    line-height: 13px;
  }
  .cvs-title {
    font-size: 10px;
  }
  #retireAgeVerticalSlider,
  #returnsVerticalSlider {
    height: 150px;
    width: 4px;
    border: none;
    border-radius: 50px;
    background: #dbe3ee !important;
  }
  .output-grid {
    align-items: start;

    padding-right: 125px;
    position: relative;
  }
  .output-tile {
    max-width: 100%;
    overflow: visible;
  }
  .output-tile.deficit-tile:after,
  .output-tile.deficit-tile::before {
    background-color: rgba(183, 154, 99, 0.4);
    height: 2px;
  }
  .output-tile .tile-val.pos {
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 1;
    font-size: 20px;
    line-height: 26px;
  }
  .output-tile.deficit-tile {
    margin: 0;
  }
  .amount-wrapper {
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
  }
  .chart-canvas-wrap {
    min-height: 150px;
    margin: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
  }
  /* .chart-canvas-wrap canvas {
    max-width: 270px;
  } */
  .cvs-top-value {
    font-size: 9px;
  }
  .cvs-bottom-value {
    font-size: 11px;
  }
  .wait-cost-section {
    max-width: 100%;
    min-width: initial;
    padding: 15px;
  }
  .wait-card.best {
    padding: 10px;
  }
}
@media (max-width: 480px) {
  .chart-canvas-wrap canvas {
    max-width: 270px;
  }
  #retireAgeVerticalSlider,
  #returnsVerticalSlider {
    height: 100px;
  }
  .chart-vslider,
  .chart-vslider--right {
    position: relative;
  }
  .chart-vslider--left > .cvs-title {
    color: #718096;
    /* position: absolute;
    transform: rotate(-90deg);
    left: -15px;
    top: 40%; */
  }
  .chart-vslider--right > .cvs-title {
    color: #718096;
    position: absolute;
    /* transform: rotate(90deg);
    left: -10px;
    top: 50%; */
    width: 100px;
    text-align: right;
  }

  /* .chart-vslider--right > .cvs-red {
    margin-top: 25px;
  } */
}
@media (max-width: 380px) {
  .chart-canvas-wrap canvas {
    max-width: 200px;
  }
  #retireAgeVerticalSlider,
  #returnsVerticalSlider {
    height: 80px;
  }
  .output-hero .label {
    flex: 0 0 58%;
            font-size: 10px;
  }
  .output-hero {
    padding: 9px 12px;
  }
  .field label {
    font-size: 12px;;
  }
}
@media (max-width: 350px) {
  .chart-canvas-wrap canvas {
    /* max-width: 130px; */
  }
  #retireAgeVerticalSlider,
  #returnsVerticalSlider {
    height: 60px;
  }
  
}
#wait-grid .slick-slide {
  padding: 0 8px;
  box-sizing: border-box;
}
.wait-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
}

#wait-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  width: 100%;
  margin: 0 0 15px;
}

#wait-grid::-webkit-scrollbar {
  display: none;
}

.wait-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e7873c;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 2;
  background: linear-gradient(90.55deg, #e7873c 16.06%, #e06336 81.41%);
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.wait-arrow:disabled {
  opacity: 0.4;
}
.wait-arrow img {
  width: 20px;
}

.wait-card {
  min-width: 240px;
  flex-shrink: 0;
}
#chartjs-tooltip {
  z-index: 9999;
}

.custom-tooltip {
  border-radius: 10px;
  padding: 5px 5px;
  min-width: 80px;
  background: #fef2ed 0% 0% no-repeat padding-box;
  box-shadow: 0px 0px 6px #00000029;
  border: 1px solid #f07f22;
}

.tooltip-age {
  font-size: 10px;
  color: #b02a30;
  font-weight: 600;
  margin-bottom: 4px;
}

.tooltip-value {
  font-size: 16px;
  font-weight: bold;
  color: #b02a30;
}
