/* Cash Back or Low Interest Calculator Styles - Calculator.net Clone */

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

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

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

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

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

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

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

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

.cb-top-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-family: inherit;
  color: #0844a4;
  cursor: pointer;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.cb-top-btn:hover {
  color: #002266;
}

.cb-badge-btn {
  background: #f4f6f8;
  border: 1px solid #b5c7d8;
  color: #003366;
  font-size: 11.5px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
}

.cb-badge-btn:hover {
  background: #e2eaf2;
}

/* Page Title & Intro */
.cb-page-title {
  font-size: 24px;
  color: #003366;
  font-weight: bold;
  margin: 0 0 10px 0;
  padding: 0;
}

.cb-intro-text {
  font-size: 13px;
  line-height: 1.55;
  color: #333333;
  margin: 0 0 18px 0;
}

.cb-intro-text a {
  color: #0844a4;
  text-decoration: none;
}

.cb-intro-text a:hover {
  text-decoration: underline;
}

/* Main Layout Grid */
.cb-main-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
}

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

.cb-calc-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* Form Container */
.cb-form-container {
  width: 320px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.cb-section-card {
  margin-bottom: 12px;
  border: 1px solid #b7c4d3;
  background-color: #f7f9fa;
  box-sizing: border-box;
}

.cb-section-header {
  background-color: #24588e;
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  padding: 5px 8px;
  letter-spacing: 0.2px;
}

.cb-section-body {
  padding: 8px 10px;
}

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

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

.cb-form-table td:first-child {
  width: 60%;
  color: #222222;
  white-space: nowrap;
}

.cb-form-table td:last-child {
  width: 40%;
  text-align: right;
}

.cb-input-group {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #7f9db9;
  border-radius: 1px;
  width: 100%;
  box-sizing: border-box;
  padding: 0 4px;
  height: 24px;
}

.cb-input-group:focus-within {
  border-color: #003366;
  outline: 1px solid #003366;
}

.cb-input-symbol {
  font-size: 12px;
  color: #555555;
  user-select: none;
  padding-right: 2px;
}

.cb-input-unit {
  font-size: 11px;
  color: #555555;
  user-select: none;
  padding-left: 3px;
  white-space: nowrap;
}

.cb-input {
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12.5px;
  font-family: inherit;
  color: #000000;
  text-align: right;
  padding: 0 2px;
  box-sizing: border-box;
}

.cb-select {
  width: 100%;
  height: 24px;
  border: 1px solid #7f9db9;
  font-size: 12px;
  background: #ffffff;
  color: #000000;
  padding: 1px 2px;
  border-radius: 1px;
  box-sizing: border-box;
}

.cb-checkbox-row {
  padding: 6px 2px !important;
}

.cb-checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #333333;
  cursor: pointer;
  user-select: none;
}

.cb-btn-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.cb-btn-calculate {
  background: #337332;
  border: 1px solid #285e27;
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cb-btn-calculate:hover {
  background: #2b612a;
}

.cb-btn-clear {
  background: #757575;
  border: 1px solid #616161;
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 3px;
  cursor: pointer;
}

.cb-btn-clear:hover {
  background: #616161;
}

/* Results Column */
.cb-results-container {
  flex: 1;
  min-width: 320px;
  border: 1px solid #c1c9d3;
  background-color: #ffffff;
  box-sizing: border-box;
}

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

.cb-results-save-btn {
  color: #ffffff;
  text-decoration: underline;
  font-size: 12px;
  font-weight: normal;
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.cb-results-save-btn:hover {
  color: #e6f4ea;
}

.cb-results-body {
  padding: 12px 14px;
}

.cb-winner-banner {
  font-size: 16px;
  font-weight: bold;
  color: #d9534f;
  margin: 0 0 6px 0;
}

.cb-winner-banner.green {
  color: #2b662a;
}

.cb-winner-banner.blue {
  color: #003366;
}

.cb-winner-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #333333;
  margin: 0 0 16px 0;
}

/* Comparison Tables */
.cb-offer-block {
  margin-bottom: 16px;
}

.cb-offer-header {
  background-color: #d9edf7;
  border: 1px solid #bce8f1;
  color: #31708f;
  font-weight: bold;
  font-size: 13px;
  padding: 5px 8px;
  margin-bottom: 0;
}

.cb-offer-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #bce8f1;
  border-top: none;
}

.cb-offer-table tr:nth-child(even) {
  background-color: #fbfdfe;
}

.cb-offer-table td {
  padding: 4.5px 8px;
  font-size: 12.5px;
  color: #333333;
  border-bottom: 1px solid #eef3f7;
}

.cb-offer-table td:first-child {
  width: 65%;
}

.cb-offer-table td:last-child {
  width: 35%;
  text-align: right;
}

.cb-monthly-row {
  background-color: #f0f7fb !important;
}

.cb-monthly-val {
  font-size: 14px;
  font-weight: bold;
  color: #003366;
}

/* Charts Section */
.cb-charts-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #d0d7de;
}

.cb-charts-heading {
  font-size: 18px;
  color: #003366;
  font-weight: bold;
  margin: 0 0 14px 0;
}

.cb-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.cb-chart-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 12px 14px;
  box-sizing: border-box;
}

.cb-chart-title {
  font-size: 13px;
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 8px;
  text-align: center;
}

.cb-chart-svg {
  width: 100%;
  height: 180px;
  display: block;
}

/* Schedule Section */
.cb-schedule-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #d0d7de;
}

.cb-schedule-heading {
  font-size: 18px;
  color: #003366;
  font-weight: bold;
  margin: 0 0 10px 0;
}

.cb-schedule-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.cb-schedule-tab {
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: bold;
  border: 1px solid #b5c7d8;
  background: #f4f6f8;
  color: #0844a4;
  cursor: pointer;
  border-radius: 2px;
}

.cb-schedule-tab.active {
  background: #24588e;
  color: #ffffff;
  border-color: #24588e;
}

.cb-table-wrap {
  overflow-x: auto;
  border: 1px solid #c1c9d3;
  max-height: 400px;
  background: #ffffff;
}

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

.cb-schedule-table th {
  background: #24588e;
  color: #ffffff;
  padding: 6px 8px;
  font-weight: bold;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.cb-schedule-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

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

.cb-schedule-table td:first-child,
.cb-schedule-table th:first-child {
  text-align: center;
}

/* Fraction Arithmetic Box */
.cb-fraction-box {
  margin-top: 28px;
  padding: 16px 18px;
  background: #fdfdfd;
  border: 1px solid #b9d0e8;
  border-radius: 4px;
  box-sizing: border-box;
}

.cb-fraction-header {
  font-size: 16px;
  font-weight: bold;
  color: #003366;
  margin-bottom: 6px;
}

.cb-fraction-desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: #475569;
  margin-bottom: 14px;
}

.cb-fraction-ratios-card {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  background: #f1f5f9;
  padding: 10px 14px;
  border-radius: 3px;
  margin-bottom: 14px;
  font-size: 12.5px;
}

.cb-fraction-ratio-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cb-ratio-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 2px 8px;
  font-weight: bold;
  color: #0f172a;
  border-radius: 3px;
}

.cb-fraction-calc-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.fraction-stacked-input {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 54px;
}

.fraction-stacked-input input {
  width: 100%;
  text-align: center;
  font-size: 13px;
  padding: 2px 0;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  box-sizing: border-box;
}

.fraction-divider-line {
  width: 100%;
  height: 2px;
  background: #333333;
  margin: 3px 0;
}

.fraction-op-select {
  font-size: 16px;
  font-weight: bold;
  height: 32px;
  padding: 2px 6px;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  background: #ffffff;
}

.fraction-equal-sign {
  font-size: 18px;
  font-weight: bold;
  color: #333333;
}

.fraction-result-container {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 10px;
  background: #eef6ff;
  border: 1px solid #93c5fd;
  border-radius: 3px;
  min-width: 90px;
}

.fraction-res-value {
  font-size: 15px;
  font-weight: bold;
  color: #1e3a8a;
}

.fraction-dec-value {
  font-size: 11.5px;
  color: #475569;
}

.fraction-btn-calculate {
  background: #2563eb;
  color: #ffffff;
  border: none;
  font-weight: bold;
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 3px;
  cursor: pointer;
}

.fraction-btn-calculate:hover {
  background: #1d4ed8;
}

/* Sidebar Styles */
.cb-sidebar-col {
  width: 270px;
  flex-shrink: 0;
}

.cb-search-box {
  display: flex;
  margin-bottom: 16px;
  position: relative;
}

.cb-search-input {
  flex: 1;
  height: 28px;
  border: 1px solid #7f9db9;
  border-right: none;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 2px 0 0 2px;
  box-sizing: border-box;
}

.cb-search-btn {
  background: #24588e;
  border: 1px solid #24588e;
  color: #ffffff;
  font-weight: bold;
  font-size: 12px;
  padding: 0 12px;
  cursor: pointer;
  border-radius: 0 2px 2px 0;
}

.cb-search-btn:hover {
  background: #1a426c;
}

.cb-search-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 6px -1px rgba(0, 0, 0, 0.1);
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}

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

.cb-search-item:hover {
  background: #f0f7ff;
  text-decoration: underline;
}

.cb-sidebar-card {
  border: 1px solid #c1c9d3;
  background: #ffffff;
}

.cb-sidebar-card-header {
  background: #24588e;
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  padding: 6px 10px;
}

.cb-sidebar-card-body {
  padding: 10px 12px;
}

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

.cb-sidebar-links-grid a {
  color: #0844a4;
  text-decoration: none;
  display: block;
  line-height: 1.45;
}

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

.cb-sidebar-footer-links {
  border-top: 1px solid #e2e8f0;
  padding: 6px 12px;
  font-size: 11px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
}

.cb-sidebar-footer-links a {
  color: #0844a4;
  text-decoration: none;
}

/* Modals Overlay */
.cb-modal-overlay {
  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: 9999;
  padding: 16px;
  box-sizing: border-box;
}

.cb-modal-card {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  box-sizing: border-box;
}

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

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

.cb-modal-close-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.cb-modal-body {
  padding: 16px;
  font-size: 13px;
}

.cb-modal-desc {
  color: #475569;
  margin: 0 0 14px 0;
  font-size: 12.5px;
}

.cb-modal-row {
  margin-bottom: 12px;
}

.cb-modal-row label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: #334155;
  font-weight: 500;
}

.cb-modal-row input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  font-size: 13px;
  box-sizing: border-box;
}

.cb-modal-btn {
  width: 100%;
  background: #337332;
  color: #ffffff;
  border: none;
  font-weight: bold;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 3px;
  cursor: pointer;
  margin-top: 6px;
}

.cb-modal-btn:hover {
  background: #2b612a;
}

.cb-modal-res-box {
  margin-top: 14px;
  padding: 10px 12px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 3px;
  font-size: 12.5px;
  color: #166534;
}

/* Toast */
.cb-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  display: none;
}

/* SEO Article Styles */
.cb-seo-article {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #d0d7de;
  font-size: 13.5px;
  line-height: 1.65;
  color: #333333;
}

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

.cb-seo-article h3 {
  font-size: 15px;
  color: #1e293b;
  font-weight: bold;
  margin: 16px 0 8px 0;
}

.cb-seo-article p {
  margin: 0 0 12px 0;
}

.cb-seo-article ul {
  margin: 0 0 14px 20px;
  padding: 0;
}

.cb-seo-article li {
  margin-bottom: 6px;
}

.cb-seo-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 12px 16px;
  margin: 14px 0;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12.5px;
  line-height: 1.5;
}

.cb-faq-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-left: 3px solid #24588e;
}

.cb-faq-card h4 {
  margin: 0 0 6px 0;
  font-size: 14px;
  color: #0f172a;
}

/* Print Specific Isolation Styles */
@media print {
  body.cb-printing-active > *:not(.cb-print-container) {
    display: none !important;
  }
  .cb-print-container {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: #ffffff;
    font-family: Arial, sans-serif;
  }
  .cb-sidebar-col,
  .cb-top-actions,
  .cb-btn-row,
  .cb-search-box,
  .cb-modal-overlay,
  .site-header,
  footer {
    display: none !important;
  }
}

/* Responsive */
@media (max-width: 860px) {
  .cb-main-layout {
    flex-direction: column;
  }
  .cb-sidebar-col {
    width: 100%;
    margin-top: 24px;
  }
  .cb-calc-row {
    flex-direction: column;
  }
  .cb-form-container,
  .cb-results-container {
    width: 100%;
    min-width: 0;
  }
}
