@charset "UTF-8";
/* ===== LOAN CALCULATOR ===== */
.loan-calculator {
  background: #f9fafb;
  padding: 24px;
}
.loan-calculator__form {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.loan-calculator__form-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 20px;
}
.loan-calculator__type {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}
.loan-calculator__radio {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
}
.loan-calculator__radio input[type=radio] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.loan-calculator__section {
  margin-bottom: 24px;
}
.loan-calculator__section-title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  /* margin-bottom: 16px; */
}
.loan-calculator__field {
  margin-bottom: 16px;
}
.loan-calculator__field--property {
  margin-bottom: 16px;
}
.loan-calculator__field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.loan-calculator__label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}
.loan-calculator__label--toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.loan-calculator__required {
  color: #ef4444;
}
.loan-calculator__help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 12px;
  cursor: help;
  margin-left: 4px;
}
.loan-calculator__input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  .loan-calculator__select{
    flex: 1;
  }
}
.loan-calculator__input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #111827;
  transition: all 0.2s ease;
  width: 100%;
  min-width: 60px;
}
.loan-calculator__input:focus {
  outline: none;
  border-color: var(--color-1);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.loan-calculator__input--percentage {
  max-width: 80px;
}
.loan-calculator__input--amount {
  flex: 1;
}
.loan-calculator__input--date {
  flex: 1;
}
.loan-calculator__select {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #111827;
  background: white;
  cursor: pointer;
  min-width: 100px;
  width: 100%;
}
.loan-calculator__select:focus {
  outline: none;
  border-color: var(--color-1);
}
.loan-calculator__currency, .loan-calculator__percent {
  font-size: 14px;
  color: #6b7280;
  white-space: nowrap;
}
.loan-calculator__text-value {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}
.loan-calculator__interest {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.loan-calculator__interest-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.loan-calculator__toggle {
  position: relative;
  width: 44px;
  height: 24px;
  appearance: none;
  background: #d1d5db;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.loan-calculator__toggle:checked {
  background: var(--color-1);
}
.loan-calculator__toggle::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: transform 0.3s ease;
}
.loan-calculator__toggle:checked::after {
  transform: translateX(20px);
}
.loan-calculator__toggle-slider {
  position: absolute;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  pointer-events: none;
}
.loan-calculator__prepayment {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}
.loan-calculator__prepayment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.loan-calculator__fee-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.loan-calculator__fee-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.loan-calculator__fee-item label {
  font-size: 12px;
  color: #6b7280;
}
.loan-calculator__fee-item .loan-calculator__input {
  width: 100%;
}
.loan-calculator__fee-item span {
  font-size: 14px;
  color: #6b7280;
  margin-top: -32px;
  margin-left: auto;
  margin-right: 8px;
  pointer-events: none;
}
.loan-calculator__btn {
  width: 100%;
  padding: 12px 24px;
  background: var(--color-1);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.loan-calculator__btn:hover {
  background: var(--color-2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}
.loan-calculator__btn--secondary {
  background: white;
  color: var(--color-1);
  border: 1px solid var(--color-1);
}
.loan-calculator__btn--secondary:hover {
  background: #eff6ff;
}
.loan-calculator__results {
  background: #f0f5ff;
  border-radius: 12px;
  padding: 24px;
}
.loan-calculator__results-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--color-1);
}
.loan-calculator__chart {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 24px;
  max-width: 100%;
}
.loan-calculator__chart canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 200px;
  max-height: 200px;
}
.loan-calculator__chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  white-space: nowrap;
}
.loan-calculator__chart-label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}
.loan-calculator__chart-value {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}
.loan-calculator__breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.loan-calculator__breakdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #374151;
}
.loan-calculator__breakdown-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.loan-calculator__breakdown-dot--red {
  background: #ef4444;
}
.loan-calculator__breakdown-dot--green {
  background: #10b981;
}
.loan-calculator__breakdown-dot--orange {
  background: #f59e0b;
}
.loan-calculator__breakdown-dot--blue {
  background: #3b82f6;
}
.loan-calculator__breakdown-dot--teal {
  background: #14b8a6;
}
.loan-calculator__breakdown-value {
  margin-left: auto;
  font-weight: 600;
  color: #111827;
}
.loan-calculator__breakdown-percent {
  min-width: 60px;
  text-align: right;
  color: #6b7280;
}
.loan-calculator__disclaimer {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 24px;
  line-height: 1.5;
}
.loan-calculator__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.loan-calculator__actions .loan-calculator__btn {
  width: fit-content;
  font-size: 14px;
  padding: 8px 10px;
}

/* Payment Schedule Modal */
.loan-schedule__modal .modal-custom__dialog {
  max-width: 1200px;
}
.loan-schedule__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.loan-schedule__title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}
.loan-schedule__export {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-1);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.loan-schedule__export:hover {
  background: var(--color-2);
}
.loan-schedule__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.loan-schedule__table th,
.loan-schedule__table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}
.loan-schedule__table th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
  position: sticky;
  top: 0;
}
.loan-schedule__table td {
  color: #111827;
}
.loan-schedule__table tbody tr:hover {
  background: #f9fafb;
}

@media (max-width: 768px) {
  .loan-calculator {
    padding: 0;
    gap: 20px;
    background: transparent;
  }
  .loan-calculator__form {
    padding: 16px;
    border: 1px solid #eee;
  }
}
/* Loan Comparison Table */
.loan-schedule__modal .modal-custom__header {
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.loan-schedule__modal .modal-custom__body {
  padding: 0;
}
.loan-schedule__modal .modal-custom__body #loanScheduleTable {
  margin: 20px;
  overflow-x: auto;
}

@media (max-width: 768px) {
  .loan-schedule__modal .modal-custom__body #loanScheduleTable {
    margin: 10px;
  }
  
  .loan-schedule__table {
    font-size: 12px;
    min-width: 800px;
  }
  
  .loan-schedule__table th,
  .loan-schedule__table td {
    padding: 8px;
  }
  
  .loan-schedule__modal .modal-custom__header {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .loan-schedule__export {
    width: 100%;
    justify-content: center;
  }
}

.loan-comparison__modal .modal-custom__dialog {
  max-width: 1200px;
}
.loan-comparison__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  font-size: 14px;
}
.loan-comparison__table thead {
  background: #f9fafb;
}
.loan-comparison__table thead tr th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}
.loan-comparison__table thead tr th:first-child {
  width: 200px;
  min-width: 200px;
}
.loan-comparison__table thead tr th:nth-child(2), .loan-comparison__table thead tr th:nth-child(4) {
  background: #eff6ff;
  color: var(--color-1, #3b82f6);
}
.loan-comparison__table thead tr th:nth-child(3) {
  background: #ffffff;
}
.loan-comparison__table tbody tr {
  transition: background-color 0.2s ease;
}
.loan-comparison__table tbody tr:hover {
  background: #f9fafb;
}
.loan-comparison__table tbody tr:last-child td {
  border-bottom: none;
}
.loan-comparison__table tbody tr td {
  padding: 16px 20px;
  text-align: left;
  color: #111827;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}
.loan-comparison__table tbody tr td:first-child {
  font-weight: 600;
  color: #374151;
  background: #f9fafb;
}
.loan-comparison__table tbody tr td:nth-child(2), .loan-comparison__table tbody tr td:nth-child(4) {
  background: #eff6ff;
  color: #111827;
  font-weight: 500;
}
.loan-comparison__table tbody tr td:nth-child(3) {
  background: #ffffff;
}
.loan-comparison__table tbody tr td strong {
  font-weight: 600;
  color: #111827;
}
@media (max-width: 768px) {
  .loan-comparison__table {
    font-size: 12px;
  }
  .loan-comparison__table thead tr th,
  .loan-comparison__table tbody tr td {
    padding: 12px 16px;
    font-size: 12px;
  }
  .loan-comparison__table thead tr th:first-child {
    width: 150px;
    min-width: 150px;
  }
}
@media (max-width: 640px) {
  .loan-comparison__table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .loan-comparison__table thead,
  .loan-comparison__table tbody,
  .loan-comparison__table tr,
  .loan-comparison__table th,
  .loan-comparison__table td {
    display: block;
  }
  .loan-comparison__table thead {
    display: none;
  }
  .loan-comparison__table tbody tr {
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
  }
  .loan-comparison__table tbody tr td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
  }
  .loan-comparison__table tbody tr td:first-child {
    font-weight: 700;
    font-size: 14px;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
  }
  .loan-comparison__table tbody tr td:before {
    content: attr(data-label);
    font-weight: 600;
    color: #6b7280;
    margin-right: 12px;
    flex-shrink: 0;
  }
  .loan-comparison__table tbody tr td:nth-child(2):before {
    content: "Trả trước hạn: ";
  }
  .loan-comparison__table tbody tr td:nth-child(3):before {
    content: "Trả bình thường: ";
  }
  .loan-comparison__table tbody tr td:nth-child(4):before {
    content: "Chênh lệch: ";
  }
}
/*# sourceMappingURL=maps/loan-calculator.css.map */
