/* Custom styles to enhance Bootstrap */

/* Calculator page header */
.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calculator-header h1 {
    font-weight: 700;
    color: var(--dark-color);
}

.calculator-header p {
    color: var(--secondary-color);
    max-width: 800px;
    margin: 0 auto;
}

/* Card styling */
.card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin-bottom: 1.5rem;
}

.card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  font-weight: 500;
}

/* Results styling */
.results-container {
  background-color: #fff;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.summary-card {
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease-in-out;
}

.summary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.summary-card h3 {
  font-size: 1rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.summary-card p {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0;
}

.total-debt {
  color: #212529;
}

.payoff-time {
  color: #0d6efd;
}

.interest-saved {
  color: #198754;
}

.total-interest {
  color: #fd7e14;
}

.method-savings {
  color: #6f42c1;
}

/* Progress steps */
.progress-step {
  text-align: center;
  padding: 1rem;
}

.progress-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: #e9ecef;
  margin: 0 auto 1rem;
  color: #6c757d;
  font-size: 1.5rem;
  transition: all 0.2s ease-in-out;
}

.progress-step-text {
  font-size: 0.9rem;
  color: #6c757d;
}

.progress-step.active .progress-step-icon {
  background-color: #0d6efd;
  color: #fff;
}

.progress-step.active .progress-step-text {
  color: #0d6efd;
  font-weight: 500;
}

/* Chart container */
.chart-container {
  height: 400px;
  margin: 2rem 0;
}

/* Debt comparison */
.method-badge {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  margin-left: 0.5rem;
}

.avalanche-badge {
  background-color: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
}

.snowball-badge {
  background-color: rgba(111, 66, 193, 0.1);
  color: #6f42c1;
}

/* Debt list */
.debt-list {
  list-style: none;
  padding-left: 0;
}

.debt-item {
  padding: 1rem;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  background-color: #fff;
  transition: all 0.2s ease-in-out;
}

.debt-item:hover {
  background-color: #f8f9fa;
}

.debt-item.current-focus {
  border-color: #0d6efd;
  background-color: rgba(13, 110, 253, 0.05);
}

.debt-name {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.debt-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.payoff-month-tag {
  display: inline-block;
  background-color: #0d6efd;
  color: white;
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  margin-left: 0.5rem;
}

/* Payment schedule */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.payment-schedule {
  min-width: 100%;
  font-size: 0.9rem;
}

.payment-schedule th {
  position: sticky;
  top: 0;
  background-color: #f8f9fa;
  z-index: 1;
}

.payment-schedule th:first-child,
.payment-schedule td:first-child {
  position: sticky;
  left: 0;
  background-color: #f8f9fa;
  z-index: 2;
}

.payment-schedule th:first-child {
  z-index: 3;
}

.paid-off {
  color: #198754;
  font-style: italic;
}

.total-payment-cell {
  font-weight: 700;
  background-color: #f8f9fa;
}

/* Helper classes */
.method-info {
  padding: 1rem;
  border-radius: 0.5rem;
  border-left: 4px solid #0d6efd;
  background-color: #f8f9fa;
  margin-bottom: 1.5rem;
}

.bg-light-success {
  background-color: rgba(25, 135, 84, 0.1);
}

.bg-light-primary {
  background-color: rgba(13, 110, 253, 0.1);
}

.bg-light-warning {
  background-color: rgba(255, 193, 7, 0.1);
}

.bg-light-danger {
  background-color: rgba(220, 53, 69, 0.1);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .debt-details {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .summary-card p {
    font-size: 1.25rem;
  }
}

@media (max-width: 576px) {
  .calculator-header {
    padding: 1.5rem;
  }
  
  .calculator-header h1 {
    font-size: 1.75rem;
  }
  
  .chart-container {
    height: 300px;
  }
}

/* Calculator steps */
.calculator-step {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.step-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-color: #0d6efd;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    margin-right: 10px;
}
