/* ==========================================================================
   Calculator Archive - Credit Card Payoff Calculator Stylesheet
   Pixel-perfect implementation of Calculator.net design system
   ========================================================================== */

:root {
  --primary-blue: #003366;
  --secondary-blue: #255582;
  --panel-bg: #f3f5f8;
  --panel-border: #cbd5e1;
  --text-main: #222222;
  --text-muted: #555555;
  --btn-green: #3d7a24;
  --btn-green-hover: #32641e;
  --btn-gray: #8a949e;
  --btn-gray-hover: #757e87;
  --link-blue: #0044aa;
  --link-blue-hover: #002277;
  --accent-gold: #e67e22;
  --accent-emerald: #10b981;
  --card-bg: #ffffff;
}

/* Base Page Layout */
.cc-calc-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 15px 40px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text-main);
  line-height: 1.45;
}

/* Breadcrumbs & Action Bar */
.cc-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.cc-breadcrumbs {
  font-size: 13px;
  color: #666666;
}

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

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

.cc-breadcrumbs .sep {
  margin: 0 5px;
  color: #999999;
}

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

.cc-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: #f1f4f8;
  border: 1px solid #c5d1de;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #255582;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.cc-tool-btn:hover {
  background-color: #e2eaf3;
  border-color: #a8bed4;
}

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

/* Page Title & Intro */
.cc-main-title {
  font-size: 26px;
  font-weight: bold;
  color: #111111;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.cc-intro-text {
  font-size: 14px;
  color: #444444;
  margin-bottom: 20px;
  line-height: 1.5;
}

.cc-intro-text a,
.cc-link {
  color: var(--link-blue);
  text-decoration: none;
  cursor: pointer;
}

.cc-intro-text a:hover,
.cc-link:hover {
  text-decoration: underline;
}

/* Layout Split: Main Column & Right Sidebar */
.cc-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 25px;
  align-items: start;
}

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

/* Mode Switcher Tabs */
.cc-mode-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--secondary-blue);
  margin-bottom: 16px;
}

.cc-mode-tab {
  padding: 8px 16px;
  background: #e9edf2;
  border: 1px solid #cbd5e1;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  font-size: 13px;
  font-weight: bold;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cc-mode-tab.active {
  background: var(--secondary-blue);
  color: #ffffff;
  border-color: var(--secondary-blue);
}

/* Calculator Card Form Container */
.cc-form-panel {
  background-color: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 16px 18px;
  margin-bottom: 22px;
}

/* Monthly Budget Row */
.cc-budget-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: bold;
  color: #1a1a1a;
}

.cc-input-wrap {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #a6b8cc;
  border-radius: 3px;
  padding: 0 6px;
  height: 30px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}

.cc-input-wrap:focus-within {
  border-color: #255582;
  box-shadow: 0 0 0 2px rgba(37, 85, 130, 0.2);
}

.cc-input-symbol {
  font-size: 13px;
  color: #555555;
  user-select: none;
  font-weight: normal;
}

.cc-input-text {
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  color: #111111;
  width: 90px;
  padding: 2px 4px;
  background: transparent;
}

.cc-input-text.w-120 {
  width: 120px;
}

.cc-input-text.w-80 {
  width: 80px;
}

.cc-input-text.w-65 {
  width: 65px;
}

/* Cards Table */
.cc-cards-section-header {
  font-size: 14px;
  font-weight: bold;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.cc-table-container {
  overflow-x: auto;
  margin-bottom: 12px;
}

.cc-input-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  border: 1px solid #7ba2c7;
  background: #ffffff;
}

.cc-input-table th {
  text-align: center;
  padding: 6px 8px;
  font-weight: bold;
  color: #333333;
  background: #eef3f8;
  border: 1px solid #cbd5e1;
  white-space: nowrap;
}

.cc-input-table td {
  padding: 4px 6px;
  vertical-align: middle;
  border: 1px solid #cbd5e1;
}

.cc-row-num {
  font-weight: normal;
  color: #333333;
  width: 20px;
  text-align: right;
  border: none !important;
  background: transparent !important;
  padding-right: 6px !important;
}

.cc-card-name-input {
  border: 1px solid #7ba2c7;
  border-radius: 2px;
  padding: 4px 6px;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.cc-card-name-input:focus {
  outline: none;
  border-color: #255582;
  box-shadow: 0 0 0 1px #255582;
}

/* Extra Payments Section (Image 2 clone) */
.cc-extra-payments {
  margin: 14px 0 12px;
  font-size: 13px;
  color: #222222;
}

.cc-extra-heading {
  font-weight: bold;
  font-size: 13px;
  margin-bottom: 6px;
  color: #111111;
}

.cc-extra-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}

.cc-extra-label {
  font-size: 13px;
  color: #222222;
}

.cc-extra-input-num {
  width: 44px;
  height: 26px;
  border: 1px solid #7ba2c7;
  border-radius: 2px;
  text-align: center;
  font-size: 13px;
  font-family: inherit;
}

/* Fixed total monthly payment section (Image 2 clone) */
.cc-fixed-amount-section {
  margin: 14px 0 16px;
}

.cc-fixed-heading {
  font-weight: bold;
  font-size: 13px;
  margin-bottom: 6px;
  color: #111111;
}

.cc-radio-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.cc-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #222222;
  cursor: pointer;
}

.cc-fixed-desc {
  font-size: 12px;
  line-height: 1.5;
  color: #333333;
  margin: 6px 0 14px;
  max-width: 720px;
}

.cc-del-row-btn {
  background: transparent;
  border: none;
  color: #aa3333;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
}

.cc-del-row-btn:hover {
  background: #fde8e8;
}

.cc-more-link-row {
  margin: 6px 0 14px 28px;
}

.cc-more-link {
  font-size: 13px;
  color: var(--link-blue);
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

/* Strategy Selector */
.cc-strategy-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #d1d9e2;
  border-radius: 4px;
}

.cc-strategy-label {
  font-size: 13px;
  font-weight: bold;
  color: #222222;
}

.cc-strategy-select {
  padding: 5px 10px;
  border: 1px solid #a6b8cc;
  border-radius: 3px;
  font-size: 13px;
  font-family: inherit;
  background-color: #ffffff;
  color: #222222;
  cursor: pointer;
  flex: 1;
  min-width: 220px;
}

/* Action Buttons (Calculate / Clear) */
.cc-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-left: 28px;
}

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

.cc-btn-calc:hover {
  background-color: var(--btn-green-hover);
}

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

.cc-btn-clear {
  background-color: var(--btn-gray);
  color: #ffffff;
  border: 1px solid #737c85;
  border-radius: 4px;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: normal;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.cc-btn-clear:hover {
  background-color: var(--btn-gray-hover);
}

/* Related Section (Direct Clone of Reference Image 2) */
.cc-related-section {
  margin: 18px 0 28px;
}

.cc-related-title {
  font-size: 14px;
  font-weight: bold;
  color: #222222;
  margin-bottom: 8px;
}

.cc-related-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cc-rel-btn {
  background-color: #2b5a88;
  color: #ffffff;
  border: 1px solid #1f4265;
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s ease;
}

.cc-rel-btn:hover {
  background-color: #204569;
  text-decoration: none;
}

/* Image 1 Clone: Single Credit Card Payoff Box / Modal */
.cc-single-card-modal {
  background: #ffffff;
  border: 1px solid #a8bed4;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
  max-width: 480px;
  margin: 20px auto;
  overflow: hidden;
}

.cc-single-card-header {
  background-color: var(--secondary-blue);
  color: #ffffff;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: bold;
}

.cc-modal-close-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s ease;
  line-height: 1;
}

.cc-modal-close-btn:hover {
  opacity: 1;
}

.cc-single-card-body {
  padding: 18px 20px 22px;
}

.cc-single-field {
  margin-bottom: 14px;
}

.cc-single-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 5px;
}

.cc-single-input-wrap {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #a6b8cc;
  border-radius: 4px;
  padding: 0 8px;
  height: 34px;
}

.cc-single-input-wrap:focus-within {
  border-color: #255582;
  box-shadow: 0 0 0 2px rgba(37, 85, 130, 0.2);
}

.cc-single-input-wrap input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 14px;
  font-family: inherit;
  color: #111111;
  background: transparent;
}

.cc-single-submit-btn {
  width: 100%;
  background-color: var(--secondary-blue);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.15s ease;
  margin-top: 8px;
}

.cc-single-submit-btn:hover {
  background-color: #1a4166;
}

/* Payoff Results Section */
.cc-results-container {
  background: #ffffff;
  border: 1px solid #d5dde5;
  border-radius: 6px;
  padding: 18px;
  margin-bottom: 26px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.cc-res-header {
  font-size: 18px;
  font-weight: bold;
  color: #1e3a5f;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cc-res-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.cc-stat-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 10px 12px;
  text-align: center;
}

.cc-stat-box.highlight {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.cc-stat-box.highlight-blue {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.cc-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 4px;
}

.cc-stat-val {
  font-size: 18px;
  font-weight: bold;
  color: #1e293b;
}

.cc-stat-val.green {
  color: #166534;
}

.cc-stat-val.blue {
  color: #1d4ed8;
}

/* Strategy Comparison Box */
.cc-comparison-table-wrap {
  margin: 16px 0 20px;
  overflow-x: auto;
}

.cc-comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.cc-comp-table th {
  background: #f1f5f9;
  padding: 8px 12px;
  text-align: left;
  font-weight: bold;
  color: #334155;
  border-bottom: 1px solid #cbd5e1;
}

.cc-comp-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.cc-comp-table tr.active-strat {
  background: #f0fdf4;
  font-weight: bold;
}

/* Missing Charts & Graphs (Requirement 5) */
.cc-charts-panel {
  margin: 22px 0;
}

.cc-charts-title {
  font-size: 16px;
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 12px;
}

.cc-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

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

.cc-chart-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 14px;
}

.cc-chart-card-title {
  font-size: 13px;
  font-weight: bold;
  color: #334155;
  margin-bottom: 10px;
  text-align: center;
}

.cc-svg-container {
  width: 100%;
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cc-chart-legend {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
  font-size: 12px;
  color: #475569;
}

.cc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cc-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

/* Amortization Schedule Table */
.cc-schedule-panel {
  margin-top: 24px;
}

.cc-sched-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.cc-sched-title {
  font-size: 16px;
  font-weight: bold;
  color: #1e293b;
}

.cc-sched-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cc-card-pill {
  font-size: 12px;
  padding: 3px 8px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  cursor: pointer;
  color: #334155;
}

.cc-card-pill.active {
  background: #255582;
  color: #ffffff;
  border-color: #255582;
}

.cc-sched-table-wrap {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}

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

.cc-sched-table th {
  background: #f8fafc;
  padding: 8px 10px;
  font-weight: bold;
  color: #334155;
  border-bottom: 1px solid #cbd5e1;
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: right;
}

.cc-sched-table th:first-child,
.cc-sched-table td:first-child,
.cc-sched-table th:nth-child(2),
.cc-sched-table td:nth-child(2) {
  text-align: left;
}

.cc-sched-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #f1f5f9;
}

.cc-sched-table tr:nth-child(even) {
  background: #fbfcfe;
}

.cc-sched-table tr:hover {
  background: #f1f5f9;
}

.cc-sched-expand-btn {
  display: block;
  width: 100%;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-top: none;
  padding: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--link-blue);
  cursor: pointer;
  text-align: center;
}

.cc-sched-expand-btn:hover {
  background: #eef2f6;
  text-decoration: underline;
}

/* ==========================================================================
   FRACTION ARITHMETIC SECTION (Requirement 1 & 5)
   ========================================================================== */
.cc-fraction-section {
  background: #fdfdfd;
  border: 1px solid #dbe2ea;
  border-radius: 6px;
  padding: 20px;
  margin: 30px 0;
}

.cc-frac-header {
  margin-bottom: 14px;
}

.cc-frac-title {
  font-size: 18px;
  font-weight: bold;
  color: #1e3a5f;
  margin-bottom: 6px;
}

.cc-frac-desc {
  font-size: 13px;
  color: #555555;
  line-height: 1.5;
}

.cc-frac-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: center;
  margin: 16px 0;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.cc-frac-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cc-frac-box-label {
  font-size: 13px;
  font-weight: bold;
  color: #334155;
}

.cc-frac-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cc-frac-whole {
  width: 50px;
  height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
}

.cc-frac-num-den {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cc-frac-num,
.cc-frac-den {
  width: 55px;
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  text-align: center;
  font-size: 13px;
}

.cc-frac-bar-line {
  height: 1px;
  background: #475569;
  width: 100%;
}

.cc-frac-op-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cc-frac-op-select {
  padding: 6px 12px;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  font-size: 18px;
  font-weight: bold;
  background: #ffffff;
  cursor: pointer;
}

.cc-frac-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.cc-frac-results-box {
  margin-top: 16px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
}

.cc-frac-res-heading {
  font-size: 14px;
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 8px;
}

.cc-frac-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.cc-frac-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  color: #1e293b;
}

.cc-frac-pill strong {
  color: #0f172a;
}

.cc-frac-steps {
  font-size: 13px;
  color: #334155;
  background: #fafafa;
  padding: 10px 14px;
  border-left: 3px solid #255582;
  border-radius: 0 4px 4px 0;
  margin-top: 8px;
  line-height: 1.6;
}

/* Fraction SVG Visualizations */
.cc-frac-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 600px) {
  .cc-frac-charts-row {
    grid-template-columns: 1fr;
  }
}

.cc-frac-chart-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 10px;
  text-align: center;
}

.cc-frac-chart-item span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

/* ==========================================================================
   RIGHT SIDEBAR (Matches Calculator.net Standard Pattern)
   ========================================================================== */
.cc-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cc-sidebar-search-box {
  background: #f5f5f5;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  padding: 10px;
  position: relative;
}

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

.cc-search-input {
  flex: 1;
  border: 1px solid #b5b5b5;
  border-radius: 3px;
  padding: 5px 8px;
  font-size: 13px;
  outline: none;
}

.cc-search-input:focus {
  border-color: #255582;
}

.cc-search-submit {
  background: #2b5a88;
  color: #ffffff;
  border: 1px solid #1f4265;
  border-radius: 3px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.cc-search-submit:hover {
  background: #1f4265;
}

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

.cc-search-item {
  padding: 8px 12px;
  font-size: 13px;
  color: #1e293b;
  text-decoration: none;
  display: block;
  border-bottom: 1px solid #f1f5f9;
}

.cc-search-item:hover {
  background: #f1f5f9;
  color: #255582;
}

.cc-sidebar-panel {
  border: 1px solid #9bb5cf;
  border-radius: 4px;
  overflow: hidden;
}

.cc-sidebar-header {
  background: #2b5a88;
  color: #ffffff;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: bold;
}

.cc-sidebar-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #ffffff;
  font-size: 12px;
}

.cc-sidebar-link {
  padding: 6px 10px;
  color: var(--link-blue);
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-sidebar-link:hover {
  text-decoration: underline;
  background-color: #f7f9fa;
}

.cc-sidebar-footer-link {
  display: block;
  padding: 7px 10px;
  background: #eef3f8;
  color: var(--link-blue);
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  border-top: 1px solid #cbd5e1;
}

.cc-sidebar-footer-link:hover {
  text-decoration: underline;
}

.cc-cat-pills-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: #666666;
  padding: 4px 0;
}

.cc-cat-pills-bar a {
  color: var(--link-blue);
  text-decoration: none;
}

.cc-cat-pills-bar a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   SEO / AEO / GEO CONTENT SECTION (500+ Words)
   ========================================================================== */
.cc-seo-article {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  color: #333333;
  line-height: 1.65;
  font-size: 14px;
}

.cc-seo-article h2 {
  font-size: 20px;
  font-weight: bold;
  color: #1e3a5f;
  margin: 18px 0 10px;
}

.cc-seo-article h3 {
  font-size: 16px;
  font-weight: bold;
  color: #255582;
  margin: 16px 0 8px;
}

.cc-seo-article p {
  margin-bottom: 14px;
  text-align: justify;
}

.cc-faq-section {
  margin-top: 28px;
}

.cc-faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  margin-bottom: 10px;
  background: #ffffff;
  overflow: hidden;
}

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

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

.cc-faq-a {
  padding: 12px 16px;
  color: #475569;
  font-size: 13px;
  line-height: 1.6;
  border-top: 1px solid #e2e8f0;
}

/* ==========================================================================
   MODALS (PRINT, HISTORY, INSTANT TOOL)
   ========================================================================== */
.cc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cc-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.cc-modal-window {
  background: #ffffff;
  border-radius: 6px;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.cc-modal-head {
  background: var(--secondary-blue);
  color: #ffffff;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: bold;
}

.cc-modal-content {
  padding: 18px 20px;
  font-size: 13px;
  color: #333333;
}

.cc-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

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

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

/* RTL Support for Arabic */
[dir="rtl"] .cc-breadcrumbs .sep {
  transform: scaleX(-1);
}

[dir="rtl"] .cc-input-table th,
[dir="rtl"] .cc-comp-table th,
[dir="rtl"] .cc-sched-table th:first-child,
[dir="rtl"] .cc-sched-table td:first-child,
[dir="rtl"] .cc-sched-table th:nth-child(2),
[dir="rtl"] .cc-sched-table td:nth-child(2) {
  text-align: right;
}

[dir="rtl"] .cc-sched-table th,
[dir="rtl"] .cc-sched-table td {
  text-align: left;
}

[dir="rtl"] .cc-more-link-row,
[dir="rtl"] .cc-actions-row {
  padding-left: 0;
  padding-right: 28px;
}

[dir="rtl"] .cc-play-icon {
  transform: scaleX(-1);
}

/* Print Styles */
@media print {
  .site-header,
  .cc-top-bar,
  .cc-sidebar,
  .cc-mode-tabs,
  .cc-more-link-row,
  .cc-actions-row,
  .cc-related-section,
  .cc-sched-expand-btn,
  .cc-modal-backdrop:not(#modalPrint),
  .cc-toast {
    display: none !important;
  }

  .cc-layout-grid {
    grid-template-columns: 1fr !important;
  }

  .cc-calc-wrapper {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .cc-results-container,
  .cc-sched-table-wrap {
    max-height: none !important;
    overflow: visible !important;
    border: none !important;
    box-shadow: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
}

/* ==========================================================================
   DEBT PAYOFF & FRACTION ENHANCEMENT STYLES
   ========================================================================== */

/* Fraction Grid & Inputs */
.cc-fraction-grid {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 16px;
  margin: 14px 0;
}

.cc-fraction-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cc-fraction-label {
  font-size: 13px;
  font-weight: bold;
  color: #334155;
}

.cc-fraction-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cc-frac-whole {
  width: 44px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
  background: #ffffff;
}

.cc-frac-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}

.cc-frac-num,
.cc-frac-den {
  width: 52px;
  height: 26px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  text-align: center;
  font-size: 13px;
  background: #ffffff;
}

.cc-frac-bar {
  width: 100%;
  height: 1px;
  background: #334155;
}

.cc-frac-op-select {
  padding: 5px 12px;
  font-size: 18px;
  font-weight: bold;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  cursor: pointer;
}

/* Fraction Results */
.cc-fraction-results-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 14px 16px;
  margin-top: 14px;
}

.cc-fraction-res-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.cc-res-tag {
  font-size: 13px;
  font-weight: bold;
  color: #334155;
}

.cc-res-val-big {
  font-size: 20px;
  font-weight: bold;
  color: #1e3a5f;
}

.cc-res-val-med {
  font-size: 15px;
  font-weight: 600;
  color: #2e7d32;
}

.cc-fraction-steps {
  margin-top: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 10px 12px;
}

.cc-steps-title {
  font-size: 12px;
  font-weight: bold;
  color: #475569;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.cc-steps-content {
  font-size: 12px;
  color: #334155;
  line-height: 1.6;
}

/* Image 1: Single Credit Card Payoff Modal Exact Clone */
.cc-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.cc-modal-dialog {
  background: #ffffff;
  border: 1px solid #7ba2c7;
  border-radius: 4px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  overflow: hidden;
  margin: 16px;
}

.cc-modal-header {
  background: #255582;
  color: #ffffff;
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.cc-modal-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.cc-modal-close:hover {
  opacity: 0.8;
}

.cc-modal-body {
  padding: 16px 20px 20px;
}

.cc-modal-field {
  margin-bottom: 14px;
}

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

.cc-modal-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cc-modal-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid #7ba2c7;
  border-radius: 3px;
  color: #111111;
  background: #ffffff;
}

.cc-modal-input:focus {
  outline: none;
  border-color: #255582;
  box-shadow: 0 0 0 1px #255582;
}

.cc-spinner-arrows {
  position: absolute;
  right: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  pointer-events: none;
  font-size: 9px;
  color: #64748b;
}

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

.cc-modal-submit-btn:hover {
  background: #1a4166;
}

/* Sidebar Search Box (Image 2 clone) */
.cc-sidebar-search-box {
  position: relative;
  margin-bottom: 16px;
}

.cc-sidebar-search-box .cc-search-form {
  display: flex;
  width: 100%;
}

.cc-sidebar-search-box .cc-search-input {
  flex: 1;
  border: 1px solid #7ba2c7;
  border-radius: 2px 0 0 2px;
  padding: 5px 8px;
  font-size: 13px;
  outline: none;
}

.cc-sidebar-search-box .cc-search-input:focus {
  border-color: #255582;
}

.cc-sidebar-search-box .cc-search-submit {
  background: #2b5a88;
  color: #ffffff;
  border: 1px solid #1f4265;
  border-radius: 0 2px 2px 0;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.cc-sidebar-search-box .cc-search-submit:hover {
  background: #204569;
}

.cc-search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  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: 100;
  display: none;
}

.cc-search-item {
  display: block;
  padding: 7px 10px;
  font-size: 12px;
  color: #2b5a88;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
}

.cc-search-item:hover {
  background: #f1f5f9;
  text-decoration: underline;
}

/* Financial Calculators Sidebar Box (Image 2 clone) */
.cc-sidebar-box {
  border: 1px solid #7ba2c7;
  border-radius: 4px;
  background: #ffffff;
  overflow: hidden;
}

.cc-sidebar-header {
  background: #255582;
  color: #ffffff;
  padding: 7px 10px;
  font-size: 14px;
  font-weight: bold;
}

.cc-sidebar-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 10px 12px;
  gap: 4px 14px;
}

.cc-links-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cc-links-col a {
  font-size: 12px;
  color: var(--link-blue);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-links-col a:hover {
  text-decoration: underline;
}

.cc-links-col a.active-link {
  font-weight: bold;
  color: #111111;
}

.cc-sidebar-more-link {
  padding: 6px 12px 10px;
}

.cc-sidebar-more-link a {
  font-size: 12px;
  color: var(--link-blue);
  text-decoration: underline;
}

.cc-sidebar-bottom-cats {
  border-top: 1px solid #e2e8f0;
  padding: 8px 12px;
  font-size: 11px;
  color: #64748b;
  text-align: center;
}

.cc-sidebar-bottom-cats a {
  color: var(--link-blue);
  text-decoration: none;
}

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

/* Results Cards & Charts Layout */
.cc-box-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 18px;
}

.cc-card-subtitle {
  font-size: 14px;
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 12px;
}

.cc-charts-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: center;
}

.cc-chart-pane {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 4px;
  padding: 8px;
  display: flex;
  justify-content: center;
}

/* Milestone Cards */
.cc-milestone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.cc-milestone-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 10px 12px;
}

.cc-milestone-step {
  width: 24px;
  height: 24px;
  background: #255582;
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cc-milestone-info {
  flex: 1;
}

.cc-milestone-name {
  font-size: 13px;
  font-weight: bold;
  color: #1e293b;
}

.cc-milestone-rate {
  font-size: 12px;
  color: #64748b;
  font-weight: normal;
}

.cc-milestone-date {
  font-size: 12px;
  color: #166534;
  margin-top: 2px;
}

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

/* Schedule Table */
.cc-filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cc-filter-tab {
  padding: 4px 10px;
  font-size: 12px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
  color: #334155;
}

.cc-filter-tab.active {
  background: #255582;
  color: #ffffff;
  border-color: #255582;
}

.cc-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.cc-data-table th {
  background: #f1f5f9;
  color: #334155;
  padding: 7px 10px;
  text-align: right;
  border: 1px solid #e2e8f0;
}

.cc-data-table th:first-child,
.cc-data-table td:first-child {
  text-align: left;
}

.cc-data-table td {
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  text-align: right;
}

.cc-data-table tr:nth-child(even) {
  background: #fcfcfd;
}

.cc-secondary-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
}

.cc-secondary-btn:hover {
  background: #e2e8f0;
}

/* Print Modal & Statement Styles */
.cc-print-modal-dialog {
  max-width: 720px;
  width: 95%;
}

.cc-print-modal-body {
  max-height: 75vh;
  overflow-y: auto;
  padding: 16px;
  background: #ffffff;
}

.cc-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  z-index: 999999;
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cc-toast.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

@media print {
  body.printing-modal * {
    visibility: hidden;
  }
  body.printing-modal #modalPrint,
  body.printing-modal #modalPrint * {
    visibility: visible;
  }
  body.printing-modal #modalPrint {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    background: #ffffff !important;
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 999999 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body.printing-modal .cc-modal-header,
  body.printing-modal .cc-modal-actions,
  body.printing-modal .cc-modal-close {
    display: none !important;
  }
  body.printing-modal .cc-print-modal-dialog {
    max-width: 100% !important;
    width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
  }
  body.printing-modal .cc-print-modal-body {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }
}

