.hdfc-emi {
  box-sizing: border-box;
  width: min(100%, 45rem);
  max-width: 100%;
  flex: none;
  overflow: hidden;
  border: 1px solid #cbdbea;
  border-radius: 1rem;
  background: #fff;
  color: #17314e;
  box-shadow: 0 12px 32px rgba(13, 42, 72, .15);
  font-family: var(--font-family, Inter, sans-serif);
  container-type: inline-size;
}
.hdfc-emi * { box-sizing: border-box; }
.hdfc-emi button, .hdfc-emi input { font-family: inherit; }
.hdfc-emi-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .95rem 1.2rem;
  background: #004b8e;
  color: #fff;
}
.hdfc-emi-head h3 { margin: 0; font-size: 1.12rem; line-height: 1.2; letter-spacing: -.02em; }
.hdfc-emi-head p { margin: .28rem 0 0; color: #dceafa; font-size: .75rem; }
.hdfc-emi-reset {
  flex: none;
  min-height: 2.2rem;
  padding: .35rem .65rem;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: .4rem;
  background: transparent;
  color: #fff;
  font-size: .75rem;
  font-weight: 650;
  cursor: pointer;
}
.hdfc-emi-reset:hover { background: rgba(255,255,255,.12); }
.hdfc-emi-layout { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); }
.hdfc-emi-controls { display: grid; align-content: start; gap: 1.05rem; padding: 1.1rem 1.15rem 1.2rem; }
.hdfc-emi-field { min-width: 0; }
.hdfc-emi-field-top { display: flex; justify-content: space-between; align-items: baseline; gap: .4rem; margin-bottom: .45rem; }
.hdfc-emi-field-top label { font-size: .78rem; font-weight: 700; white-space: nowrap; }
.hdfc-emi-field-top span { color: #546b82; font-size: .68rem; text-align: right; }
.hdfc-emi-money-input, .hdfc-emi-short-input, .hdfc-emi-rate-control {
  border: 1px solid #aebfd0;
  border-radius: .5rem;
  background: #fff;
}
.hdfc-emi-money-input, .hdfc-emi-short-input { display: flex; align-items: center; gap: .25rem; }
.hdfc-emi-money-input { height: 2.75rem; padding: 0 .65rem; }
.hdfc-emi-money-input span { color: #004b8e; font-size: 1.08rem; font-weight: 700; }
.hdfc-emi-money-input input { width: 100%; min-width: 0; padding: .4rem; border: 0; outline: 0; color: #17314e; background: transparent; font-size: 1.08rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hdfc-emi-amount-slider {
  display: block;
  width: 100%;
  height: 1.15rem;
  margin: .45rem 0 0;
  padding: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}
.hdfc-emi-amount-slider::-webkit-slider-runnable-track {
  height: .38rem;
  border-radius: 1rem;
  background: linear-gradient(to right, #004b8e var(--fill, 0%), #d9e5f0 var(--fill, 0%));
}
.hdfc-emi-amount-slider::-moz-range-track { height: .38rem; border-radius: 1rem; background: #d9e5f0; }
.hdfc-emi-amount-slider::-moz-range-progress { height: .38rem; border-radius: 1rem; background: #004b8e; }
.hdfc-emi-amount-slider::-webkit-slider-thumb {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: -.36rem;
  border: 3px solid #fff;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: #ed232a;
  box-shadow: 0 1px 5px rgba(23,49,78,.3);
}
.hdfc-emi-amount-slider::-moz-range-thumb { width: .8rem; height: .8rem; border: 3px solid #fff; border-radius: 50%; background: #ed232a; box-shadow: 0 1px 5px rgba(23,49,78,.3); }
.hdfc-emi input[type=number]::-webkit-inner-spin-button { appearance: none; }
.hdfc-emi input[type=number] { appearance: textfield; }
.hdfc-emi-presets { display: flex; gap: .35rem; min-width: 0; }
.hdfc-emi-field > .hdfc-emi-presets { margin-top: .45rem; }
.hdfc-emi-amount-slider + .hdfc-emi-presets { margin-top: .25rem; }
.hdfc-emi-presets button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2rem;
  padding: .25rem;
  border: 1px solid #c9d8e6;
  border-radius: .4rem;
  background: #f7f9fc;
  color: #315270;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.hdfc-emi-presets button:hover { background: #eaf3fb; border-color: #7aa5cc; }
.hdfc-emi-presets button[aria-pressed=true] { background: #004b8e; border-color: #004b8e; color: #fff; }
.hdfc-emi-tenure { display: flex; gap: .42rem; }
.hdfc-emi-tenure .hdfc-emi-presets { flex: 1; }
.hdfc-emi-short-input { width: 3.85rem; flex: none; padding: 0 .3rem; }
.hdfc-emi-short-input input { width: 2rem; min-width: 0; height: 2rem; padding: 0; border: 0; outline: 0; background: transparent; color: #17314e; font-size: .78rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.hdfc-emi-short-input span { color: #546b82; font-size: .7rem; }
.hdfc-emi-rate-control { display: flex; align-items: center; width: 100%; height: 2.4rem; overflow: hidden; }
.hdfc-emi-rate-control button { width: 2.6rem; height: 100%; flex: none; border: 0; background: #eaf3fb; color: #004b8e; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.hdfc-emi-rate-control button:hover { background: #d6e8f8; }
.hdfc-emi-rate-control > div { display: flex; justify-content: center; align-items: center; flex: 1; min-width: 0; gap: .25rem; }
.hdfc-emi-rate-control input { width: 2.5rem; padding: 0; border: 0; outline: 0; background: transparent; color: #17314e; font-size: .9rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.hdfc-emi-rate-control span { color: #546b82; font-size: .74rem; }
.hdfc-emi-money-input:focus-within, .hdfc-emi-short-input:focus-within, .hdfc-emi-rate-control:focus-within { border-color: #004b8e; outline: 2px solid rgba(0,75,142,.15); }
.hdfc-emi input[aria-invalid=true] { color: #bd1c28; }
.hdfc-emi-results { min-width: 0; padding: 1.1rem 1.15rem; background: #f2f7fc; border-left: 1px solid #d9e5f0; }
.hdfc-emi-primary { display: flex; flex-direction: column; align-items: flex-start; }
.hdfc-emi-primary span { color: #345774; font-size: .75rem; font-weight: 700; }
.hdfc-emi-primary strong { display: block; margin-top: .13rem; color: #004b8e; font-size: clamp(1.75rem, 5cqi, 2.15rem); line-height: 1.14; letter-spacing: -.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hdfc-emi-primary small { margin-top: .15rem; color: #546b82; font-size: .7rem; }
.hdfc-emi-mix { display: flex; height: .42rem; margin-top: .9rem; overflow: hidden; border-radius: 1rem; background: #d8e6f2; }
.hdfc-emi-mix-principal { height: 100%; background: #004b8e; transition: width .32s cubic-bezier(.2,.8,.2,1); }
.hdfc-emi-mix-interest { flex: 1; height: 100%; background: #ed232a; }
.hdfc-emi-mix-key { display: flex; gap: .9rem; margin: .4rem 0 .8rem; color: #45617b; font-size: .66rem; }
.hdfc-emi-mix-key span { display: inline-flex; align-items: center; gap: .25rem; }
.hdfc-emi-mix-key i { width: .45rem; height: .45rem; border-radius: 50%; }
.hdfc-emi-dot-principal { background: #004b8e; }
.hdfc-emi-dot-interest { background: #ed232a; }
.hdfc-emi-results dl { display: grid; gap: .47rem; margin: 0; }
.hdfc-emi-results dl div { display: flex; justify-content: space-between; gap: .4rem; font-size: .72rem; }
.hdfc-emi-results dt { color: #4b657d; }
.hdfc-emi-results dd { margin: 0; color: #17314e; font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hdfc-emi-total { margin-top: .15rem; padding-top: .52rem; border-top: 1px solid #ccdeed; }
.hdfc-emi-total dt, .hdfc-emi-total dd { color: #004b8e; font-weight: 750; }
.hdfc-emi-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.15rem; border-top: 1px solid #d9e5f0; }
.hdfc-emi-footer p { max-width: 23rem; margin: 0; color: #4b657d; font-size: .67rem; line-height: 1.45; }
.hdfc-emi-apply { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; flex: none; min-height: 2.55rem; padding: .55rem .85rem; border: 1px solid #004b8e; border-radius: .45rem; background: #004b8e; color: #fff; font-size: .74rem; font-weight: 700; cursor: pointer; }
.hdfc-emi-apply svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hdfc-emi-apply:hover:not(:disabled) { background: #003a6f; }
.hdfc-emi-apply:disabled { border-color: #bdcad7; background: #d7e0e9; color: #4b6177; cursor: not-allowed; }
.hdfc-emi button:focus-visible, .hdfc-emi input:focus-visible { outline: 2px solid #ed232a; outline-offset: 2px; }
.hdfc-emi ::selection { background: #cce5fb; color: #113d68; }
@container (max-width: 36rem) {
  .hdfc-emi-layout { grid-template-columns: 1fr; }
  .hdfc-emi-controls { gap: .8rem; padding: .85rem; }
  .hdfc-emi-results { border-left: 0; border-top: 1px solid #d9e5f0; padding: .85rem; }
  .hdfc-emi-primary { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem; }
  .hdfc-emi-primary strong { font-size: 1.55rem; }
  .hdfc-emi-primary small { flex-basis: 100%; margin: 0; }
  .hdfc-emi-mix { margin-top: .55rem; }
  .hdfc-emi-mix-key { margin-bottom: .55rem; }
  .hdfc-emi-results dl { grid-template-columns: 1fr 1fr; gap: .35rem .7rem; }
  .hdfc-emi-results dl div { display: block; }
  .hdfc-emi-results dd { margin-top: .1rem; text-align: left; }
  .hdfc-emi-total { margin: 0; padding: 0; border: 0; }
  .hdfc-emi-footer { padding: .7rem .85rem; }
}
@container (max-width: 24rem) {
  .hdfc-emi-head { padding: .8rem .85rem; }
  .hdfc-emi-head p { display: none; }
  .hdfc-emi-footer { align-items: stretch; flex-direction: column; gap: .6rem; }
  .hdfc-emi-footer p { order: 2; }
  .hdfc-emi-apply { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .hdfc-emi-mix-principal { transition: none; } }
