/* Retirement Calculator Styles - Pixel-Perfect Clone of Calculator.net */

.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;
}

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

.rc-breadcrumbs {
  color: #0844a4;
  font-size: 12px;
}

.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: 10px;
}

.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 {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f4f6f8;
  border: 1px solid #c0c6cc;
  padding: 2px 8px;
  font-size: 11px;
  color: #003366;
  cursor: pointer;
  border-radius: 2px;
  font-family: inherit;
}

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

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

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

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

/* Section Styling */
.rc-section {
  margin-bottom: 28px;
}

.rc-section-title {
  font-size: 17px;
  color: #0844a4;
  font-weight: bold;
  margin: 0 0 6px 0;
  padding: 0;
}

.rc-section-desc {
  font-size: 13px;
  line-height: 1.45;
  color: #222222;
  margin: 0 0 10px 0;
  max-width: 720px;
}

/* Form Container Box */
.rc-form-box {
  background: #fbfbfc;
  border: 1px solid #c0c6cc;
  width: 480px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0;
  margin-bottom: 12px;
}

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

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

.rc-form-table td.rc-label-col {
  width: 220px;
  color: #000000;
}

.rc-form-table td.rc-input-col {
  color: #222222;
}

/* Sub-header inside table */
.rc-subhdr-row td {
  background-color: #224b7a;
  color: #ffffff;
  font-weight: bold;
  padding: 4px 8px;
  font-size: 13px;
  text-align: left;
}

/* Input Fields */
.rc-input-field {
  border: 1px solid #7f9db9;
  background: #ffffff;
  border-radius: 2px;
  height: 23px;
  padding: 2px 5px;
  font-size: 13px;
  font-family: inherit;
  color: #000000;
  outline: none;
  box-sizing: border-box;
}

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

.rc-input-short {
  width: 85px;
}

.rc-input-med {
  width: 90px;
}

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

.rc-input-suffix {
  font-size: 13px;
  color: #222222;
  margin-left: 4px;
}

.rc-unit-text {
  font-size: 13px;
  color: #222222;
}

/* Help tooltip question mark */
.rc-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #eaeaea;
  border: 1px solid #b0b0b0;
  color: #555555;
  font-size: 10px;
  font-weight: bold;
  margin-left: 3px;
  cursor: help;
  position: relative;
  vertical-align: middle;
  user-select: none;
}

.rc-help-icon:hover {
  background: #003366;
  border-color: #003366;
  color: #ffffff;
}

.rc-help-tooltip {
  display: none;
  position: absolute;
  left: 20px;
  bottom: -6px;
  width: 220px;
  background: #2b303a;
  color: #ffffff;
  font-size: 11px;
  line-height: 1.35;
  padding: 6px 8px;
  border-radius: 3px;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  font-weight: normal;
  pointer-events: none;
}

.rc-help-icon:hover .rc-help-tooltip {
  display: block;
}

.rc-link-text {
  color: #0844a4;
  text-decoration: underline;
  cursor: pointer;
}

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

/* Action Buttons Row */
.rc-btn-row {
  display: flex;
  gap: 6px;
  padding: 8px 8px 10px 8px;
  background: #fbfbfc;
  border-top: 1px solid #e0e5eb;
}

.rc-calc-btn {
  background-color: #508432;
  color: #ffffff;
  border: 1px solid #3c6525;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  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: 1px;
}

.rc-clear-btn {
  background-color: #888888;
  color: #ffffff;
  border: 1px solid #777777;
  padding: 4px 12px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 2px;
  font-family: inherit;
  transition: background-color 0.15s ease;
}

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

/* Calculation Results Section */
.rc-results-box {
  background: #fbfbfc;
  border: 1px solid #c0c6cc;
  width: 480px;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
  margin-bottom: 20px;
  display: none;
}

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

.rc-save-scenario-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rc-save-scenario-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

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

.rc-result-headline {
  font-size: 14px;
  font-weight: bold;
  color: #1a4a15;
  margin-bottom: 8px;
  line-height: 1.4;
}

.rc-result-subtext {
  font-size: 13px;
  color: #333333;
  line-height: 1.45;
  margin-bottom: 12px;
}

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

.rc-result-table td {
  padding: 5px 6px;
  border-bottom: 1px solid #eeeeee;
}

.rc-result-table td:last-child {
  text-align: right;
  font-weight: bold;
  color: #111111;
}

.rc-result-table tr:nth-child(even) {
  background-color: #f7f9fa;
}

.rc-chart-container {
  margin: 12px 0;
  text-align: center;
  position: relative;
}

.rc-chart-canvas {
  width: 100%;
  height: 160px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
}

.rc-chart-legend {
  display: flex;
  justify-content: center;
  gap: 14px;
  font-size: 11px;
  color: #555555;
  margin-top: 6px;
}

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

.rc-legend-color {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 2px;
}

.rc-toggle-schedule-btn {
  background: #eef2f6;
  border: 1px solid #c0c6cc;
  color: #0844a4;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 2px;
  margin-top: 8px;
}

.rc-toggle-schedule-btn:hover {
  background: #e2e8f0;
}

/* Schedule Table Container */
.rc-schedule-container {
  display: none;
  margin-top: 10px;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #d8d8d8;
  background: #ffffff;
}

.rc-schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.rc-schedule-table th {
  background-color: #224b7a;
  color: #ffffff;
  padding: 5px 6px;
  text-align: right;
  position: sticky;
  top: 0;
  z-index: 2;
  font-weight: bold;
}

.rc-schedule-table th:first-child,
.rc-schedule-table th:nth-child(2) {
  text-align: center;
}

.rc-schedule-table td {
  padding: 4px 6px;
  border-bottom: 1px solid #eee;
  text-align: right;
}

.rc-schedule-table td:first-child,
.rc-schedule-table td:nth-child(2) {
  text-align: center;
}

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

.rc-schedule-table tr.retirement-start {
  background-color: #eaf3e6;
  font-weight: bold;
}

/* RIGHT SIDEBAR COLUMN */
.rc-sidebar-col {
  width: 240px;
  flex-shrink: 0;
}

/* Search Box */
.rc-search-box {
  display: flex;
  margin-bottom: 16px;
}

.rc-search-input {
  flex: 1;
  border: 1px solid #7f9db9;
  border-right: none;
  padding: 4px 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  height: 26px;
  box-sizing: border-box;
}

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

.rc-search-btn {
  background-color: #224b7a;
  color: #ffffff;
  border: 1px solid #224b7a;
  padding: 0 10px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  height: 26px;
  box-sizing: border-box;
  font-family: inherit;
}

.rc-search-btn:hover {
  background-color: #1b3d64;
}

.rc-search-dropdown {
  display: none;
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #999999;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000;
  font-size: 12px;
}

.rc-search-item {
  padding: 6px 10px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
}

.rc-search-item:hover {
  background-color: #eef4fb;
  color: #0844a4;
}

/* Financial Calculators Sidebar Card */
.rc-sidebar-card {
  border: 1px solid #9bb5cf;
  background: #ffffff;
  margin-bottom: 16px;
}

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

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

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

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

.rc-sidebar-links-grid a:hover {
  text-decoration: underline;
  color: #cc0000;
}

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

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

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

.rc-sidebar-cats {
  background: #f4f6f8;
  border-top: 1px solid #dce2e8;
  padding: 6px 8px;
  font-size: 11px;
  color: #666666;
  text-align: center;
}

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

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

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

/* SAVED SCENARIOS MODAL */
.rc-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.rc-modal-dialog {
  background: #ffffff;
  border-radius: 4px;
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

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

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

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

.rc-modal-body {
  padding: 14px;
  overflow-y: auto;
  font-size: 13px;
}

.rc-scenario-card {
  border: 1px solid #d0d7de;
  border-radius: 3px;
  padding: 10px;
  margin-bottom: 10px;
  background: #fbfbfc;
}

.rc-scenario-card h4 {
  margin: 0 0 4px 0;
  color: #0844a4;
  font-size: 14px;
}

.rc-scenario-meta {
  font-size: 11px;
  color: #777777;
  margin-bottom: 8px;
}

.rc-scenario-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.rc-scenario-btn {
  background: #eef2f6;
  border: 1px solid #c0c6cc;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  border-radius: 2px;
}

.rc-scenario-btn:hover {
  background: #dfe6ee;
}

.rc-scenario-btn.danger {
  color: #cc0000;
}

/* Modal sizing & footer */
.rc-modal-dialog-lg {
  max-width: 820px;
  width: 95%;
  max-height: 90vh;
}

.rc-modal-footer {
  background: #f4f6f8;
  border-top: 1px solid #d4dbe0;
  padding: 8px 14px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  border-radius: 0 0 4px 4px;
}

.rc-modal-btn {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
  border: 1px solid #7f9db9;
  background: #ffffff;
  color: #333333;
}

.rc-modal-btn.primary {
  background: #2b5a88;
  border-color: #1b4570;
  color: #ffffff;
}

.rc-modal-btn.primary:hover {
  background: #1b4570;
}

/* Print Toolbar & Sheet */
.rc-print-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  background-color: #f8fafc;
  padding: 8px 10px;
  border-radius: 3px;
  border: 1px solid #e0e5eb;
}

.rc-print-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #7f9db9;
  padding: 5px 12px;
  font-size: 12px;
  color: #003366;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
  font-family: inherit;
}

.rc-print-action-btn:hover {
  background: #eef3f8;
  border-color: #003366;
}

.rc-print-action-btn.rc-btn-print-now {
  background: #5c9038;
  border-color: #4a752d;
  color: #ffffff;
}

.rc-print-action-btn.rc-btn-print-now:hover {
  background: #4a752d;
}

.rc-print-sheet {
  background: #ffffff;
  padding: 6px 2px;
  color: #111111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.45;
}

.rc-print-tip {
  font-size: 11px;
  color: #666666;
  margin-right: auto;
  align-self: center;
}

/* Toast Notification */
.rc-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #222222;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 2000;
  display: none;
  animation: rcFadeIn 0.2s ease;
}

@keyframes rcFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* PRINT MEDIA QUERY */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 10pt !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .site-header,
  .site-footer,
  .rc-top-bar,
  .rc-sidebar-col,
  .rc-top-actions,
  .rc-btn-row,
  .rc-save-scenario-btn,
  .rc-toggle-schedule-btn,
  .rc-toast,
  .rc-print-toolbar,
  .rc-print-tip,
  .rc-modal-footer,
  .rc-modal-close-icon {
    display: none !important;
  }

  /* When printing while modal is open */
  body.rc-printing-modal .rc-page-container {
    display: none !important;
  }

  body.rc-printing-modal .rc-modal-backdrop {
    position: static !important;
    background: transparent !important;
    display: block !important;
    padding: 0 !important;
  }

  body.rc-printing-modal .rc-modal-dialog {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    width: 100% !important;
    max-height: none !important;
  }

  body.rc-printing-modal .rc-modal-body {
    overflow: visible !important;
    padding: 0 !important;
  }

  .rc-page-container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .rc-main-layout {
    display: block !important;
  }

  .rc-results-box {
    display: block !important;
    width: 100% !important;
  }

  .rc-schedule-container {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .rc-schedule-table {
    width: 100% !important;
    border-collapse: collapse !important;
  }

  .rc-schedule-table th,
  .rc-schedule-table td {
    border: 1px solid #555 !important;
    color: #000 !important;
    padding: 4px 6px !important;
  }

  .rc-schedule-table tr {
    page-break-inside: avoid !important;
  }
}

/* RESPONSIVE LAYOUT */
@media (max-width: 820px) {
  .rc-main-layout {
    flex-direction: column;
  }

  .rc-sidebar-col {
    width: 100%;
    margin-top: 20px;
  }

  .rc-form-box,
  .rc-results-box {
    width: 100%;
  }

  .rc-form-table td.rc-label-col {
    width: 45%;
  }
}
