/* Social Security 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;
}

.k-main-desc a {
  color: var(--k-blue-link);
  text-decoration: underline;
}

.k-main-desc a:hover {
  color: var(--k-blue-link-hover);
}

/* 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;
}

.k-section-desc a {
  color: var(--k-blue-link);
  text-decoration: underline;
}

/* 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-weight: bold;
  font-size: 13px;
  padding: 5px 14px 6px;
  cursor: pointer;
  border-radius: 3px;
  font-family: inherit;
}

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

/* Results Box */
.k-result-box {
  margin-top: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 4px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

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

.k-result-header {
  font-size: 14px;
  font-weight: bold;
  color: #0844a4;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.k-result-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

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

.k-stat-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.k-stat-value {
  font-size: 17px;
  font-weight: bold;
  color: #0f172a;
  margin-top: 2px;
}

.k-stat-value.k-highlight {
  color: #16a34a;
}

.k-stat-value.k-highlight-blue {
  color: #0844a4;
}

.k-result-summary {
  font-size: 12.5px;
  line-height: 1.5;
  color: #334155;
  background: #f1f5f9;
  border-left: 3px solid #2f5c94;
  padding: 8px 12px;
  border-radius: 0 3px 3px 0;
  margin-bottom: 12px;
}

/* Charts */
.k-chart-container {
  border: 1px solid #e2e8f0;
  background: #fafafa;
  border-radius: 3px;
  padding: 10px;
  margin-top: 10px;
}

.k-chart-title {
  font-size: 12px;
  font-weight: bold;
  color: #334155;
  margin-bottom: 8px;
  text-align: center;
}

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

.k-chart-legend {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  font-size: 11px;
  color: #475569;
  flex-wrap: wrap;
}

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

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

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

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

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

.k-data-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: bold;
  padding: 6px 8px;
  position: sticky;
  top: 0;
  border-bottom: 1px solid #cbd5e1;
}

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

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

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

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

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

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

.k-fraction-input-group input {
  width: 50px;
  height: 26px;
  border: 1px solid var(--k-border-dark);
  text-align: center;
  font-weight: bold;
  font-size: 13px;
  border-radius: 2px;
  outline: none;
}

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

.k-fraction-bar {
  width: 48px;
  height: 2px;
  background: #334155;
}

.k-fraction-op-select {
  height: 30px;
  font-size: 15px;
  font-weight: bold;
  border: 1px solid var(--k-border-dark);
  border-radius: 3px;
  padding: 2px 6px;
  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;
  gap: 2px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 4px;
  padding: 4px 10px;
  min-width: 45px;
}

.k-fraction-res-num,
.k-fraction-res-den {
  font-size: 14px;
  font-weight: bold;
  color: #166534;
}

.k-fraction-res-bar {
  width: 100%;
  height: 2px;
  background: #166534;
}

.k-fraction-details {
  font-size: 12.5px;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 10px;
  border-radius: 3px;
}

/* ================= RIGHT SIDEBAR ================= */
.k-sidebar-search-box {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 12px;
}

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

.k-search-submit-btn {
  background: #2f5c94;
  border: 1px solid #2f5c94;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  height: 28px;
  padding: 0 12px;
  cursor: pointer;
  font-family: inherit;
  box-sizing: border-box;
}

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

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

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

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

.k-search-item:hover {
  background: #f1f5f9;
}

/* Financial Calculators Card in Sidebar */
.k-sidebar-card {
  border: 1px solid #7f9db9;
  background: #ffffff;
  border-radius: 0;
  overflow: hidden;
}

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

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

.k-sidebar-link {
  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 {
  background: #f1f5f9;
  border-top: 1px solid #cbd5e1;
  padding: 6px 8px;
  font-size: 11px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

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

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

.k-sidebar-tabs span {
  color: #94a3b8;
}

/* ================= SEO / AEO / GEO SECTION ================= */
.k-seo-container {
  margin-top: 24px;
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
}

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

.k-seo-subtitle {
  font-size: 15px;
  font-weight: bold;
  color: #1e3a8a;
  margin: 18px 0 6px 0;
}

.k-seo-text p {
  margin: 0 0 10px 0;
}

.k-seo-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 12px;
}

.k-seo-table th,
.k-seo-table td {
  border: 1px solid #cbd5e1;
  padding: 6px 10px;
  text-align: left;
}

.k-seo-table th {
  background: #f1f5f9;
  font-weight: bold;
  color: #1e293b;
}

/* FAQ Accordion */
.k-faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.k-faq-item {
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #f8fafc;
}

.k-faq-question {
  padding: 8px 12px;
  font-weight: bold;
  font-size: 13px;
  color: #0844a4;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.k-faq-answer {
  padding: 0 12px 10px;
  font-size: 12.5px;
  color: #334155;
  display: block;
  border-top: 1px solid #e2e8f0;
  margin-top: 4px;
  padding-top: 8px;
}

/* ================= MODALS ================= */
.k-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  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: 480px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalFadeIn 0.15s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.k-modal-header {
  background: #265a88;
  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: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
  color: #334155;
  max-height: 80vh;
  overflow-y: auto;
}

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

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

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

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

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

[dir="rtl"] .k-calc-box,
[dir="rtl"] .k-fraction-card {
  text-align: right;
}

[dir="rtl"] .k-data-table {
  text-align: left;
}

[dir="rtl"] .k-data-table td:first-child,
[dir="rtl"] .k-data-table th:first-child {
  text-align: center;
}

[dir="rtl"] .k-result-summary {
  border-left: none;
  border-right: 3px solid #2f5c94;
  border-radius: 3px 0 0 3px;
}

[dir="rtl"] .k-search-input-field {
  border-right: 1px solid #7f9db9;
  border-left: none;
}
