/* ==========================================================================
   VA Mortgage Calculator - Exact Clone Stylesheet
   Matches Reference Image 1 & 2 pixel-by-pixel with responsive modern design
   ========================================================================== */

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

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

.va-breadcrumbs {
  color: #0844a4;
  font-size: 13px;
}

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

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

.va-breadcrumbs .sep {
  color: #777777;
  margin: 0 4px;
}

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

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

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

.va-top-btn:hover {
  color: #052c6e;
}

/* Page Title & Intro */
.va-page-title {
  color: #1e4a7a;
  font-size: 26px;
  font-weight: bold;
  margin: 0 0 10px 0;
}

.va-intro-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #333333;
  margin: 0 0 14px 0;
}

/* Instruction Banner */
.va-instruction-banner {
  background-color: #2b619e;
  color: #ffffff;
  padding: 5px 10px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 2px;
  margin-bottom: 15px;
}

/* Two Column Layout */
.va-main-layout {
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 25px;
}

@media (max-width: 920px) {
  .va-main-layout {
    grid-template-columns: 1fr;
  }
}

/* Left Form Box */
.va-calc-col {
  width: 100%;
}

.va-calc-box {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.va-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  gap: 10px;
}

.va-form-row-radio {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: 13px;
  gap: 6px;
}

.va-form-row-radio-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  gap: 10px;
}

.va-radio-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 2px;
  padding-left: 20px;
}

.va-radio-group-horizontal {
  display: flex;
  align-items: center;
  gap: 16px;
}

.va-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #333333;
}

.va-radio-label input[type="radio"] {
  cursor: pointer;
  margin: 0;
  accent-color: #1e4a7a;
}

.va-form-label {
  color: #333333;
  font-weight: normal;
  flex: 1;
}

.va-form-label-bold {
  color: #333333;
  font-weight: bold;
}

.va-form-field {
  display: flex;
  align-items: center;
  gap: 4px;
}

.va-input {
  border: 1px solid #94a3b8;
  border-radius: 3px;
  padding: 4px 6px;
  font-size: 13px;
  font-family: inherit;
  color: #1e293b;
  background-color: #ffffff;
}

.va-input:focus {
  outline: none;
  border-color: #0844a4;
  box-shadow: 0 0 0 2px rgba(8, 68, 164, 0.15);
}

.va-input-currency {
  width: 120px;
  text-align: right;
}

.va-input-pct {
  width: 65px;
  text-align: right;
}

.va-input-term {
  width: 65px;
  text-align: right;
}

.va-select {
  border: 1px solid #94a3b8;
  border-radius: 3px;
  padding: 4px 6px;
  font-size: 13px;
  font-family: inherit;
  color: #1e293b;
  background-color: #ffffff;
  cursor: pointer;
}

.va-select:focus {
  outline: none;
  border-color: #0844a4;
}

/* More Options Toggle */
.va-more-options-toggle {
  display: inline-block;
  color: #0844a4;
  text-decoration: underline;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  margin: 8px 0 12px 0;
}

.va-more-options-toggle:hover {
  color: #052c6e;
}

.va-more-options-box {
  background-color: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 3px;
  padding: 10px;
  margin-bottom: 12px;
}

/* Button Row */
.va-btn-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.va-btn-calc {
  background: linear-gradient(to bottom, #4c8a2b 0%, #3e7323 100%);
  color: #ffffff;
  border: 1px solid #2d5419;
  border-radius: 3px;
  padding: 6px 18px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.va-btn-calc:hover {
  background: linear-gradient(to bottom, #579d32 0%, #447e27 100%);
}

.va-btn-calc:active {
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.va-btn-clear {
  background: linear-gradient(to bottom, #f1f5f9 0%, #e2e8f0 100%);
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}

.va-btn-clear:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* Rate Ticker Box */
.va-rate-box {
  margin-top: 14px;
  border: 1px solid #cbd5e1;
  background-color: #f8fafc;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 12px;
}

.va-rate-box-title {
  font-weight: bold;
  color: #1e4a7a;
  margin-bottom: 4px;
}

.va-rate-box-rates {
  color: #333333;
  margin-bottom: 8px;
}

.va-rate-box-links {
  display: flex;
  gap: 12px;
}

.va-rate-box-btn {
  color: #0844a4;
  text-decoration: underline;
  font-size: 12px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* Right Results Box & Sidebar Column */
.va-sidebar-col {
  width: 100%;
}

.va-results-box {
  border: 1px solid #94a3b8;
  border-radius: 4px;
  background-color: #ffffff;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.va-results-header {
  background-color: #2b7a32;
  color: #ffffff;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.va-results-title {
  font-size: 16px;
  font-weight: bold;
}

.va-results-save-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  border-radius: 3px;
  padding: 2px 8px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.va-results-save-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Results Summary Table */
.va-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.va-results-table tr {
  border-bottom: 1px solid #e2e8f0;
}

.va-results-table tr:nth-child(even) {
  background-color: #f8fafc;
}

.va-results-table td {
  padding: 7px 12px;
}

.va-results-table td:first-child {
  color: #333333;
  font-weight: normal;
}

.va-results-table td:last-child {
  text-align: right;
  font-weight: bold;
  color: #0f172a;
}

/* Donut Chart & Legend */
.va-chart-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  padding: 16px 12px;
  border-top: 1px solid #e2e8f0;
  background-color: #ffffff;
  flex-wrap: wrap;
}

.va-donut-wrap {
  width: 150px;
  height: 150px;
  position: relative;
}

.va-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.va-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.va-legend-box {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  display: inline-block;
}

.va-legend-principal {
  background-color: #1976d2;
}

.va-legend-interest {
  background-color: #7cb342;
}

/* Search Box Component */
.va-side-search-form {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

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

.va-side-search-input {
  width: 100%;
  padding: 5px 8px;
  font-size: 13px;
  border: 1px solid #64748b;
  border-radius: 2px;
  font-family: inherit;
  color: #1e293b;
}

.va-side-search-input:focus {
  outline: none;
  border-color: #0844a4;
}

.va-side-search-btn {
  background: linear-gradient(to bottom, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  border: 1px solid #1e40af;
  border-radius: 2px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}

.va-side-search-btn:hover {
  background: linear-gradient(to bottom, #60a5fa 0%, #2563eb 100%);
}

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

.va-search-item {
  padding: 7px 10px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1e293b;
}

.va-search-item:hover,
.va-search-item.active {
  background-color: #e0f2fe;
  color: #0369a1;
}

.va-search-item-cat {
  font-size: 11px;
  color: #64748b;
}

/* Financial Calculators Card (Exact Clone from Image 2) */
.va-side-card {
  border: 1px solid #2b5a88;
  border-radius: 4px 4px 0 0;
  background-color: #ffffff;
  margin-bottom: 12px;
  overflow: hidden;
}

.va-side-card-header {
  background-color: #2b5a88;
  color: #ffffff;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: bold;
}

.va-side-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px 10px;
  gap: 5px 12px;
  font-size: 12px;
  background-color: #ffffff;
}

.va-side-card-grid a {
  color: #0844a4;
  text-decoration: none;
  padding: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.va-side-card-footer {
  border-top: 1px solid #e2e8f0;
  padding: 6px 10px;
  background-color: #f8fafc;
}

.va-side-card-footer a {
  color: #0844a4;
  font-size: 12px;
  text-decoration: none;
  font-weight: bold;
}

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

/* Category Footer Links */
.va-side-footer-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  flex-wrap: wrap;
}

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

.va-side-footer-links a:hover {
  text-decoration: underline;
}

/* Amortization Schedule Section */
.va-schedule-section {
  margin-top: 25px;
  border-top: 1px solid #cbd5e1;
  padding-top: 20px;
}

.va-schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.va-schedule-title {
  font-size: 20px;
  color: #1e4a7a;
  font-weight: bold;
  margin: 0;
}

.va-schedule-tabs {
  display: flex;
  gap: 6px;
}

.va-tab-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  color: #475569;
  font-family: inherit;
}

.va-tab-btn.active {
  background: #ffffff;
  color: #0844a4;
  font-weight: bold;
  border-color: #94a3b8;
  border-bottom: 1px solid #ffffff;
  margin-bottom: -1px;
}

.va-schedule-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 960px) {
  .va-schedule-layout {
    grid-template-columns: 1fr;
  }
}

.va-schedule-table-wrap {
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #ffffff;
}

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

.va-schedule-table thead th {
  background-color: #2b5a88;
  color: #ffffff;
  padding: 6px 8px;
  text-align: right;
  position: sticky;
  top: 0;
  z-index: 2;
  font-weight: bold;
}

.va-schedule-table thead th:first-child {
  text-align: center;
}

.va-schedule-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
}

.va-schedule-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.va-schedule-table tbody tr:hover {
  background-color: #e2e8f0;
}

.va-schedule-table td {
  padding: 5px 8px;
  text-align: right;
  color: #333333;
}

.va-schedule-table td:first-child {
  text-align: center;
  font-weight: bold;
}

/* Line Graph */
.va-schedule-graph-wrap {
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 12px;
  background: #ffffff;
}

.va-graph-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  margin-bottom: 8px;
}

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

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

/* Fraction Arithmetic Section (Requirement 1 & 5) */
.va-fraction-section {
  margin-top: 35px;
  border-top: 2px solid #e2e8f0;
  padding-top: 25px;
}

.va-fraction-title {
  font-size: 20px;
  color: #1e4a7a;
  font-weight: bold;
  margin-bottom: 8px;
}

.va-fraction-desc {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 16px;
}

.va-fraction-calc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 14px 18px;
  flex-wrap: wrap;
}

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

.va-fraction-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 44px;
}

.va-fraction-stack input {
  width: 42px;
  text-align: center;
  border: 1px solid #94a3b8;
  border-radius: 2px;
  padding: 3px 0;
  font-size: 13px;
}

.va-fraction-divider {
  width: 38px;
  height: 2px;
  background-color: #333333;
  margin: 3px 0;
}

.va-fraction-op-select {
  border: 1px solid #94a3b8;
  border-radius: 3px;
  padding: 5px 8px;
  font-size: 16px;
  font-weight: bold;
  background: #ffffff;
  cursor: pointer;
}

.va-btn-fraction-calc {
  background: linear-gradient(to bottom, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: 1px solid #1e40af;
  border-radius: 3px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.va-btn-fraction-calc:hover {
  background: linear-gradient(to bottom, #3b82f6 0%, #1e40af 100%);
}

.va-fraction-results-box {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.va-frac-res-item {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 10px 16px;
  flex: 1;
  min-width: 160px;
}

.va-frac-res-label {
  font-size: 12px;
  color: #64748b;
  display: block;
  margin-bottom: 4px;
}

.va-frac-res-val {
  font-size: 20px;
  font-weight: bold;
  color: #0f172a;
}

.va-fraction-steps {
  background-color: #f1f5f9;
  border-left: 4px solid #0284c7;
  padding: 8px 12px;
  font-size: 13px;
  color: #0369a1;
  margin-top: 12px;
  border-radius: 0 4px 4px 0;
}

.va-frac-chart-container {
  margin-top: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 14px;
  background: #ffffff;
}

.va-frac-chart-title {
  font-size: 13px;
  font-weight: bold;
  color: #334155;
  margin-bottom: 8px;
}

/* SEO, AEO & GEO Content Section */
.va-seo-section {
  margin-top: 35px;
  border-top: 2px solid #e2e8f0;
  padding-top: 25px;
  line-height: 1.6;
  font-size: 14px;
  color: #334155;
}

.va-seo-section h2 {
  font-size: 20px;
  color: #1e4a7a;
  margin: 22px 0 10px 0;
  font-weight: bold;
}

.va-seo-section h3 {
  font-size: 16px;
  color: #1e4a7a;
  margin: 16px 0 8px 0;
  font-weight: bold;
}

.va-seo-section p {
  margin-bottom: 12px;
}

.va-seo-section ul, .va-seo-section ol {
  margin: 0 0 14px 24px;
}

.va-seo-section li {
  margin-bottom: 6px;
}

.va-seo-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 20px 0;
  font-size: 13px;
}

.va-seo-table th {
  background-color: #2b5a88;
  color: #ffffff;
  padding: 8px 10px;
  text-align: left;
  border: 1px solid #cbd5e1;
}

.va-seo-table td {
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.va-seo-table tr:nth-child(even) {
  background-color: #f8fafc;
}

/* FAQ Accordion */
.va-faq-container {
  margin-top: 25px;
}

.va-faq-item {
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  margin-bottom: 8px;
  overflow: hidden;
}

.va-faq-question {
  width: 100%;
  background: #f8fafc;
  border: none;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: bold;
  color: #1e4a7a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.va-faq-question:hover {
  background: #f1f5f9;
}

.va-faq-answer {
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: none;
}

.va-faq-item.active .va-faq-answer {
  display: block;
}

.va-faq-item.active .va-faq-arrow {
  transform: rotate(180deg);
}

.va-faq-arrow {
  transition: transform 0.2s ease;
  font-size: 11px;
}

/* Modals (Image 1 Instant Tool & History & Print) */
.va-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 15px;
}

.va-modal-card {
  background: #ffffff;
  border-radius: 4px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: vaModalFade 0.2s ease-out;
}

@keyframes vaModalFade {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.va-modal-title {
  font-size: 15px;
  font-weight: bold;
}

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

.va-modal-close:hover {
  color: #e2e8f0;
}

.va-modal-body {
  padding: 16px;
}

.va-modal-subtitle {
  font-size: 13px;
  color: #475569;
  margin-bottom: 14px;
}

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

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

.va-modal-field input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #94a3b8;
  border-radius: 3px;
  font-size: 13px;
  font-family: inherit;
  color: #0f172a;
}

.va-modal-field input:focus {
  outline: none;
  border-color: #0844a4;
  box-shadow: 0 0 0 2px rgba(8, 68, 164, 0.15);
}

.va-btn-compute {
  background: #2b5a88;
  color: #ffffff;
  border: none;
  border-radius: 3px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 6px;
}

.va-btn-compute:hover {
  background: #1e4266;
}

.va-instant-result-box {
  margin-top: 14px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 10px 12px;
  font-size: 13px;
}

.va-instant-result-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.va-instant-result-row:last-child {
  margin-bottom: 0;
  border-top: 1px solid #e2e8f0;
  padding-top: 5px;
  font-weight: bold;
}

/* Print Sheet Styling */
.va-print-modal-card {
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.va-print-actions-bar {
  padding: 8px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.va-print-sheet {
  padding: 20px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.5;
  color: #1e293b;
  background: #ffffff;
}

@media print {
  body * {
    visibility: hidden;
  }
  .va-print-sheet, .va-print-sheet * {
    visibility: visible;
  }
  .va-print-sheet {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
  }
}
