* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: #f3f5f7;
  padding: 0;
  overflow-x: hidden;
  font-family: 'Poppins', sans-serif;
}
.emi-calculator{
  position: relative;
}

.emi-calculators-section {
  width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    flex-direction: column;
    margin: 0 auto;
    padding-bottom: 20px;
}

.emi-calculator-content {
  flex: none;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    /* gap: 10px; */
    padding: 0 50px;
    background-color: #F1FAFF;
}

.emi-heading-wrapper{
    display: flex;
    justify-content: stretch;
    align-items: center;
    gap: 50px;
    padding-top: 8px;
}

.emi-info-desc{
  margin-bottom: 15px;
}

.emi-heading-wrapper .emi-title .text-dark{
    /* font-size: 40px; */
    font-weight: 700;
    color: #233253 !important;
}
.emi-heading-wrapper .emi-title .text-red{
    color: #ED1C24;
    /* font-size: 40px; */
    font-weight: 700;
}
.emi-action-buttons{
  display: flex;
  align-items: center;
  gap: 30px;
}
.emi-action-buttons a{
  background: linear-gradient(90.34deg, #005E9E 0.3%, #002138 153.15%);
  color: #fff;
  padding: 2px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.emi-calculator-content h1 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #233253;
}
.emi-calculator-content h1 .highlight{
  color: #ED1C24;
  font-size: 40px;
  font-weight: 700;
}
.emi-calculator-content .ReadMore, 
.emi-calculator-content .ReadLess {
  font-size: 14px;
  line-height: 16px;
}

.emi-calculator-content p{
  font-style: normal;
    font-size: 14px;
    line-height: 16px;
    color: #666;
    font-weight: 500;
    text-align: left;
    row-gap: 20px;
}

.emi-info {
  gap: 15px;
  width: 100%;
  background: linear-gradient(89.95deg, #E0F8FF 0.04%, #FFE9FB 103.91%);
  border: 1px solid #cfe0ff;
  display: flex;
  align-items: center;
  padding: 6px 0 7px 50px;
  position: relative;
  box-shadow: 0px 2px 2px 0px #00000026;
  z-index: 3;
}

.emi-info .line {
  width: 5px;
  height: 25px;
  background: #ED1C24;
  display: inline-block;
}

.emi-info .ulip-text-wrap{
  display: flex;
    align-items: center;
    gap: 10px;
}
.emi-info .ulip-text-wrap h2{
  font-size: 18px;
  font-weight: 600;
  color: #295E9E;
}
.emi-info .ulip-text-wrap p{
  font-size: 14px;
  font-weight: 500;
  color: #454545;
}

.emi-calculation-section{
  background: #F9FDFF;
  width: 100%;
}

/* Main Container - Responsive Grid */
.emi-calculator-container {
  display: flex;
  flex-wrap: wrap;
  gap: 65px;
  /* background: #F9FDFF; */
  padding: 40px 0px 25px;
  border-radius: 12px;
  max-width: 1152px;
  margin: 0 auto;
}

.emi-calculator-container .left{
  flex: 1;
  width: 470px;
}
.emi-calculator-container .right {
  flex: 1;
  min-width: 620px;
}

/* Form Fields */
.field {
  margin-bottom: 26px;
}

.field label {
  display: block;
  margin-bottom: 0px;
  font-size: 18px;
  font-weight: 500;
  color: #233253;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 20px;
  margin-left: 0 !important;
  margin-right: 0;
  align-items: flex-end;
}

input[type="range"] {
  flex: 1;
  max-width: 370px;
  accent-color: #295E9E;
  cursor: pointer;
  height: 10px;
}


input[type="number"] {
  width: 120px;
  padding: 7px 10px;
  border: 1px solid #FF8085;
  border-radius: 6px;
  font-size: 16px;
  outline-color: #005baa;
}

#loanAmountInput {
  width: 120px;
  padding: 6px 0px 6px 20px;
  border: 1px solid #FF8085;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #233253;
  outline-color: #005baa;
  font-style: normal !important;
}
#interestInput{
  width: 120px;
  padding: 6px 10px;
  border: 1px solid #FF8085;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #233253;
  outline-color: #005baa;
  font-style: normal !important;
}
#tenureInput{
  width: 120px;
  padding: 6px 10px;
  border: 1px solid #FF8085;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #233253;
  outline-color: #005baa;
  font-style: normal !important;
}
/* Results Display */
.emi-box {
  background: #E2F8FF;
  padding: 12px 31px;
  border-radius: 10px;
  font-size: 22px;
  font-weight: 600;
  color: #233253;
  text-align: left;
  margin-bottom: 30px;
}

.chart-details {
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  gap: 20px;
}
.details{
  padding-top: 15px;
}
.details p {
  margin-bottom: 40px;
  font-size: 18px;
  color: #233253;
  font-weight: 500;
  padding-left: 12px;
}

.details .totalAmt {
  margin-top: 20px;
  font-size: 18px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: #ED1C24;
  padding-left: 12px;
}


/* Chart Sizing */
.chart-box {
  width: 210px;
  height: 210px;
}

/* Amortization Table */
.amortization-section {
  margin-top: 40px;
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  max-width: 1313px;
  width: 100%;
  margin: 0 auto;
}

.amortization-title{
  text-align: center;
  font-size: 20px;
  font-weight: 600;
}

.table-responsive {
  overflow-x: auto;
}

.amortization-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}


#amortizationBody tr{
  border: 1px solid #79DEFE;
  border-top-left-radius: 4px;
}
.amortization-table tr{
  border: 1px solid #79DEFE;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.amortization-table tr th:first-child,
#amortizationBody tr td:first-child{  
  border-top-left-radius: 4px;
}

.amortization-table tr th:last-child,
#amortizationBody tr td:last-child{
  border-top-right-radius: 4px;
}
.amortization-table th, 
.amortization-table td {
  text-align: left;
  padding: 12px 12px 12px 50px;
}
.amortization-table td{
  font-size: 16px;
  font-weight: 500;
  color: #6F6F6F;
}

.amortization-table thead tr th{
  background: #79DEFE;
  font-weight: 600;
  font-size: 16px;
}

.amortization-table th {
  background-color: #f8f9fa;
  color: #233253;
}

.amortization-table tbody tr:nth-child(even){
  background: #F9FDFF;
}

.emi-calculators-section .year-tabs-container{
  display: flex;
  gap: 57px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 15px;
  row-gap: 10px;
}

.emi-calculators-section .year-tab {
  padding: 10px 35px;
  border-radius: 4px;
  background-color: #ffffff;
  color: rgba(237, 28, 36, 1);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  border: 1px solid rgba(237, 28, 36, 1);
  letter-spacing: 1px;
  width: 140px;
}

.emi-calculators-section .year-tab.active {
  border-radius: 4px;
  background-color: rgba(237, 28, 36, 1);
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}

.emi-calculators-section .bullet{
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    padding-top: 1px;
}
.emi-calculators-section .bullet-principle{
    background-color: #fff;
    border: 5px solid #75d5f5;
}
.emi-calculators-section .bullet-interest{
    background-color: #fff;
    border: 5px solid #004e89;
}

.emi-marquee-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden; 
    background-color: #E2F8FF;
    box-sizing: border-box;
}
.emi-marquee-wrapper {
    display: flex;
    align-items: center;
    background-color: #E2F8FF;
    padding: 8px;
}
.emi-marquee-item {
    display: flex;
    align-items: center;
    padding: 0 200px;
    white-space: nowrap;
}

.emi-marquee-text p {
    margin: 0;
    color: #0F72B5;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.emi-marquee-text p a {
    color: #0F72B5;
    font-size: 18px;
    font-weight: 600;
    text-decoration: underline;
    font-family: 'Poppins', sans-serif;
}
.emi-marquee-text p a:hover{
    color: #0F72B5;
    font-size: 18px;
    font-weight: 600;
}

/* Image/Icon Styling */
.emi-marquee-image {
    margin-left: 12px;
    display: flex;
    align-items: center;
}

.emi-marquee-image img {
    height: 40px;
    width: 40px;
    display: block;
    animation: tada-animation 2s infinite;
    cursor: pointer;
}

 @keyframes tada-animation {
    0% { transform: scale(1); }
    10%, 20% { transform: scale(0.9) rotate(-3deg); }
    30%, 50%, 70%, 90% { transform: scale(1.15) rotate(3deg); }
    40%, 60%, 80% { transform: scale(1.15) rotate(-3deg); }
    100% { transform: scale(1) rotate(0); }
}

.emi-marquee-wrapper {
    display: flex;
    animation: emi-scroll var(--marquee-speed, 20s) linear infinite;
}

.emi-marquee-wrapper:hover {
    animation-play-state: paused;
}

@keyframes emi-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Moves exactly half the width to create the perfect loop */
        transform: translateX(-50%);
    }
}


@media (max-width: 768px) {

  .emi-calculators-section {
    flex-direction: column;
  }
  .emi-calculator-content {
    padding: 0 15px;
    gap: 8px;
    align-items: center;
    /* background-image: url(../../../content/dam/hdfclifeinsurancecompany/Group-461.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-size: auto; */
    background: #F1FAFF;
  }
  .emi-calculator-content h1 {
    font-size: 22px;
    margin-bottom: 0;
  }
  .emi-calculator-content h1 .highlight {
    font-size: 22px;
  }
  .emi-calculator-content p {
    text-align: center;
  }
  .emi-heading-wrapper {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  /* Show calculate button on mobile */
  .emi-action-buttons {
    display: flex;
    gap: 10px;
    flex-direction: column;
    justify-content: flex-start;
    align-items: unset;
    display: none;
  }
  .emi-action-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 20px;
    font-size: 13px;
    border-radius: 20px;
  }

  /* Info strip */
  .emi-info {
    padding: 8px 15px;
    gap: 10px;
    margin-bottom: 15px;
  }
  .emi-info .ulip-text-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .emi-info .ulip-text-wrap h2 {
    font-size: 14px;
  }
  .emi-info .ulip-text-wrap p {
    font-size: 12px;
  }
  .emi-info .line {
    height: 100%;
    min-height: stretch;
  }

  /* Main Container - stack vertically */
  .emi-calculator-container {
    padding: 20px 0px;
    flex-direction: column;
    gap: 25px;
    margin: 0 10px;
  }

  /* Reorder: chart/EMI on top, form fields below */
  .emi-calculator-container .left {
    order: 2;
    width: 100%;
  }
  .emi-calculator-container .left .field{
    position: relative;
    min-width: 300px !important;
  }
  .emi-calculator-container .right {
    order: 1;
    width: 100%;
    display: flex;
    flex-direction: column-reverse;
    min-width: unset;
    align-items: center;
  }

  /* EMI Box */
  .emi-box {
    padding: 12px 20px;
    font-size: 18px;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 8px;
    margin-top: 20px;
    width: 100%;
  }

  /* Chart & Details - stack vertically, chart on top */
  .chart-details {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: 15px;
  }

  .chart-box {
    width: 246px;
    height: 246px;
    margin: 0 auto;
  }

  .details {
    width: 100%;
            display: flex;
        align-items: baseline;
        text-align: left;
        flex-direction: column;
  }
  .details p {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 3px;
    text-align: center;
  }
  .details .totalAmt {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-top: 0px;
  }

  input[type="number"] {
    width: 80px;
    padding: 6px 8px;
    font-size: 14px;
  }

  .row {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    /* align-items: flex-end; */
  }

  input[type="range"] {
    flex: 1;
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-top: 10px;
  }

  #loanAmountInput {
    padding: 5px 5px 5px 23px;
  }
  #interestInput {
    padding: 5px 10px;
  }
  #tenureInput{
    padding: 5px 10px;
  }

  .field {
    margin-bottom: 25px;
  }
  .field label {
    font-size: 16px;
    margin-bottom: 5px;
  }

  .input-box {
    display: inline-flex;
    align-items: center;
    position: absolute;
    top: 0;
    right: 0;
    gap: 2px;
    flex-shrink: 0;
  }

  .input-box span {
    position: static;
    transform: none;
    font-size: 14px;
    line-height: 1;
  }

  .input-box span.input-yrs {
    position: static;
    transform: none;
    font-size: 14px;
    left: auto;
  }

  .input-box span.input-percentage {
    position: static;
    transform: none;
    font-size: 14px;
    left: auto;
  }
  .input-box {
    position: absolute !important;
    top: -5px;
    left: 55%;
  }

  .input-box input {
    padding-left: 6px;
    width: 80px;
  }

  .input-box:has(span.input-percentage) input {
    padding-left: 6px;
    left: auto;
  }

  /* Marquee */
  .emi-marquee-container {
    width: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    margin-right: 0;
  }
  .emi-marquee-wrapper {
    padding: 8px 0;
    overflow: hidden;
  }
  .emi-marquee-item {
    white-space: normal;
    gap: 8px;
  }
  .emi-marquee-text {
    width: 230px;
  }
  .emi-marquee-text p,
  .emi-marquee-text p a {
    font-size: 13px;
    white-space: normal;
    line-height: 1.4;
  }
  .emi-marquee-image img {
    height: 32px;
  }
  .emi-marquee-image {
    flex-shrink: 0;
    margin-left: 0;
  }

  /* Amortization Section */
  .amortization-section {
    padding: 15px 10px;
    margin-top: 20px;
  }
  .amortization-title {
    font-size: 16px;
  }

  /* .emi-calculators-section .year-tabs-container {
    gap: 10px;
    margin-top: 10px;
    flex-wrap: nowrap;
    overflow-x: scroll;
  } */
  .emi-calculators-section .year-tab {
    padding: 8px 22px;
    font-size: 14px;
  }

  .amortization-table th,
  .amortization-table td {
    padding: 20px 8px 20px 15px;
    font-size: 16px;
    min-width: 175px;
  }
  .amortization-table th:first-child,
  .amortization-table td:first-child {
    padding-left: 60px;
  }

  .amortization-table td {
    font-size: 16px;
  }

  .emi-calculators-section .year-tabs-container {
    display: flex;
    white-space: nowrap;
    gap: 20px;
    margin-top: 10px;
    justify-content: flex-start;
    padding-bottom: 10px;
    /* padding-left: 20px; */
    flex-wrap: nowrap;
    overflow-x: scroll;
    /* Firefox Support (Firefox doesn't use webkit pseudo-elements) */
    scrollbar-width: thin; 
    scrollbar-color: #ff7474 #e0e0e0; 
}
/* THICKNESS: Sets the height of the horizontal scrollbar */
.table-responsive::-webkit-scrollbar,
.year-tabs-container::-webkit-scrollbar {
    height: 8px; /* Increase or decrease to change thickness */
}

/* TRACK COLOR: The light gray line behind the scrollbar */
.table-responsive::-webkit-scrollbar-track,
.year-tabs-container::-webkit-scrollbar-track {
    background-color: #e0e0e0; /* Light gray */
    border-radius: 10px; /* Makes the track ends fully rounded */
}

/* THUMB COLOR: The red moving part */
.year-tabs-container::-webkit-scrollbar-thumb {
    background-color: #ff7474;
    border-radius: 10px;
    border: 2px solid #e0e0e0; 
}

/* Optional: Darken the thumb slightly when the user hovers over it */
.year-tabs-container::-webkit-scrollbar-thumb:hover {
    background-color: #f03e3e;
}
.table-responsive {
  overflow-x: scroll;
  scrollbar-width: thin;
  scrollbar-color: #295E9E #e0e0e0;
}
/* THUMB COLOR: The red moving part */
.table-responsive::-webkit-scrollbar-thumb {
    background-color: #295E9E;
    border-radius: 10px;
    border: 2px solid #e0e0e0; 
}

/* Optional: Darken the thumb slightly when the user hovers over it */
.table-responsive::-webkit-scrollbar-thumb:hover {
    background-color: #295E9E;
}
}

/* Loan amount validation tooltip */
.loan-tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background-color: #d32f2f;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.loan-tooltip::before {
  content: "";
  position: absolute;
  top: -5px;
  right: 12px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid #d32f2f;
}

@media (max-width: 768px) {
  .loan-tooltip {
    font-size: 10px;
    padding: 4px 8px;
    right: 25px;
  }
  .input-box span {
    top: 53% !important;
  }
}

.input-box {
  position: relative;
  display: inline-block;
}

.input-box span {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: #233253;
  font-size: 14px;
  font-weight: 500;
}
.input-box span.input-yrs {
  position: absolute;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 500;
}
.input-box span.input-percentage {
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 500;
}
.input-box input {
  padding-left: 20px;
}
.input-box:has(span.input-percentage) input{
  padding-left: 10px;
  left: 55px;
}
.input-box input:has(span.input-yrs) input{
  padding-left: 10px;
  left: 35px;
}


/* trial for range */
.range-slide {
  -webkit-appearance: none;
  width: 300px;
  height: 6px;
  border-radius: 5px;
  background: linear-gradient(to right, #295E9E 0%, #295E9E 20%, #ddd 20%, #ddd 100%);
  outline: none;
}

.range-slide::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 5px;
  background: transparent;
}

/* Thumb (circle) */
.range-slide::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  border: 2px solid #295E9E;
  cursor: pointer;
  margin-top: -8px;
}

/* Firefox */
.range-slide::-moz-range-track {
  height: 6px;
  border-radius: 5px;
  background: transparent;
}

.range-slide::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  border: 2px solid #295E9E;
  cursor: pointer;
}