/********************************************
  LOAN CALCULATOR CONTAINER
********************************************/
.loanCalculatorBlock2 {
  /* Light gray gradient background */
  background-color: #ffffffe6;
  background-image: linear-gradient(180deg, var(--light-grey), #ddd);
  padding: 2rem;
  border-radius: 8px;
  width: 100%;
  margin: 0rem auto;
  /* Optional text color, shadow, etc. */
  color: #000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/********************************************
  REPAYMENT FIELDS
********************************************/
/* Flex container for the two loan items */
.loanTotalsBlock {
  display: flex;
  flex-direction: row;
  justify-content: space-between; /* Spreads the two items apart */
  align-items: center;
  /* Optional: add some padding or margin if needed */
  padding: 1rem;
}

/* Each loan item (Monthly Payment and Total Repayment) */
.loanItem {
  text-align: center;  /* Center text within each item */
}

/* Styling for the amount (big red text) */
.loanItem span#emi,
.loanItem span#total-amount {
  display: block;
  font-size: 40px;
  color: #ed1c24;
  font-weight: 700;
  margin-bottom: 20px;  /* Space between amount and label */
}

/* Styling for the small labels */
.labelSmall {
  display: block;
  font-size: 12px;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/********************************************
  OPTIONAL: OTHER STYLES
********************************************/
.calc-holder {
  margin-bottom: 1rem;
}
.lcRow {
  margin-bottom: 1.5rem;
}
.lcH3 {
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--dark-blue);
}

/* Add some top margin to the slider containers so the tooltips (handles) don't overlap the label */
#slider1, 
#slider2 {
  margin-top: 20px;
  padding-bottom: 20px;
}

/********************************************
  SLIDER (jQuery UI) STYLES
********************************************/
.ui-slider {
  position: relative;
  height: 6px;
  background-color: #ffffff;
  border-radius: 3px;
  margin: 0.5rem 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ui-slider-range {
  background-color: var(--dark-red) !important;
  height: 20px;
  border-radius: 3px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/********************************************
  TOOLTIP HANDLE (Used as Slider Handle)
********************************************/
.ui-slider-handle {
  /* Remove default styling so the tooltip becomes the visible handle */
  position: absolute;
  background: none;
  border: none;
  width: 0 !important;
  min-width: 0;
  height: auto;
  cursor: pointer;
  outline: none;
  z-index: 2;
  overflow: visible;
  
  /* Center the handle vertically relative to the slider track */
  top: 50%;
  transform: translateY(-50%);
}

/* The tooltip that acts as the handle */
.tooltip2 {
  width: 75px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #ed1c24;
  padding: 0.6rem 0.6rem 0.2rem 0.6rem;
  border-radius: 4px;
  color: #ffffff;
  font-size: 1rem;
  position: relative;
  white-space: nowrap;
  text-align: center;
}

#slider2 .tooltip2 {
  width: auto;
  min-width: 58px;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
}

.tooltip2.tooltip2-align-left {
  transform: translateX(0) !important;
}

.tooltip2.tooltip2-align-right {
  transform: translateX(-100%) !important;
}

.tooltip2.tooltip2-align-left .tooltip-arrow {
  align-self: flex-start;
  margin-left: 10px;
}

.tooltip2.tooltip2-align-right .tooltip-arrow {
  align-self: flex-end;
  margin-right: 10px;
}

/* Inner text styling */
.tooltip-inner2 {
  font-weight: 600;
}

/* Optional arrow beneath the tooltip */
.tooltip-arrow {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #ed1c24;
  margin-top: 4px;
}

/********************************************
  BOTTOM SECTION (Monthly Payment, Total)
********************************************/
.row-bottom {
  margin-top: 1rem;
}

.loanTotalsBlock {
  text-align: left;
}

.loanTotalsBlock h3 {
  font-size: 1rem;
  margin: 0.5rem 0;
}

.loanMp {
  padding-right: 50px;
}

.loanMp,
.loanTp {
  font-weight: 600;
  color: #ffffff;
  text-align: left;
  margin-top: 20px;
}

/********************************************
  RESPONSIVE TWEAKS (Optional)
********************************************/
@media (max-width: 480px) {
  .loanCalculatorBlock2 {
    padding: 1rem;
  }
  .lcH3 {
    font-size: 1rem;
  }
  .ui-slider {
    margin: 1rem 0;
  }
}
