/* Pension Calculator Styles - Calculator Archive Exact Clone */
:root {
  --k-navy: #1b365d;
  --k-blue-header: #2f5c94;
  --k-blue-subhdr: #2f5c94;
  --k-blue-subhdr-dark: #224b7a;
  --k-blue-link: #0844a4;
  --k-blue-link-hover: #002277;
  --k-green-btn: #449d44;
  --k-green-btn-hover: #398439;
  --k-gray-btn: #94a3b8;
  --k-gray-btn-hover: #64748b;
  --k-border: #cbd5e1;
  --k-border-dark: #7f9db9;
  --k-bg-light: #f8fafc;
  --k-bg-alt: #f1f5f9;
  --k-bg-card: #fbfbfc;
  --k-text: #333333;
  --k-text-dark: #0f172a;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--k-text);
  background-color: #ffffff;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

.k-page-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 14px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}

/* Breadcrumbs Row */
.k-breadcrumbs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.k-breadcrumbs {
  font-size: 13px;
  color: var(--k-blue-link);
}

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

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

.k-breadcrumbs span {
  color: #777777;
  margin: 0 4px;
}

.k-breadcrumbs .crumb-current {
  color: #333333;
}

/* Top Actions */
.k-top-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.k-top-link-btn {
  background: none;
  border: none;
  color: var(--k-blue-link);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.k-top-link-btn:hover {
  color: var(--k-blue-link-hover);
}

/* Page Title & Intro */
.k-main-title {
  font-size: 24px;
  font-weight: bold;
  color: #0844a4;
  margin: 0 0 6px 0;
  line-height: 1.25;
}

.k-main-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #222222;
  margin: 0 0 14px 0;
}

/* Layout Split: Content (left) vs Sidebar (right) */
.k-layout-grid {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.k-content-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.k-sidebar-col {
  width: 270px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 860px) {
  .k-layout-grid {
    flex-direction: column;
  }
  .k-sidebar-col {
    width: 100%;
  }
}

/* Calculator Section Containers */
.k-calc-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.k-section-title {
  font-size: 18px;
  font-weight: bold;
  color: #0844a4;
  margin: 0 0 4px 0;
}

.k-section-desc {
  font-size: 13px;
  color: #333333;
  margin: 0 0 8px 0;
  line-height: 1.45;
}

/* Calculator Form Box (Matching Image 2) */
.k-calc-box {
  border: 1px solid #7f9db9;
  background: #fbfbfc;
  box-sizing: border-box;
  max-width: 500px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.k-subbox-header {
  background-color: var(--k-blue-header);
  color: #ffffff;
  font-weight: bold;
  font-size: 13.5px;
  padding: 6px 12px;
  border-top: 1px solid #1e4b7a;
  border-bottom: 1px solid #1e4b7a;
}

.k-calc-box .k-subbox-header:first-child {
  border-top: none;
}

/* Form Table */
.k-form-table {
  width: 100%;
  border-collapse: collapse;
}

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

.k-form-table td.k-label-td {
  color: #000000;
  width: 58%;
}

.k-form-table td.k-input-td {
  color: #222222;
  width: 42%;
  white-space: nowrap;
}

/* Inputs */
.k-input {
  border: 1px solid var(--k-border-dark);
  background: #ffffff;
  border-radius: 2px;
  height: 24px;
  padding: 2px 6px;
  font-size: 13px;
  font-family: inherit;
  color: #000000;
  outline: none;
  box-sizing: border-box;
  vertical-align: middle;
}

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

.k-input-sm {
  width: 60px;
  text-align: right;
}

.k-input-md {
  width: 90px;
  text-align: right;
}

.k-input-lg {
  width: 110px;
  text-align: right;
}

.k-unit-label {
  font-size: 12px;
  color: #333333;
  margin-left: 4px;
}

/* Button Bar */
.k-btn-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 12px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.k-calc-btn {
  background: #449d44;
  border: 1px solid #398439;
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  padding: 5px 14px 6px;
  cursor: pointer;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.k-calc-btn:hover {
  background: #398439;
}

.k-clear-btn {
  background: #94a3b8;
  border: 1px solid #64748b;
  color: #ffffff;
  font-size: 13px;
  padding: 5px 12px 6px;
  cursor: pointer;
  border-radius: 3px;
  font-family: inherit;
}

.k-clear-btn:hover {
  background: #64748b;
}

.k-save-link-btn {
  background: none;
  border: none;
  color: var(--k-blue-link);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0 4px;
  margin-left: auto;
}

.k-save-link-btn:hover {
  color: var(--k-blue-link-hover);
}

/* Results Display Box */
.k-result-box {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 4px;
  padding: 14px 16px;
  margin-top: 10px;
  max-width: 500px;
  box-sizing: border-box;
}

.k-result-box.hidden {
  display: none;
}

.k-result-header {
  font-size: 15px;
  font-weight: bold;
  color: #166534;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.k-result-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

@media (max-width: 480px) {
  .k-result-stats-grid {
    grid-template-columns: 1fr;
  }
}

.k-result-stat-card {
  background: #ffffff;
  border: 1px solid #bbf7d0;
  border-radius: 3px;
  padding: 8px 10px;
}

.k-stat-label {
  font-size: 11.5px;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.k-stat-value {
  font-size: 16px;
  font-weight: bold;
  color: #1b365d;
  margin-top: 2px;
}

.k-stat-value.k-highlight {
  color: #15803d;
}

.k-result-summary {
  font-size: 13px;
  line-height: 1.5;
  color: #1f2937;
  padding: 8px 10px;
  background: #ffffff;
  border-radius: 3px;
  border-left: 3px solid #16a34a;
  margin-bottom: 12px;
}

/* Visual Interactive Chart Area */
.k-chart-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 12px;
  margin-top: 8px;
}

.k-chart-title {
  font-size: 13px;
  font-weight: bold;
  color: #1e3a8a;
  margin-bottom: 6px;
}

.k-chart-svg {
  width: 100%;
  height: 200px;
  display: block;
}

.k-chart-legend {
  display: flex;
  gap: 14px;
  font-size: 11.5px;
  margin-top: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

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

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

/* Schedule Toggle Table */
.k-schedule-toggle-btn {
  background: none;
  border: none;
  color: var(--k-blue-link);
  font-size: 12.5px;
  font-weight: bold;
  cursor: pointer;
  padding: 6px 0;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.k-schedule-wrapper {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  margin-top: 6px;
}

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

.k-data-table th {
  background: var(--k-blue-header);
  color: #ffffff;
  padding: 6px 8px;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 2;
}

.k-data-table th:first-child,
.k-data-table td:first-child {
  text-align: center;
}

.k-data-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #e2e8f0;
}

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

.k-data-table tr.highlight-row {
  background: #fef3c7;
  font-weight: bold;
}

/* Fraction Arithmetic Section */
.k-fraction-card {
  border: 1px solid #7f9db9;
  background: #fbfbfc;
  box-sizing: border-box;
  max-width: 600px;
  border-radius: 4px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.k-fraction-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}

.k-fraction-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
}

.k-fraction-input-group input {
  width: 60px;
  text-align: center;
  height: 28px;
  font-size: 15px;
  font-weight: bold;
  border: 1px solid #7f9db9;
  border-radius: 3px;
}

.k-fraction-bar {
  width: 64px;
  height: 2px;
  background: #334155;
  margin: 4px 0;
}

.k-fraction-op-select {
  font-size: 18px;
  font-weight: bold;
  padding: 4px 8px;
  border: 1px solid #7f9db9;
  border-radius: 3px;
  background: #ffffff;
  cursor: pointer;
}

.k-fraction-equal {
  font-size: 20px;
  font-weight: bold;
  color: #334155;
}

.k-fraction-result-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.k-fraction-res-num,
.k-fraction-res-den {
  font-size: 18px;
  font-weight: bold;
  color: #0844a4;
}

.k-fraction-res-bar {
  width: 70px;
  height: 2px;
  background: #0844a4;
  margin: 4px 0;
}

.k-fraction-details {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 13px;
}

/* Right Sidebar (Exact Image 2 clone) */
.k-sidebar-search-box {
  display: flex;
  gap: 4px;
}

.k-search-input-field {
  flex: 1;
  height: 26px;
  padding: 2px 8px;
  font-size: 13px;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  outline: none;
  box-sizing: border-box;
}

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

.k-search-submit-btn {
  background: var(--k-blue-header);
  border: 1px solid #1e4b7a;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  padding: 2px 14px;
  cursor: pointer;
  border-radius: 2px;
  height: 26px;
}

.k-search-submit-btn:hover {
  background: #244874;
}

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

.k-search-dropdown.show {
  display: block;
}

.k-search-item {
  display: flex;
  justify-content: space-between;
  padding: 7px 10px;
  font-size: 13px;
  text-decoration: none;
  color: #0844a4;
  border-bottom: 1px solid #f1f5f9;
}

.k-search-item:hover,
.k-search-item.active {
  background: #eff6ff;
  text-decoration: underline;
}

.k-sidebar-card {
  border: 1px solid #7f9db9;
  background: #ffffff;
  border-radius: 2px;
  overflow: hidden;
}

.k-sidebar-header {
  background: var(--k-blue-header);
  color: #ffffff;
  font-weight: bold;
  font-size: 14px;
  padding: 6px 10px;
}

.k-sidebar-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px 10px;
  gap: 4px 12px;
}

.k-sidebar-link {
  font-size: 12.5px;
  color: var(--k-blue-link);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.k-sidebar-tabs {
  font-size: 12px;
  color: #777777;
  padding: 6px 10px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.k-sidebar-tabs a {
  color: var(--k-blue-link);
  text-decoration: none;
}

.k-sidebar-tabs a:hover {
  text-decoration: underline;
}

/* Modals */
.k-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  box-sizing: border-box;
}

.k-modal-overlay.open {
  display: flex;
}

.k-modal-box {
  background: #ffffff;
  border-radius: 4px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
}

.k-modal-header {
  background: #2b547e;
  color: #ffffff;
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 14px;
}

.k-modal-close-icon {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.k-modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
}

.k-modal-footer {
  padding: 10px 16px;
  background: #f8fafc;
  border-top: 1px solid #cbd5e1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Toast */
.k-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1b365d;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 3px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  display: none;
  z-index: 2000;
}

.k-toast.show {
  display: block;
}

/* SEO / AEO / GEO Section Styling */
.k-seo-container {
  margin-top: 20px;
  border-top: 1px solid #cbd5e1;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.k-seo-title {
  font-size: 20px;
  font-weight: bold;
  color: #0844a4;
  margin: 0;
}

.k-seo-subtitle {
  font-size: 16px;
  font-weight: bold;
  color: #1e3a8a;
  margin: 8px 0 4px;
}

.k-seo-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: #2b3648;
}

.k-faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.k-faq-item {
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
}

.k-faq-question {
  background: #f8fafc;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: bold;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.k-faq-answer {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
  border-top: 1px solid #e2e8f0;
}

/* Print Styles */
@media print {
  body * {
    visibility: hidden;
  }
  #k-print-sheet, #k-print-sheet * {
    visibility: visible;
  }
  #k-print-sheet {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
    border: none !important;
  }
}

/* RTL Support */
html[dir="rtl"] {
  text-align: right;
}

html[dir="rtl"] .k-top-links {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .k-btn-bar {
  flex-direction: row-reverse;
}

html[dir="rtl"] .k-save-link-btn {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .k-input-sm,
html[dir="rtl"] .k-input-md,
html[dir="rtl"] .k-input-lg {
  text-align: left;
}
