/* ==========================================================================
   Calculator Archive - Debt Consolidation Calculator Stylesheet
   Exact visual match to reference images, responsive & high-contrast design
   ========================================================================== */

:root {
  --primary-blue: #1c3d5a;
  --secondary-blue: #2b5a88;
  --header-bg: #203854;
  --btn-green: #5b8a1c;
  --btn-green-hover: #4d7517;
  --btn-gray: #888888;
  --btn-gray-hover: #737373;
  --panel-bg: #f4f4f4;
  --panel-border: #cbd5e1;
  --table-border: #7ba2c7;
  --link-blue: #185294;
  --text-dark: #111111;
  --text-muted: #555555;
  --success-green: #2e7d32;
  --card-bg: #ffffff;
}

/* Base Container */
.dc-page-container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 16px 20px 40px;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  color: #222222;
}

/* Top Bar: Breadcrumbs & Utility Buttons */
.dc-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.dc-breadcrumbs {
  font-size: 13px;
  color: #64748b;
}

.dc-breadcrumbs a {
  color: var(--link-blue);
  text-decoration: none;
}

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

.dc-breadcrumbs .sep {
  margin: 0 5px;
  color: #94a3b8;
}

.dc-breadcrumbs .current {
  color: #334155;
  font-weight: 500;
}

.dc-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dc-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dc-tool-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.dc-tool-btn.primary-accent {
  background: #2b5a88;
  border-color: #204366;
  color: #ffffff;
}

.dc-tool-btn.primary-accent:hover {
  background: #204569;
}

.dc-badge {
  background: #255582;
  color: #ffffff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 10px;
  margin-left: 2px;
}

/* Page Title & Intro */
.dc-main-title {
  font-size: 26px;
  font-weight: bold;
  color: #1a365d;
  margin: 0 0 10px 0;
  letter-spacing: -0.2px;
}

.dc-intro-text {
  font-size: 13.5px;
  color: #333333;
  margin: 0 0 20px 0;
  line-height: 1.5;
  max-width: 980px;
}

/* Two-Column Layout */
.dc-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 860px) {
  .dc-layout-grid {
    grid-template-columns: 1fr;
  }
}

/* Main Form Panel - Exact match to Image 2 */
.dc-form-panel {
  background-color: #efefef;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  padding: 18px 20px;
  margin-bottom: 24px;
}

/* Debt Table */
.dc-table-container {
  overflow-x: auto;
  margin-bottom: 10px;
}

.dc-input-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: transparent;
}

.dc-input-table th {
  text-align: center;
  padding: 6px 8px;
  font-weight: normal;
  color: #222222;
  border: none;
  white-space: nowrap;
}

.dc-input-table th:first-child {
  width: 24px;
}

.dc-input-table td {
  padding: 4px 5px;
  vertical-align: middle;
}

.dc-row-num {
  text-align: right;
  padding-right: 6px;
  font-size: 13px;
  color: #333333;
  width: 20px;
}

.dc-name-input {
  width: 100%;
  height: 28px;
  border: 1px solid #7ba2c7;
  border-radius: 2px;
  padding: 2px 6px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
  background: #ffffff;
}

.dc-name-input:focus {
  outline: none;
  border-color: #2b5a88;
  box-shadow: 0 0 0 1px #2b5a88;
}

.dc-cell-wrap {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #7ba2c7;
  border-radius: 2px;
  height: 28px;
  padding: 0 5px;
  box-sizing: border-box;
}

.dc-cell-wrap:focus-within {
  border-color: #2b5a88;
  box-shadow: 0 0 0 1px #2b5a88;
}

.dc-cell-symbol {
  font-size: 13px;
  color: #333333;
  user-select: none;
  margin-right: 2px;
}

.dc-cell-unit {
  font-size: 13px;
  color: #333333;
  user-select: none;
  margin-left: 2px;
}

.dc-cell-input {
  border: none;
  outline: none;
  font-size: 13px;
  font-family: inherit;
  color: #111111;
  width: 100%;
  background: transparent;
  padding: 0;
}

/* More Link Row */
.dc-more-link-row {
  margin: 6px 0 18px 26px;
}

.dc-more-link {
  font-size: 13px;
  color: var(--link-blue);
  text-decoration: none;
  cursor: pointer;
}

.dc-more-link:hover {
  text-decoration: underline;
}

/* Consolidation Loan Section */
.dc-consolidation-section {
  margin-top: 14px;
}

.dc-section-title {
  font-size: 14px;
  font-weight: bold;
  color: #111111;
  margin-bottom: 10px;
}

.dc-loan-table {
  border-collapse: collapse;
  font-size: 13px;
}

.dc-loan-table td {
  padding: 4px 8px 4px 0;
  vertical-align: middle;
}

.dc-label-col {
  width: 120px;
  color: #111111;
  font-size: 13px;
  font-weight: normal;
}

.dc-input-col {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dc-term-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dc-term-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dc-fee-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dc-select-fee {
  height: 28px;
  border: 1px solid #7ba2c7;
  border-radius: 2px;
  background: #ffffff;
  font-size: 13px;
  padding: 0 4px;
  cursor: pointer;
  outline: none;
}

/* Action Buttons: Calculate ▶ & Clear */
.dc-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-left: 120px;
}

@media (max-width: 500px) {
  .dc-actions-row {
    padding-left: 0;
  }
}

.dc-btn-calc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: #4c8a24;
  color: #ffffff;
  border: 1px solid #366617;
  border-radius: 3px;
  padding: 6px 18px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
  transition: background-color 0.15s ease;
}

.dc-btn-calc:hover {
  background-color: #3f741d;
}

.dc-play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: #ffffff;
  color: #4c8a24;
  border-radius: 50%;
  font-size: 8px;
  font-weight: bold;
  padding-left: 1px;
}

.dc-btn-clear {
  background-color: #888888;
  color: #ffffff;
  border: 1px solid #707070;
  border-radius: 3px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: normal;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.dc-btn-clear:hover {
  background-color: #737373;
}

/* Results Section */
.dc-results-panel {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.dc-results-title {
  font-size: 20px;
  font-weight: bold;
  color: #1e3a8a;
  margin: 0 0 14px 0;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

/* Highlights Grid */
.dc-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.dc-stat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 14px;
  text-align: left;
}

.dc-stat-card.highlight-green {
  background: #f0fdf4;
  border-color: #86efac;
}

.dc-stat-card.highlight-blue {
  background: #eff6ff;
  border-color: #93c5fd;
}

.dc-stat-label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.dc-stat-val {
  font-size: 18px;
  font-weight: bold;
  color: #0f172a;
}

.dc-stat-card.highlight-green .dc-stat-val {
  color: #166534;
}

.dc-stat-card.highlight-blue .dc-stat-val {
  color: #1e40af;
}

.dc-stat-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* Comparison Table */
.dc-comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 14px 0 22px;
  border: 1px solid #cbd5e1;
}

.dc-comp-table th {
  background: #f1f5f9;
  color: #1e293b;
  padding: 8px 10px;
  font-weight: bold;
  border: 1px solid #cbd5e1;
  text-align: left;
}

.dc-comp-table td {
  padding: 7px 10px;
  border: 1px solid #e2e8f0;
  color: #334155;
}

.dc-comp-table tr:nth-child(even) {
  background: #f8fafc;
}

.dc-comp-table .winner {
  font-weight: bold;
  color: #166534;
}

.dc-comp-table .savings-positive {
  font-weight: bold;
  color: #166534;
  background: #f0fdf4;
}

/* Charts Layout */
.dc-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

@media (max-width: 680px) {
  .dc-charts-grid {
    grid-template-columns: 1fr;
  }
}

.dc-chart-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  text-align: center;
}

.dc-chart-header {
  font-size: 13px;
  font-weight: bold;
  color: #334155;
  margin-bottom: 8px;
}

.dc-chart-canvas {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Amortization Table */
.dc-amort-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-top: 10px;
}

.dc-amort-table th {
  background: #e2e8f0;
  color: #334155;
  padding: 6px 8px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  text-align: center;
}

.dc-amort-table td {
  padding: 5px 8px;
  border: 1px solid #e2e8f0;
  text-align: right;
}

.dc-amort-table td:first-child {
  text-align: center;
}

.dc-amort-table tr:nth-child(even) {
  background: #f8fafc;
}

/* Right Sidebar (Exact match to Image 2) */
.dc-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dc-side-search-form {
  display: flex;
  gap: 4px;
}

.dc-search-wrap {
  position: relative;
  flex: 1;
}

.dc-search-input {
  width: 100%;
  height: 28px;
  border: 1px solid #7ba2c7;
  border-radius: 2px;
  padding: 2px 8px;
  font-size: 13px;
  box-sizing: border-box;
}

.dc-search-input:focus {
  outline: none;
  border-color: #2b5a88;
}

.dc-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}

.dc-search-dropdown a {
  display: block;
  padding: 6px 10px;
  font-size: 12px;
  color: #1e293b;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
}

.dc-search-dropdown a:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.dc-search-btn {
  background: #333333;
  color: #ffffff;
  border: 1px solid #222222;
  border-radius: 2px;
  padding: 0 12px;
  font-size: 13px;
  cursor: pointer;
  height: 28px;
}

.dc-search-btn:hover {
  background: #444444;
}

/* Sidebar Financial Calculators Box */
.dc-side-card {
  border: 1px solid #7ba2c7;
  border-radius: 2px;
  overflow: hidden;
  background: #ffffff;
}

.dc-side-card-title {
  background: #2b5a88;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: bold;
  padding: 6px 10px;
}

.dc-side-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px 10px;
  column-gap: 10px;
  row-gap: 4px;
  font-size: 12px;
}

.dc-side-card-grid a {
  color: var(--link-blue);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dc-side-card-grid a:hover {
  text-decoration: underline;
}

.dc-side-card-footer {
  border-top: 1px solid #cbd5e1;
  padding: 6px 10px;
  font-size: 11px;
  color: #64748b;
  background: #f8fafc;
  text-align: center;
}

.dc-side-card-footer a {
  color: var(--link-blue);
  text-decoration: none;
}

.dc-side-card-footer a:hover {
  text-decoration: underline;
}

/* Fraction Arithmetic Section */
.dc-fraction-section {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: 3px solid #2b5a88;
  border-radius: 4px;
  padding: 18px 20px;
  margin: 30px 0;
}

.dc-fraction-grid {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.dc-fraction-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}

.dc-frac-whole {
  width: 36px;
  height: 32px;
  text-align: center;
  border: 1px solid #94a3b8;
  border-radius: 3px;
  font-size: 14px;
}

.dc-frac-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.dc-frac-num,
.dc-frac-den {
  width: 38px;
  height: 22px;
  text-align: center;
  border: 1px solid #94a3b8;
  border-radius: 3px;
  font-size: 13px;
}

.dc-frac-bar {
  width: 100%;
  height: 2px;
  background: #334155;
  margin: 2px 0;
}

.dc-frac-op-select {
  height: 34px;
  font-size: 16px;
  font-weight: bold;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  background: #ffffff;
  padding: 0 8px;
  cursor: pointer;
}

.dc-frac-res-box {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 12px 16px;
  margin-top: 14px;
}

/* Modal Backdrops & Dialogs (Image 1 Clone) */
.dc-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  box-sizing: border-box;
}

.dc-modal-dialog {
  background: #ffffff;
  border-radius: 4px;
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: dcModalFadeIn 0.18s ease-out;
}

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

/* Image 1 Clone Header */
.dc-modal-header {
  background: #255582;
  color: #ffffff;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dc-modal-title {
  font-size: 15px;
  font-weight: bold;
  color: #ffffff;
}

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

.dc-modal-close:hover {
  color: #cbd5e1;
}

/* Image 1 Clone Body */
.dc-modal-body {
  padding: 16px;
}

.dc-modal-intro {
  font-size: 13px;
  color: #555555;
  margin-bottom: 14px;
}

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

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

.dc-modal-input {
  width: 100%;
  height: 28px;
  border: 1px solid #7ba2c7;
  border-radius: 2px;
  padding: 2px 6px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}

.dc-modal-input:focus {
  outline: none;
  border-color: #255582;
}

.dc-modal-submit-btn {
  background: #255582;
  color: #ffffff;
  border: 1px solid #1a3d5e;
  border-radius: 3px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.dc-modal-submit-btn:hover {
  background: #1d4368;
}

.dc-modal-result-box {
  margin-top: 14px;
  padding: 10px 12px;
  background: #eef3f8;
  border: 1px solid #b8cee2;
  border-radius: 3px;
  font-size: 13px;
  color: #1e3a5f;
}

/* Toast */
.dc-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1c3d5a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 13px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  z-index: 9999;
  transition: opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
}

/* Editorial / SEO Content */
.dc-editorial-content {
  margin-top: 35px;
  font-size: 14px;
  line-height: 1.65;
  color: #334155;
}

.dc-editorial-content h2 {
  font-size: 20px;
  font-weight: bold;
  color: #0f172a;
  margin: 24px 0 10px;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 6px;
}

.dc-editorial-content h3 {
  font-size: 16px;
  font-weight: bold;
  color: #1e293b;
  margin: 18px 0 8px;
}

.dc-editorial-content p {
  margin-bottom: 12px;
}

.dc-editorial-content ul,
.dc-editorial-content ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.dc-editorial-content li {
  margin-bottom: 6px;
}

.dc-formula-box {
  background: #f8fafc;
  border-left: 4px solid #2b5a88;
  padding: 12px 16px;
  margin: 14px 0;
  font-family: Consolas, monospace;
  font-size: 13px;
  color: #0f172a;
  border-radius: 0 4px 4px 0;
}

.dc-faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  margin-bottom: 10px;
  overflow: hidden;
}

.dc-faq-q {
  background: #f8fafc;
  padding: 10px 14px;
  font-weight: bold;
  font-size: 14px;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dc-faq-q:hover {
  background: #f1f5f9;
}

.dc-faq-a {
  padding: 12px 14px;
  font-size: 13.5px;
  color: #475569;
  border-top: 1px solid #e2e8f0;
  line-height: 1.55;
  background: #ffffff;
}
