/* =========================
   MOBILE RESPONSIVE SIP UI
========================= */
h1 {
  margin: 25px 15px;
  font-size: 24px;
}
.calculatorCard {
  background: white;

  border-radius: 24px;

  padding: 30px;

  border: 1px solid #e7ebf0;

  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

/* =========================
     TOP TABS
  ========================= */

.topTabs {
  display: flex;
  gap: 14px;
  margin-bottom: 40px;
}

.tabBtn {
  border: none;
  background: transparent;

  padding: 6px 18px;

  border-radius: 40px;

  font-size: 15px;
  font-weight: 600;

  color: #667085;

  cursor: pointer;

  transition: 0.2s;
}

.tabBtn.active {
  background: #dff5eb;
  color: #00b386;
}

/* =========================
     MAIN GRID
  ========================= */

.mainGrid {
  display: grid;

  grid-template-columns:
    minmax(300px, 1fr)
    minmax(300px, 420px);

  gap: 50px;

  align-items: center;
}

/* =========================
     LEFT SECTION
  ========================= */

.sliderGroup {
  margin-bottom: 48px;
}

.labelRow {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 20px;

  margin-bottom: 18px;
}

label {
    font-size: 16px;
    color: #1f2940e6;
    font-family: system-ui;
}

.inputBox {
  min-width: 120px;

  height: 44px;

  padding: 0 14px;

  border-radius: 10px;

  background: #e7f4ef;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 4px;

  color: #00b386;

  font-weight: 700;
}

.inputBox input {
  width: 100%;

  border: none;
  outline: none;

  background: transparent;

  text-align: right;

  font-size: 20px;

  color: #00b386;

  font-weight: 600;
  font-family: ui-rounded;
}

/* =========================
     RANGE SLIDER
  ========================= */

input[type="range"] {
  width: 100%;
  height: 6px;

  appearance: none;
  -webkit-appearance: none;

  background: #e5e7eb;

  border-radius: 20px;

  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;

  width: 24px;
  height: 24px;

  border-radius: 50%;

  background: #00b386;

  border: 5px solid rgb(197, 255, 214);

  cursor: pointer;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  margin-top:-9px;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: #e5e7eb;
  border-radius: 20px;
}

/* =========================
     RIGHT SECTION
  ========================= */

.rightSection {
  width: 100%;
}

.chartTop {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.legend {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.legendItem {
  display: flex;
  align-items: center;
  gap: 8px;

  font-size: 14px;
  color: #667085;
}

.dot {
  width: 18px;
  height: 10px;
  border-radius: 20px;
}

.invested {
  background: #e7e9f7;
}

.returns {
  background: #4f5dff;
}

.chartWrapper {
  width: 100%;
  height: 340px;
}

/* =========================
     BOTTOM SECTION
  ========================= */

.bottomSection {
  margin-top: 40px;

  display: flex;
  justify-content: space-between;
  align-items: flex-end;

  gap: 30px;
}

.resultList {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.resultRow {
  display: flex;
  align-items: center;
  gap: 70px;
}

.resultRow span {
  width: 180px;
  color: #667085;
  font-size: 16px;
}

.resultRow strong {
  font-size: 20px;
  color: #1f2940;
  font-family: system-ui;
}

.investBtn {
  border: none;

  background: #00b386;

  color: white;

  padding: 18px 34px;

  border-radius: 14px;

  font-size: 18px;
  font-weight: 700;

  cursor: pointer;

  transition: 0.2s;
}

.investBtn:hover {
  transform: translateY(-2px);
}

/* =========================
     TABLET RESPONSIVE
  ========================= */

@media (max-width: 1100px) {
  .mainGrid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .rightSection {
    max-width: 500px;
    margin: auto;
  }

  .bottomSection {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

@media (max-width: 768px) {
  body {
    padding: 0px;
  }

  .calculatorCard {
    padding: 18px;
    border-radius: 20px;
  }

  .topTabs {
    margin-bottom: 28px;
  }

  .tabBtn {
    font-size: 16px;
    padding: 10px 16px;
  }

  .sliderGroup {
    margin-bottom: 36px;
  }

  .labelRow {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  label {
    font-size: 17px;
  }

  .inputBox {
    width: 100%;
    min-width: 100%;
    justify-content: flex-start;
  }

  .inputBox input {
    font-size: 24px;
    border: none !important;
  }

  .chartTop {
    justify-content: center;
  }

  .legend {
    justify-content: center;
  }

  .chartWrapper {
    height: 280px;
  }

  .bottomSection {
    margin-top: 20px;
  }

  .resultList {
    width: 100%;
    gap: 18px;
  }

  .resultRow {
    justify-content: space-between;
    gap: 20px;
  }

  .resultRow span {
    width: auto;
    font-size: 14px;
  }

  .resultRow strong {
    font-size: 22px;
  }

  .investBtn {
    width: 100%;
    font-size: 16px;
    padding: 16px;
  }
}

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

@media (max-width: 480px) {
  .chartWrapper {
    height: 240px;
  }

  .inputBox input {
    font-size: 22px;
  }

  .resultRow strong {
    font-size: 20px;
  }
}
