/* Repayment Calculator Styles - Pixel-Perfect Clone Matching Reference Images */

.rc-page-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 15px 40px;
  font-family: Arial, Helvetica, sans-serif;
  color: #333333;
  box-sizing: border-box;
}

/* Breadcrumbs & Top Utilities */
.rc-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.rc-breadcrumbs {
  color: #0844a4;
}

.rc-breadcrumbs a {
  color: #0844a4;
  text-decoration: none;
}

.rc-breadcrumbs a:hover {
  text-decoration: underline;
}

.rc-breadcrumbs .sep {
  color: #666666;
  margin: 0 4px;
}

.rc-breadcrumbs .current {
  color: #333333;
}

.rc-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rc-print-link {
  color: #0844a4;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-family: inherit;
}

.rc-print-link:hover {
  color: #cc0000;
}

.rc-saved-btn,
.rc-instant-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f4f6f8;
  border: 1px solid #c0c6cc;
  padding: 3px 9px;
  font-size: 11px;
  color: #003366;
  cursor: pointer;
  border-radius: 2px;
  font-family: inherit;
  transition: all 0.15s ease;
}

.rc-saved-btn:hover,
.rc-instant-btn:hover {
  background: #e8ecf0;
  border-color: #003366;
}

/* Page Title & Intro */
.rc-page-title {
  font-size: 24px;
  color: #0844a4;
  font-weight: bold;
  margin: 0 0 8px 0;
  padding: 0;
}

.rc-intro-text {
  font-size: 13px;
  line-height: 1.45;
  color: #222222;
  margin: 0 0 18px 0;
  max-width: 820px;
}

/* Main Layout */
.rc-main-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.rc-content-col {
  flex: 1;
  min-width: 0;
}

/* Top Calculation Row (Form + Results side by side) */
.rc-calc-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}

/* Form Container (Left) */
.rc-form-box {
  width: 320px;
  flex-shrink: 0;
  background: #f3f3f3;
  border: 1px solid #d0d0d0;
  padding: 14px 14px 16px;
  border-radius: 2px;
  box-sizing: border-box;
}

.rc-form-table {
  width: 100%;
  border-collapse: collapse;
}

.rc-form-table td {
  padding: 4px 2px;
  font-size: 13px;
  vertical-align: middle;
}

.rc-form-table td:first-child {
  width: 108px;
  color: #333333;
}

.rc-input-group {
  display: inline-flex;
  align-items: center;
  border: 1px solid #7f9db9;
  background: #ffffff;
  border-radius: 2px;
  height: 24px;
  width: 140px;
  box-sizing: border-box;
}

.rc-input-group:focus-within {
  border-color: #003366;
}

.rc-input-symbol {
  background: #f0f0f0;
  color: #555555;
  font-size: 13px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #d0d0d0;
  height: 100%;
  user-select: none;
}

.rc-input {
  border: none;
  outline: none;
  padding: 2px 6px;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  color: #000000;
  background: transparent;
  box-sizing: border-box;
}

.rc-rate-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rc-input-rate {
  border: 1px solid #7f9db9;
  background: #ffffff;
  border-radius: 2px;
  height: 24px;
  width: 90px;
  padding: 2px 6px;
  font-size: 13px;
  font-family: inherit;
  color: #000000;
  outline: none;
  box-sizing: border-box;
}

.rc-input-rate:focus {
  border-color: #003366;
}

.rc-percent-symbol {
  font-size: 13px;
  color: #333333;
}

.rc-select {
  border: 1px solid #7f9db9;
  background: #ffffff;
  border-radius: 2px;
  height: 24px;
  width: 150px;
  padding: 1px 4px;
  font-size: 13px;
  font-family: inherit;
  color: #000000;
  outline: none;
}

.rc-select:focus {
  border-color: #003366;
}

/* Radio Choice Sections */
.rc-radio-row {
  padding-top: 8px !important;
  vertical-align: top;
}

.rc-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  color: #222222;
  user-select: none;
}

.rc-radio-label input[type="radio"] {
  margin: 0;
  cursor: pointer;
}

.rc-sub-inputs-row {
  padding-left: 20px !important;
  padding-top: 2px !important;
  padding-bottom: 6px !important;
}

.rc-term-inputs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #555555;
}

.rc-term-inputs input {
  border: 1px solid #7f9db9;
  background: #ffffff;
  border-radius: 2px;
  height: 22px;
  width: 44px;
  padding: 1px 4px;
  font-size: 12px;
  font-family: inherit;
  color: #000000;
  outline: none;
  text-align: center;
  box-sizing: border-box;
}

.rc-term-inputs input:focus {
  border-color: #003366;
}

.rc-installment-input {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #555555;
}

/* Buttons */
.rc-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-left: 108px;
}

.rc-calc-btn {
  background-color: #508432;
  color: #ffffff;
  border: none;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: background-color 0.15s ease;
}

.rc-calc-btn:hover {
  background-color: #44702b;
}

.rc-play-icon {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #ffffff;
  margin-left: 2px;
}

.rc-clear-btn {
  background-color: #777777;
  color: #ffffff;
  border: none;
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 3px;
  font-family: inherit;
  transition: background-color 0.15s ease;
}

.rc-clear-btn:hover {
  background-color: #666666;
}

/* Results Box (Right of Form) */
.rc-results-box {
  width: 320px;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 2px;
  overflow: hidden;
  box-sizing: border-box;
}

.rc-results-header {
  background-color: #508432;
  color: #ffffff;
  padding: 6px 10px;
  font-size: 15px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rc-save-disk-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-family: inherit;
  padding: 2px 6px;
  border-radius: 2px;
  transition: background-color 0.15s ease;
}

.rc-save-disk-btn:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.rc-save-disk-btn svg {
  fill: currentColor;
}

.rc-results-content {
  padding: 12px 14px 16px;
}

.rc-results-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 12px;
}

.rc-results-list td {
  padding: 4px 0;
  vertical-align: middle;
}

.rc-results-list td:first-child {
  color: #222222;
  font-weight: normal;
}

.rc-results-list td:last-child {
  text-align: right;
  font-weight: bold;
  color: #000000;
}

/* Donut Chart Container matching Image 2 */
.rc-donut-chart-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 10px 0 14px;
}

.rc-donut-svg-wrap {
  width: 105px;
  height: 105px;
  flex-shrink: 0;
  position: relative;
}

.rc-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #333333;
}

.rc-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rc-legend-square {
  width: 12px;
  height: 12px;
  display: inline-block;
}

.rc-legend-square.principal {
  background-color: #2b76c9;
}

.rc-legend-square.interest {
  background-color: #70a83b;
}

.rc-amort-link-wrap {
  text-align: center;
  padding-top: 4px;
}

.rc-amort-link {
  font-size: 12px;
  color: #0844a4;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}

.rc-amort-link:hover {
  color: #cc0000;
}

/* Amortization Section */
.rc-schedule-section {
  margin-top: 24px;
  border: 1px solid #dcdcdc;
  background: #ffffff;
  border-radius: 2px;
  overflow: hidden;
}

.rc-schedule-header-bar {
  background: #f5f6f8;
  border-bottom: 1px solid #dcdcdc;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.rc-schedule-title {
  font-size: 15px;
  font-weight: bold;
  color: #003366;
  margin: 0;
}

.rc-schedule-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rc-schedule-tab-btn {
  background: #e4e7eb;
  border: 1px solid #c0c6cc;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 2px;
  color: #333333;
  font-family: inherit;
}

.rc-schedule-tab-btn.active {
  background: #224b7a;
  color: #ffffff;
  border-color: #224b7a;
  font-weight: bold;
}

.rc-schedule-action-btn {
  background: #ffffff;
  border: 1px solid #c0c6cc;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  border-radius: 2px;
  color: #003366;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}

.rc-schedule-action-btn:hover {
  background: #f0f4f8;
}

/* Schedule Table */
.rc-schedule-table-wrap {
  max-height: 420px;
  overflow-y: auto;
  border-bottom: 1px solid #eeeeee;
}

.rc-schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: right;
}

.rc-schedule-table th {
  background: #eef2f6;
  color: #333333;
  font-weight: bold;
  padding: 6px 10px;
  border-bottom: 1px solid #cccccc;
  position: sticky;
  top: 0;
  z-index: 1;
}

.rc-schedule-table th:first-child,
.rc-schedule-table td:first-child {
  text-align: left;
}

.rc-schedule-table td {
  padding: 5px 10px;
  border-bottom: 1px solid #f0f0f0;
}

.rc-schedule-table tr:nth-child(even) td {
  background: #fafbfd;
}

.rc-schedule-table tr:hover td {
  background: #f0f7ff;
}

/* Payoff Line / Area Graph */
.rc-graph-section {
  padding: 16px 14px;
  background: #fdfdfd;
}

.rc-graph-title {
  font-size: 13px;
  font-weight: bold;
  color: #444444;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rc-graph-legend {
  display: flex;
  gap: 14px;
  font-size: 11px;
  font-weight: normal;
}

.rc-graph-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rc-graph-legend-line {
  width: 16px;
  height: 3px;
  display: inline-block;
}

.rc-graph-legend-line.balance {
  background-color: #2b76c9;
}

.rc-graph-legend-line.interest {
  background-color: #70a83b;
}

.rc-graph-svg {
  width: 100%;
  height: 200px;
  display: block;
}

/* Sidebar Styling (Right Column) */
.rc-sidebar-col {
  width: 250px;
  flex-shrink: 0;
}

.rc-search-form {
  display: flex;
  margin-bottom: 14px;
  position: relative;
}

.rc-search-input {
  flex: 1;
  height: 26px;
  border: 1px solid #7f9db9;
  border-right: none;
  padding: 2px 6px;
  font-size: 12px;
  font-family: inherit;
  border-radius: 2px 0 0 2px;
  outline: none;
}

.rc-search-input:focus {
  border-color: #003366;
}

.rc-search-btn {
  background: #1b538c;
  color: #ffffff;
  border: 1px solid #1b538c;
  padding: 0 10px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 0 2px 2px 0;
  font-family: inherit;
}

.rc-search-btn:hover {
  background: #154270;
}

.rc-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #7f9db9;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  max-height: 280px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.rc-search-dropdown.active {
  display: block;
}

.rc-search-item {
  padding: 6px 8px;
  font-size: 12px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rc-search-item:hover,
.rc-search-item.focused {
  background: #eef5ff;
}

.rc-search-item-cat {
  font-size: 10px;
  color: #888888;
}

.rc-search-empty {
  padding: 10px;
  font-size: 11px;
  color: #777777;
  text-align: center;
}

/* Financial Calculators Card */
.rc-sidebar-card {
  border: 1px solid #b5c7d8;
  background: #ffffff;
  border-radius: 2px;
  overflow: hidden;
}

.rc-sidebar-header {
  background: #23527c;
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  padding: 6px 10px;
}

.rc-sidebar-content {
  padding: 8px 10px;
}

.rc-sidebar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
  font-size: 12px;
}

.rc-sidebar-grid a {
  color: #0844a4;
  text-decoration: none;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rc-sidebar-grid a:hover {
  text-decoration: underline;
}

.rc-sidebar-grid a.active {
  font-weight: bold;
  color: #000000;
}

.rc-sidebar-more {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #e0e8f0;
  font-size: 12px;
}

.rc-sidebar-more a {
  color: #0844a4;
  text-decoration: none;
}

.rc-sidebar-more a:hover {
  text-decoration: underline;
}

.rc-sidebar-cats {
  background: #eef3f8;
  border-top: 1px solid #c8d8e8;
  padding: 6px 8px;
  font-size: 11px;
  color: #444444;
  line-height: 1.4;
  text-align: center;
}

.rc-sidebar-cats a {
  color: #0844a4;
  text-decoration: none;
}

.rc-sidebar-cats a:hover {
  text-decoration: underline;
}

.rc-sidebar-cats .sep {
  color: #888888;
  margin: 0 3px;
}

/* Modal Matching Reference Image 1 (Instant Calculation Tool) */
.rc-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 15px;
}

.rc-modal-backdrop.active {
  display: flex;
}

.rc-modal-window {
  background: #ffffff;
  border-radius: 3px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: rcFadeIn 0.18s ease-out;
}

@keyframes rcFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.rc-modal-header {
  background: #23527c;
  color: #ffffff;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rc-modal-title {
  font-size: 15px;
  font-weight: bold;
  margin: 0;
}

.rc-modal-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-weight: bold;
}

.rc-modal-close:hover {
  color: #ffcccc;
}

.rc-modal-body {
  padding: 16px 18px 20px;
  font-size: 13px;
}

.rc-modal-subtitle {
  color: #555555;
  margin: 0 0 14px 0;
  font-size: 13px;
}

.rc-modal-field {
  margin-bottom: 12px;
}

.rc-modal-label {
  display: block;
  font-weight: bold;
  color: #333333;
  margin-bottom: 4px;
  font-size: 13px;
}

.rc-modal-input {
  width: 100%;
  height: 28px;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  padding: 2px 8px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
}

.rc-modal-input:focus {
  border-color: #003366;
}

.rc-modal-compute-btn {
  background: #23527c;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
  margin-top: 6px;
  font-family: inherit;
  transition: background-color 0.15s ease;
}

.rc-modal-compute-btn:hover {
  background: #1a3f61;
}

.rc-modal-result-box {
  margin-top: 14px;
  padding: 12px;
  background: #f0f7ff;
  border: 1px solid #b8daff;
  border-radius: 2px;
  display: none;
}

.rc-modal-result-box.active {
  display: block;
}

/* Saved Drawer / Modal */
.rc-saved-modal-body {
  max-height: 380px;
  overflow-y: auto;
}

.rc-saved-item {
  border: 1px solid #e0e0e0;
  padding: 10px;
  border-radius: 2px;
  margin-bottom: 8px;
  background: #fafafa;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rc-saved-details {
  font-size: 12px;
  line-height: 1.4;
}

.rc-saved-actions {
  display: flex;
  gap: 6px;
}

.rc-saved-action-btn {
  background: #ffffff;
  border: 1px solid #cccccc;
  padding: 3px 6px;
  font-size: 11px;
  cursor: pointer;
  border-radius: 2px;
}

.rc-saved-action-btn:hover {
  background: #f0f0f0;
}

/* Toast */
.rc-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #23527c;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 3px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
  pointer-events: none;
  z-index: 11000;
}

.rc-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* SEO / AEO / GEO Section Styling */
.rc-seo-section {
  margin-top: 36px;
  border-top: 1px solid #d0d0d0;
  padding-top: 24px;
  font-size: 14px;
  line-height: 1.65;
  color: #2b2b2b;
}

.rc-seo-section h2 {
  font-size: 18px;
  color: #0844a4;
  margin: 18px 0 10px 0;
  font-weight: bold;
}

.rc-seo-section h3 {
  font-size: 15px;
  color: #23527c;
  margin: 14px 0 6px 0;
  font-weight: bold;
}

.rc-seo-section p {
  margin: 0 0 12px 0;
}

.rc-seo-section ul,
.rc-seo-section ol {
  margin: 0 0 14px 20px;
  padding: 0;
}

.rc-seo-section li {
  margin-bottom: 6px;
}

.rc-formula-card {
  background: #f7f9fb;
  border-left: 3px solid #0844a4;
  padding: 12px 14px;
  margin: 12px 0 16px;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  color: #1a365d;
  line-height: 1.5;
}

.rc-aeo-card {
  background: #f0f7ff;
  border: 1px solid #cce5ff;
  border-radius: 3px;
  padding: 12px 14px;
  margin: 14px 0;
}

.rc-aeo-q {
  font-weight: bold;
  color: #004085;
  margin-bottom: 6px;
  font-size: 14px;
}

.rc-aeo-a {
  color: #1b1e21;
  font-size: 13px;
  line-height: 1.55;
}

/* Responsive */
@media (max-width: 820px) {
  .rc-main-layout {
    flex-direction: column;
  }
  .rc-sidebar-col {
    width: 100%;
  }
  .rc-calc-row {
    flex-direction: column;
  }
  .rc-form-box,
  .rc-results-box {
    width: 100%;
  }
  .rc-btn-row {
    padding-left: 0;
    justify-content: flex-start;
  }
}

/* Print Stylesheet */
@media print {
  body {
    background: #ffffff;
    color: #000000;
  }
  .site-header,
  .rc-top-actions,
  .rc-sidebar-col,
  .site-footer,
  .rc-instant-btn,
  .rc-saved-btn,
  .rc-save-disk-btn,
  .rc-btn-row,
  .rc-search-form,
  .rc-modal-backdrop {
    display: none !important;
  }
  .rc-page-container {
    max-width: 100%;
    padding: 0;
  }
  .rc-main-layout {
    display: block;
  }
  .rc-calc-row {
    display: flex;
    gap: 15px;
  }
  .rc-schedule-table-wrap {
    max-height: none;
    overflow: visible;
  }
  .rc-schedule-table th,
  .rc-schedule-table td {
    border: 1px solid #999999;
  }
}
