/* Payment Calculator Styles - Calculator.net Pixel-Perfect Clone Matching Image */

.pc-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 */
.pc-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

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

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

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

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

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

.pc-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

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

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

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

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

/* Intro Paragraph */
.pc-intro-text {
  font-size: 13px;
  line-height: 1.45;
  color: #222222;
  margin: 0 0 16px 0;
  max-width: 820px;
}

.pc-text-link {
  color: #0844a4;
  text-decoration: none;
}

.pc-text-link:hover {
  text-decoration: underline;
}

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

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

/* Top Section: Form Box & Results Box */
.pc-calc-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}

/* Form Container (Left) */
.pc-form-container {
  width: 320px;
  flex-shrink: 0;
}

/* Form Tabs */
.pc-form-tabs {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding-left: 2px;
}

.pc-tab-btn {
  background: #224b7a;
  color: #ffffff;
  border: 1px solid #224b7a;
  border-bottom: none;
  padding: 5px 12px;
  font-size: 13px;
  font-family: inherit;
  font-weight: normal;
  cursor: pointer;
  border-radius: 3px 3px 0 0;
  position: relative;
  transition: background-color 0.15s ease;
}

.pc-tab-btn:hover {
  background: #1b3d64;
}

.pc-tab-btn.active {
  background: #fbfbfc;
  color: #222222;
  font-weight: bold;
  border: 1px solid #cccccc;
  border-bottom: 1px solid #fbfbfc;
  margin-bottom: -1px;
  z-index: 2;
}

.pc-form-box {
  background: #fbfbfc;
  border: 1px solid #cccccc;
  padding: 14px 12px 16px 12px;
  position: relative;
  z-index: 1;
}

.pc-error-banner {
  background-color: #fff0f0;
  border: 1px solid #ffcccc;
  color: #cc0000;
  padding: 6px 8px;
  font-size: 12px;
  margin-bottom: 10px;
  border-radius: 2px;
}

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

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

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

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

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

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

.pc-input-symbol.suffix {
  border-right: none;
  border-left: 1px solid #d0d0d0;
}

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

.pc-input-group-unit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

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

.pc-unit-label {
  font-size: 13px;
  color: #555555;
}

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

.pc-calc-btn {
  background-color: #508432;
  color: #ffffff;
  border: none;
  padding: 6px 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;
}

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

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

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

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

/* Results Box (Right) */
.pc-results-container {
  width: 320px;
  flex-shrink: 0;
}

.pc-results-box {
  background: #fbfbfc;
  border: 1px solid #cccccc;
  overflow: hidden;
}

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

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

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

.pc-res-summary {
  font-size: 13px;
  color: #333333;
  padding: 10px 10px 4px;
  margin: 0;
  line-height: 1.4;
}

.pc-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 4px;
}

.pc-results-table td {
  padding: 4px 10px;
  border-bottom: 1px solid #eeeeee;
}

.pc-results-table td:last-child {
  text-align: right;
  font-weight: normal;
}

.pc-results-table tr:nth-child(even) td {
  background-color: #f7f9fb;
}

/* Donut & Pie Chart */
.pc-pie-chart-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 10px 12px;
}

.pc-pie-svg-container {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}

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

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

.pc-legend-box {
  width: 12px;
  height: 12px;
  display: inline-block;
}

.pc-legend-box.principal {
  background-color: #2b5a88;
}

.pc-legend-box.interest {
  background-color: #8bc34a;
}

/* Amortization Schedule Section */
.pc-schedule-section {
  margin-top: 24px;
}

.pc-schedule-title {
  font-size: 20px;
  color: #0844a4;
  font-weight: bold;
  margin: 0 0 10px 0;
}

.pc-schedule-tabs {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  margin-bottom: 10px;
  border-bottom: 1px solid #d8d8d8;
  padding-bottom: 4px;
}

.pc-schedule-tab {
  color: #0844a4;
  text-decoration: none;
  cursor: pointer;
  padding: 2px 4px;
}

.pc-schedule-tab:hover {
  text-decoration: underline;
}

.pc-schedule-tab.active {
  font-weight: bold;
  color: #000000;
  text-decoration: none;
  cursor: default;
}

/* Schedule Grid */
.pc-schedule-grid {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.pc-schedule-table-wrap {
  width: 320px;
  flex-shrink: 0;
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid #d0d0d0;
}

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

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

.pc-schedule-table th:first-child {
  text-align: center;
  width: 40px;
}

.pc-schedule-table td {
  padding: 4px 6px;
  text-align: right;
  border-bottom: 1px solid #e8e8e8;
  color: #222222;
}

.pc-schedule-table td:first-child {
  text-align: center;
  color: #444444;
  font-weight: bold;
}

.pc-schedule-table tr:nth-child(even) td {
  background-color: #f7f9fb;
}

.pc-schedule-table tr:hover td {
  background-color: #eaf1f8;
}

/* Line Chart Wrap */
.pc-linechart-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.pc-linechart-legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  margin-bottom: 6px;
  color: #333333;
}

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

.pc-line-legend-symbol {
  width: 14px;
  height: 3px;
  display: inline-block;
  border-radius: 1px;
}

.pc-line-legend-symbol.balance {
  background-color: #2b5a88;
}

.pc-line-legend-symbol.interest {
  background-color: #508432;
}

.pc-line-legend-symbol.payment {
  background-color: #8b0000;
}

.pc-linechart-svg {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
}

/* Right Sidebar Column */
.pc-sidebar-col {
  width: 260px;
  flex-shrink: 0;
  font-size: 13px;
}

.pc-search-box {
  display: flex;
  margin-bottom: 14px;
}

.pc-search-input {
  flex: 1;
  border: 1px solid #7f9db9;
  padding: 5px 8px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  background: #ffffff;
}

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

.pc-search-btn {
  background-color: #224b7a;
  color: #ffffff;
  border: 1px solid #224b7a;
  border-left: none;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s ease;
}

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

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

.pc-search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 9px;
  font-size: 12px;
  color: #222222;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
}

.pc-search-item:hover,
.pc-search-item.highlighted {
  background-color: #eaf1f8;
  color: #003366;
}

.pc-search-item-cat {
  font-size: 10px;
  color: #666666;
  background-color: #edf2f7;
  padding: 1px 4px;
  border-radius: 2px;
}

.pc-sidebar-card {
  border: 1px solid #a3b8cc;
  margin-bottom: 15px;
}

.pc-sidebar-header {
  background-color: #224b7a;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  padding: 5px 8px;
}

.pc-sidebar-content {
  background: #ffffff;
  padding: 8px;
}

.pc-sidebar-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  font-size: 12px;
}

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

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

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

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

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

.pc-sidebar-cats {
  background-color: #eef3f7;
  border-top: 1px solid #d0dce5;
  padding: 5px 8px;
  font-size: 11px;
  color: #444444;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

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

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

.pc-sidebar-cats .sep {
  color: #888888;
}

/* Modals */
.pc-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 15px;
}

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

.pc-modal-dialog-lg {
  max-width: 760px;
}

.pc-modal-header {
  background-color: #224b7a;
  color: #ffffff;
  padding: 9px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

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

.pc-modal-body {
  padding: 14px;
  overflow-y: auto;
  flex: 1;
}

.pc-modal-footer {
  background-color: #f4f6f8;
  border-top: 1px solid #e0e0e0;
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pc-modal-btn {
  background: #ffffff;
  border: 1px solid #c0c6cc;
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 2px;
  cursor: pointer;
  font-family: inherit;
}

.pc-modal-btn.primary {
  background-color: #224b7a;
  color: #ffffff;
  border-color: #224b7a;
  font-weight: bold;
}

.pc-modal-btn.primary:hover {
  background-color: #1b3d64;
}

/* Print Toolbar */
.pc-print-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.pc-print-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f4f6f8;
  border: 1px solid #c0c6cc;
  padding: 5px 10px;
  font-size: 12px;
  color: #003366;
  cursor: pointer;
  border-radius: 2px;
  font-family: inherit;
  transition: all 0.15s ease;
}

.pc-print-action-btn:hover {
  background: #e8ecf0;
  border-color: #003366;
}

.pc-btn-print-now {
  background-color: #508432;
  color: #ffffff;
  border-color: #508432;
  font-weight: bold;
}

.pc-btn-print-now:hover {
  background-color: #44702b;
}

.pc-print-tip {
  font-size: 11px;
  color: #555555;
  max-width: 500px;
}

.pc-print-sheet {
  font-size: 12px;
  line-height: 1.4;
  color: #111111;
}

/* Toast */
.pc-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #224b7a;
  color: #ffffff;
  padding: 9px 16px;
  border-radius: 3px;
  font-size: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  display: none;
  z-index: 2000;
}

/* Responsive adjustments */
@media (max-width: 860px) {
  .pc-main-layout {
    flex-direction: column;
  }
  .pc-sidebar-col {
    width: 100%;
  }
  .pc-calc-row {
    flex-direction: column;
  }
  .pc-form-container,
  .pc-results-container {
    width: 100%;
  }
  .pc-schedule-grid {
    flex-direction: column;
  }
  .pc-schedule-table-wrap {
    width: 100%;
  }
  .pc-linechart-wrap {
    width: 100%;
    align-items: center;
  }
}

/* Print Styles */
@media print {
  /* When Print Modal is Active */
  body.pc-printing-modal .site-header,
  body.pc-printing-modal .pc-top-bar,
  body.pc-printing-modal .pc-page-title,
  body.pc-printing-modal .pc-intro-text,
  body.pc-printing-modal .pc-main-layout,
  body.pc-printing-modal .site-footer,
  body.pc-printing-modal .pc-toast,
  body.pc-printing-modal #pc-saved-modal {
    display: none !important;
  }

  body.pc-printing-modal #pc-print-modal {
    display: block !important;
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
  }

  body.pc-printing-modal .pc-modal-dialog-lg {
    max-width: 100% !important;
    width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    max-height: none !important;
  }

  body.pc-printing-modal .pc-modal-header,
  body.pc-printing-modal .pc-modal-footer,
  body.pc-printing-modal .pc-print-toolbar,
  body.pc-printing-modal .pc-modal-close-icon {
    display: none !important;
  }

  body.pc-printing-modal .pc-modal-body {
    padding: 0 !important;
    overflow: visible !important;
    max-height: none !important;
  }

  /* Direct Page Print */
  body:not(.pc-printing-modal) .site-header,
  body:not(.pc-printing-modal) .pc-top-actions,
  body:not(.pc-printing-modal) .pc-print-link,
  body:not(.pc-printing-modal) .pc-sidebar-col,
  body:not(.pc-printing-modal) .pc-btn-row,
  body:not(.pc-printing-modal) .site-footer,
  body:not(.pc-printing-modal) .pc-modal-backdrop,
  body:not(.pc-printing-modal) .pc-toast {
    display: none !important;
  }

  body:not(.pc-printing-modal) .pc-page-container {
    max-width: 100%;
    padding: 0;
  }

  body:not(.pc-printing-modal) .pc-main-layout {
    display: block;
  }

  body:not(.pc-printing-modal) .pc-content-col {
    width: 100%;
  }

  body:not(.pc-printing-modal) .pc-results-header {
    background-color: #333333 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
