/* =========================================================
   Business Loan EMI Calculator — page-specific styles
   (extends style.css, gst-calculator.css, late-fee-calculator.css)
   ========================================================= */

.slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.slider-header .field-label {
  margin-bottom: 0;
}
.compact-input {
  width: 190px;
  border-radius: 10px;
}
.compact-input input {
  padding: 9px 12px;
  font-size: 16px;
  text-align: right;
}
.compact-input .rupee {
  padding: 0 12px;
  font-size: 15px;
}
.suffix-input .rupee {
  border-right: 0;
  border-left: 1px solid #eee;
}

/* Range slider */
.emi-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red) var(--pct, 5%), #e6e6e6 var(--pct, 5%), #e6e6e6 100%);
  outline: none;
  cursor: pointer;
  margin: 6px 0 4px;
}
.emi-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand-indigo);
  box-shadow: 0 2px 8px rgba(79, 70, 229, .35);
  cursor: pointer;
  transition: transform .15s ease;
}
.emi-range::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}
.emi-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand-indigo);
  box-shadow: 0 2px 8px rgba(79, 70, 229, .35);
  cursor: pointer;
}
.range-marks {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

/* Quick preset chips */
.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.preset-chip {
  padding: 5px 12px;
  border-radius: 50px;
  border: 1px solid var(--line);
  background: #fafafa;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: all .18s ease;
}
.preset-chip:hover {
  border-color: var(--red);
  color: var(--red);
}
.preset-chip.active {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red);
}

/* Tenure unit toggle */
.tenure-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tenure-controls .compact-input {
  width: 96px;
}
.unit-toggle {
  display: inline-flex;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  background: #fafafa;
}
.unit-btn {
  border: 0;
  background: transparent;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  transition: all .18s ease;
}
.unit-btn.active {
  background: var(--red);
  color: #fff;
}

/* Donut chart in result card */
.emi-visual {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, .1);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 18px;
}
.donut-wrap {
  position: relative;
  width: 104px;
  height: 104px;
  flex: 0 0 104px;
}
.donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.donut-svg circle {
  fill: none;
  stroke-width: 14;
}
.donut-track {
  stroke: rgba(255, 255, 255, .2);
}
.donut-interest {
  stroke: #ffc107;
  transition: stroke-dashoffset .45s ease;
}
.donut-principal {
  stroke: #ffffff;
  transition: stroke-dashoffset .45s ease;
}
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
}
.donut-center span {
  font-size: 18px;
  font-weight: 700;
}
.donut-center small {
  font-size: 10.5px;
  opacity: .85;
}
.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
}
.donut-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}

/* Amortization Schedule */
.schedule-wrap {
  margin-top: 28px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  animation: fadeUp .35s ease both;
}
.schedule-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.schedule-head h3 {
  font-size: 22px;
  color: var(--ink);
}
.schedule-head .muted-dark {
  margin-bottom: 0;
}
.schedule-table th:first-child,
.schedule-table td:first-child {
  text-align: left;
}
.year-row {
  cursor: pointer;
  font-weight: 600;
  background: #fff;
}
.year-row:hover {
  background: var(--red-soft) !important;
}
.year-toggle-icon {
  display: inline-block;
  width: 20px;
  color: var(--red);
  font-weight: 700;
}
.month-row {
  background: #fafafa;
  font-size: 13.5px;
}
.month-row td {
  padding: 10px 18px;
  color: var(--muted);
}
.month-row td:first-child {
  padding-left: 40px;
}

/* Formula box in article */
.formula-highlight {
  margin-top: 16px;
}
.formula-vars {
  margin: 12px 0 16px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
}
.formula-vars li {
  list-style: disc;
}

@media (max-width: 600px) {
  .slider-header {
    flex-direction: column;
    align-items: stretch;
  }
  .compact-input {
    width: 100%;
  }
  .tenure-controls .compact-input {
    flex: 1;
  }
  .emi-visual {
    flex-direction: column;
    text-align: center;
  }
  .schedule-wrap {
    padding: 18px 14px;
  }
}
