.loan-calculator-page {
  overflow-x: hidden;
}

.loan-calculator-page .footer-bottom {
  position: relative;
  padding-bottom: 0;
}

.emi-calculator-app {
  --emi-primary: #0B0A88;
  --emi-accent: #55D1CB;
  --emi-text: #2d2d2d;
  --emi-muted: #6c6c6c;
  --emi-surface: #eeeeee;
  --emi-card: #ffffff;
  --emi-line: #dfe4e7;
  color: var(--emi-text);
  font-family: "Rubik", sans-serif;
}

.emi-calculator-app * {
  box-sizing: border-box;
}

.emi-calculator-app .emi-shell {
  max-width: 1120px;
  margin: 0 auto 48px;
}

.emi-calculator-app .emi-hero {
  margin-bottom: 35px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.emi-calculator-app .emi-section-title {
  margin: 0 auto 40px;
  text-align: center;
}

.emi-calculator-app .emi-hero-top {
  display: block;
  margin-bottom: 0;
}

.emi-calculator-app .emi-eyebrow {
  font-size: 14px;
  padding-bottom: 5px;
  margin-bottom: 15px;
  display: inline-block;
  position: relative;
  color: var(--emi-text);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}

.emi-calculator-app .emi-eyebrow::before {
  content: "";
  position: absolute;
  background-color: var(--emi-primary);
  height: 1px;
  left: 0;
  right: 0;
  bottom: 0;
}

.emi-calculator-app .emi-hero h2 {
  font-size: 40px;
  margin-bottom: 20px;
  line-height: 1.4;
  color: #222222;
}

.emi-calculator-app .emi-subtext {
  max-width: 760px;
  margin: 0 auto;
  color: var(--emi-muted);
  font-size: 15px;
  line-height: 1.8;
}

.emi-calculator-app .emi-card {
  margin-top: 25px;
  padding: 35px 32px;
  background: var(--emi-surface);
  border: 1px solid #e3e3e3;
  border-radius: 5px;
  box-shadow: none;
}

.emi-calculator-app .emi-card h2,
.emi-calculator-app .emi-card h3 {
  margin: 0 0 22px;
  color: #222222;
  font-size: 28px;
}

.emi-calculator-app .emi-form-card h2,
.emi-calculator-app #resultCard > h2 {
  position: relative;
  padding-bottom: 10px;
}

.emi-calculator-app .emi-form-card h2::after,
.emi-calculator-app #resultCard > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 52px;
  height: 2px;
  background: var(--emi-primary);
}

.emi-calculator-app .emi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.emi-calculator-app .emi-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--emi-text);
}

.emi-calculator-app .emi-field-label {
  font-weight: 500;
}

.emi-calculator-app .emi-field-hint,
.emi-calculator-app .emi-note {
  color: var(--emi-muted);
  font-size: 13px;
  line-height: 1.7;
}

.emi-calculator-app .emi-note {
  margin-top: 18px;
}

.emi-calculator-app .emi-input-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.emi-calculator-app .emi-tenure-entry {
  position: relative;
}

.emi-calculator-app .emi-tenure-entry input {
  padding-right: 110px;
}

.emi-calculator-app .emi-tenure-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border: 1px solid #d7d7d7;
  border-radius: 3px;
  background: #f3f4f6;
}

.emi-calculator-app .emi-tenure-unit {
  min-width: 42px;
  height: 34px;
  padding: 0 10px;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: var(--emi-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

.emi-calculator-app .emi-tenure-unit.is-active {
  background: var(--emi-primary);
  color: #ffffff;
}

.emi-calculator-app input,
.emi-calculator-app select,
.emi-calculator-app button {
  font: inherit;
}

.emi-calculator-app input,
.emi-calculator-app select {
  width: 100%;
  height: 55px;
  padding: 10px 14px;
  border: 1px solid #d7d7d7;
  border-radius: 3px;
  background: #ffffff;
  color: var(--emi-text);
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.emi-calculator-app input:focus,
.emi-calculator-app select:focus {
  outline: none;
  border-color: var(--emi-primary);
  box-shadow: 0 0 0 1px rgba(11, 10, 136, 0.1);
}

.emi-calculator-app input[type="range"] {
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  accent-color: var(--emi-primary);
  background: transparent;
}

.emi-calculator-app .emi-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.emi-calculator-app .emi-metric {
  padding: 24px 20px;
  background: var(--emi-card);
  border-left: 4px solid var(--emi-primary);
  border-radius: 3px;
  box-shadow: 0 0 20px #eeeeee;
  text-align: center;
}

.emi-calculator-app .emi-metric:nth-child(2) {
  border-left-color: var(--emi-accent);
}

.emi-calculator-app .emi-metric:nth-child(3) {
  border-left-color: #3f5967;
}

.emi-calculator-app .emi-metric-label {
  display: block;
  margin-bottom: 8px;
  color: var(--emi-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.emi-calculator-app .emi-metric strong {
  color: var(--emi-primary);
  font-size: 30px;
}

.emi-calculator-app .emi-breakup-card,
.emi-calculator-app .emi-yearly-chart-card {
  margin-top: 25px;
  padding: 24px;
  border: 1px solid var(--emi-line);
  border-radius: 5px;
  background: #ffffff;
}

.emi-calculator-app .emi-breakup-card h3,
.emi-calculator-app .emi-yearly-chart-card h3,
.emi-calculator-app .emi-result-top h3,
.emi-calculator-app #resultCard > h3 {
  font-size: 22px;
  margin-bottom: 18px;
}

.emi-calculator-app .emi-breakup-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.emi-calculator-app .emi-breakup-legend {
  min-width: 220px;
  flex: 1;
}

.emi-calculator-app .emi-breakup-legend p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  color: var(--emi-muted);
  font-size: 15px;
}

.emi-calculator-app .emi-breakup-legend strong {
  color: var(--emi-primary);
}

.emi-calculator-app .emi-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 0;
}

.emi-calculator-app .emi-principal-dot {
  background: var(--emi-primary);
}

.emi-calculator-app .emi-interest-dot {
  background: var(--emi-accent);
}

.emi-calculator-app #emiBreakupChart {
  width: 190px !important;
  height: 190px !important;
}

.emi-calculator-app .emi-yearly-chart-wrap {
  position: relative;
  width: 100%;
}

.emi-calculator-app .emi-yearly-chart-wrap canvas {
  width: 100% !important;
}

.emi-calculator-app .emi-result-top {
  margin-top: 28px;
}

.emi-calculator-app .emi-related-calculators {
  margin-top: 25px;
}

.emi-calculator-app .emi-related-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.emi-calculator-app .emi-related-tab {
  margin: 0;
  padding: 11px 18px;
  border: 1px solid var(--emi-line);
  border-radius: 3px;
  background: #ffffff;
  color: var(--emi-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
  white-space: nowrap;
  flex: 0 0 auto;
}

.emi-calculator-app .emi-related-tab.is-active {
  background: var(--emi-primary);
  border-color: var(--emi-primary);
  color: #ffffff;
}

.emi-calculator-app .emi-related-panels {
  margin-top: 18px;
}

.emi-calculator-app .emi-related-card {
  padding: 24px 20px;
  border: 1px solid var(--emi-line);
  background: #ffffff;
  border-radius: 5px;
}

.emi-calculator-app .emi-related-panel[hidden] {
  display: none !important;
}

.emi-calculator-app .emi-related-head h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.emi-calculator-app .emi-related-head p {
  margin: 0;
  color: var(--emi-muted);
  font-size: 14px;
  line-height: 1.7;
}

.emi-calculator-app .emi-related-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.emi-calculator-app .emi-related-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.emi-calculator-app .emi-related-metric {
  padding: 14px 16px;
  border-left: 4px solid var(--emi-primary);
  background: var(--emi-surface);
}

.emi-calculator-app .emi-related-metric:nth-child(2) {
  border-left-color: var(--emi-accent);
}

.emi-calculator-app .emi-related-metric:nth-child(3) {
  border-left-color: #3f5967;
}

.emi-calculator-app .emi-related-metric span {
  display: block;
  margin-bottom: 6px;
  color: var(--emi-muted);
  font-size: 13px;
}

.emi-calculator-app .emi-related-metric strong {
  color: var(--emi-primary);
  font-size: 22px;
}

.emi-calculator-app .emi-schedule-accordion {
  display: grid;
  gap: 12px;
  margin-top: 15px;
}

.emi-calculator-app .emi-year-group {
  overflow: hidden;
  border: 1px solid var(--emi-line);
  border-radius: 3px;
  background: #ffffff;
}

.emi-calculator-app .emi-year-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 18px;
  background: #f7f7f7;
  color: #222222;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
}

.emi-calculator-app .emi-year-group > summary::-webkit-details-marker {
  display: none;
}

.emi-calculator-app .emi-year-summary-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.emi-calculator-app .emi-year-chevron {
  width: 10px;
  height: 10px;
  margin-left: auto;
  border-right: 2px solid var(--emi-primary);
  border-bottom: 2px solid var(--emi-primary);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.emi-calculator-app .emi-year-group[open] > summary .emi-year-chevron {
  transform: rotate(225deg);
}

.emi-calculator-app .emi-year-meta {
  color: var(--emi-muted);
  font-size: 13px;
}

.emi-calculator-app .emi-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--emi-line);
  border-radius: 3px;
  background: #ffffff;
}

.emi-calculator-app .emi-year-group .emi-table-wrap {
  margin-top: 0;
  border: none;
  border-radius: 0;
}

.emi-calculator-app table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.emi-calculator-app thead {
  background: #f7f7f7;
}

.emi-calculator-app th,
.emi-calculator-app td {
  padding: 14px 16px;
  border-bottom: 1px solid #ededed;
  color: var(--emi-text);
  font-size: 14px;
  text-align: right;
  white-space: nowrap;
}

.emi-calculator-app th {
  color: #222222;
  font-weight: 500;
}

.emi-calculator-app th:first-child,
.emi-calculator-app td:first-child {
  text-align: left;
}

.emi-calculator-app .emi-hidden {
  display: none;
}

.emi-calculator-app .emi-theme-toggle {
  display: none;
}

.emi-calculator-app .emi-action-bar {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 78px;
  z-index: 5000;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: calc(100vw - 30px);
  transform: translateX(-50%) translateY(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.emi-calculator-app .emi-action-bar.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.emi-calculator-app .emi-action-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 13px 22px;
  border: none;
  border-radius: 5px;
  background-color: var(--emi-primary);
  color: #ffffff;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  user-select: none;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
}

.emi-calculator-app .emi-action-btn:hover {
  background-color: var(--emi-accent);
  color: var(--emi-primary);
}

.emi-calculator-app .emi-action-btn svg {
  width: 16px;
  height: 16px;
}

.emi-calculator-app .emi-share-toast {
  position: fixed;
  left: 50%;
  bottom: 146px;
  z-index: 5600;
  padding: 12px 18px;
  border-radius: 3px;
  background: #3f5967;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.emi-calculator-app .emi-share-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 991px) {
  .emi-calculator-app .emi-card {
    padding: 28px 24px;
  }
}

@media (max-width: 767px) {
  .emi-calculator-app .emi-grid,
  .emi-calculator-app .emi-result-grid {
    grid-template-columns: 1fr;
  }

  .emi-calculator-app .emi-action-bar {
    left: 50%;
    right: auto;
    bottom: 118px;
    gap: 8px;
    max-width: calc(100vw - 20px);
  }

  .emi-calculator-app .emi-share-toast {
    bottom: 182px;
  }

  .emi-calculator-app .emi-breakup-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .emi-calculator-app .emi-breakup-legend p {
    justify-content: flex-start;
  }

  .emi-calculator-app .emi-action-btn span {
    display: none;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .emi-calculator-app .emi-action-btn span {
    display: inline;
  }
}

@media (max-width: 479px) {
  .emi-calculator-app .emi-action-bar {
    left: 50%;
    right: auto;
    bottom: 112px;
    gap: 6px;
    max-width: calc(100vw - 16px);
  }

  .emi-calculator-app .emi-share-toast {
    bottom: 172px;
    max-width: calc(100vw - 24px);
    text-align: center;
  }

  .emi-calculator-app .emi-action-btn {
    padding: 12px 14px;
    min-width: 44px;
    justify-content: center;
  }
}

@media print {
  .emi-calculator-app .emi-form-card,
  .emi-calculator-app .emi-action-bar,
  .emi-calculator-app .emi-share-toast {
    display: none !important;
  }
}
