/* Body Fat Calculator Page Styles - Calculator Archive
 * Pixel-perfect clone of Calculator.net Body Fat Calculator
 */

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

/* Top Bar: Breadcrumbs & Print / Saved */
.bf-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 8px;
}

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

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

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

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

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

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

.bf-saved-btn {
  background: #f4f6f8;
  border: 1px solid #b5c7d8;
  color: #003366;
  font-size: 11.5px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.bf-saved-btn:hover {
  background: #e2eaf2;
  border-color: #0844a4;
}

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

.bf-print-link:hover {
  color: #002277;
}

/* Page Title */
.bf-page-title {
  font-size: 26px;
  font-weight: bold;
  color: #003366;
  margin: 0 0 10px 0;
}

/* Intro Paragraph */
.bf-intro-text {
  font-size: 13px;
  line-height: 1.55;
  color: #333333;
  margin: 0 0 16px 0;
}

.bf-intro-text a {
  color: #0844a4;
  text-decoration: none;
}

.bf-intro-text a:hover {
  text-decoration: underline;
}

/* Two-column layout: Left Content (740px) vs Right Sidebar (320px) */
.bf-main-grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 25px;
  align-items: start;
}

.bf-content-col {
  min-width: 0;
}

/* Calculator + Result Row */
.bf-calc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
  align-items: flex-start;
}

/* FORM CONTAINER (Left side of calculator) */
.bf-form-container {
  flex: 0 0 310px;
  width: 310px;
}

/* Tabs */
.bf-tabs {
  display: flex;
  background: #ffffff;
  border-bottom: 1px solid #c5d5e5;
  margin-bottom: 0;
}

.bf-tab {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  border: 1px solid #c5d5e5;
  border-bottom: none;
  background: #19528d;
  color: #ffffff;
  margin-right: 3px;
  border-radius: 3px 3px 0 0;
  transition: background 0.15s ease;
}

.bf-tab:hover {
  background: #2365aa;
}

.bf-tab.active {
  background: #ffffff;
  color: #003366;
  border-bottom: 1px solid #ffffff;
  margin-bottom: -1px;
}

/* Form Box */
.bf-form-box {
  background: #ffffff;
  border: 1px solid #c5d5e5;
  padding: 12px 14px 16px;
  border-radius: 0 3px 3px 3px;
}

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

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

.bf-form-table td:first-child {
  width: 65px;
  color: #222222;
  font-weight: normal;
}

.bf-gender-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bf-gender-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 13px;
}

.bf-gender-group input[type="radio"] {
  cursor: pointer;
  margin: 0;
}

.bf-input {
  border: 1px solid #999999;
  border-radius: 2px;
  padding: 4px 6px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}

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

.bf-input-full {
  width: 100%;
}

.bf-unit-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bf-unit-row .bf-input {
  flex: 1;
}

.bf-unit-row span {
  font-size: 12px;
  color: #333333;
  min-width: 22px;
}

.bf-unit-split {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bf-unit-split input {
  width: 50px;
}

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

.bf-calc-btn {
  background: #4c8b25;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  border: 1px solid #3d701e;
  border-radius: 3px;
  padding: 6px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.bf-calc-btn:hover {
  background: #3f741f;
}

.bf-calc-btn .play-arrow {
  font-size: 9px;
}

.bf-clear-btn {
  background: #e4e4e4;
  color: #333333;
  font-size: 13px;
  border: 1px solid #cccccc;
  border-radius: 3px;
  padding: 6px 14px;
  cursor: pointer;
}

.bf-clear-btn:hover {
  background: #d6d6d6;
}

/* RESULTS CONTAINER (Right side of calculator) */
.bf-results-container {
  flex: 1;
  min-width: 320px;
  background: #ffffff;
}

.bf-results-header {
  background: #547726;
  color: #ffffff;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 3px 3px 0 0;
}

.bf-save-action {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  opacity: 0.95;
  padding: 1px 4px;
}

.bf-save-action:hover {
  opacity: 1;
  text-decoration: underline;
}

.bf-save-feedback {
  font-size: 11px;
  color: #e2f0d9;
  margin-left: 6px;
  display: none;
}

/* Results Content */
.bf-results-body {
  border: 1px solid #dcdcdc;
  border-top: none;
  padding: 12px 14px 16px;
  border-radius: 0 0 3px 3px;
}

/* Main Body Fat % Headline */
.bf-res-headline {
  font-size: 20px;
  font-weight: bold;
  color: #3c7d19;
  margin: 0 0 10px 0;
}

/* Color Spectrum Gauge Bar */
.bf-gauge-section {
  margin: 10px 0 16px;
  position: relative;
}

.bf-gauge-pointer-wrapper {
  position: relative;
  height: 22px;
  margin-bottom: 2px;
}

.bf-gauge-pointer {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.4s ease;
}

.bf-gauge-pointer-val {
  font-size: 11px;
  font-weight: bold;
  color: #111111;
  line-height: 1;
  margin-bottom: 1px;
}

.bf-gauge-pointer-arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #111111;
}

.bf-spectrum-bar {
  display: flex;
  height: 18px;
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.bf-bar-seg {
  height: 100%;
  position: relative;
}

.bf-bar-essential {
  background: #1b6d22; /* Dark green */
}

.bf-bar-athletes {
  background: #39b54a; /* Vibrant green */
}

.bf-bar-fitness {
  background: #a4d233; /* Light yellow-green */
}

.bf-bar-average {
  background: #e5a922; /* Gold/orange */
}

.bf-bar-obese {
  background: #8b1818; /* Dark red/maroon */
}

/* Labels below spectrum bar */
.bf-spectrum-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 9.5px;
  color: #333333;
}

.bf-spectrum-label-item {
  text-align: center;
  overflow: hidden;
}

.bf-spectrum-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #666666;
  margin-top: 1px;
  padding: 0 2px;
}

/* Results Table */
.bf-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-top: 12px;
  background: #ffffff;
}

.bf-results-table tr {
  border-bottom: 1px solid #eaeaea;
}

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

.bf-results-table td {
  padding: 6px 8px;
}

.bf-results-table td:first-child {
  color: #222222;
  width: 65%;
}

.bf-results-table td:last-child {
  color: #111111;
  font-weight: normal;
  text-align: right;
  width: 35%;
}

/* Related Buttons Section */
.bf-related-section {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  background: #eeeeee;
  padding: 6px 10px;
  border-radius: 3px;
  margin-bottom: 24px;
  font-size: 12.5px;
}

.bf-related-label {
  font-weight: bold;
  color: #333333;
  margin-right: 6px;
}

.bf-related-btn {
  background: #2b5a88;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 3px;
  text-decoration: none;
  font-size: 12px;
  font-weight: normal;
  transition: background 0.15s ease;
}

.bf-related-btn:hover {
  background: #19436d;
}

/* Reference Section */
.bf-reference-section {
  margin-bottom: 30px;
}

.bf-ref-title {
  font-size: 18px;
  font-weight: bold;
  color: #003366;
  margin: 0 0 14px 0;
}

.bf-ref-subtitle {
  font-size: 13px;
  font-weight: bold;
  color: #222222;
  margin: 14px 0 8px 0;
}

.bf-ref-table {
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 20px;
  background: #ffffff;
  border: 1px solid #c5d5e5;
}

.bf-ref-table th {
  background: #2b5a88;
  color: #ffffff;
  font-weight: bold;
  padding: 6px 10px;
  text-align: left;
  border: 1px solid #234b73;
}

.bf-ref-table td {
  padding: 5px 10px;
  border: 1px solid #dbe5ee;
  color: #333333;
}

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

.bf-ref-table tr.active-row {
  background: #eaf4e0 !important;
  font-weight: bold;
  color: #2e6d1b;
}

/* Editorial / SEO / AEO / GEO Content Article */
.bf-editorial-content {
  font-size: 13.5px;
  line-height: 1.65;
  color: #333333;
  margin-top: 25px;
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
}

.bf-editorial-content h2 {
  font-size: 18px;
  color: #003366;
  font-weight: bold;
  margin: 22px 0 10px 0;
}

.bf-editorial-content h3 {
  font-size: 15px;
  color: #1a4473;
  font-weight: bold;
  margin: 16px 0 8px 0;
}

.bf-editorial-content p {
  margin: 0 0 14px 0;
}

.bf-editorial-content ul,
.bf-editorial-content ol {
  margin: 0 0 16px 20px;
  padding: 0;
}

.bf-editorial-content li {
  margin-bottom: 6px;
}

/* SEO Callout Boxes */
.seo-formula-box {
  background: #f2f7fb;
  border-left: 4px solid #003366;
  padding: 12px 14px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12.5px;
  margin: 14px 0;
  color: #1e3a5f;
  line-height: 1.5;
}

.seo-aeo-card {
  background: #fafbfc;
  border: 1px solid #c5d5e5;
  border-radius: 4px;
  padding: 12px 16px;
  margin: 16px 0;
}

.aeo-q {
  font-size: 14px;
  font-weight: bold;
  color: #003366;
  margin-bottom: 6px;
}

.aeo-a {
  font-size: 13px;
  color: #333333;
  line-height: 1.55;
}

.geo-insight-box {
  background: #f7faf5;
  border: 1px solid #bcd8a8;
  border-radius: 4px;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.55;
  color: #29471b;
}

.geo-insight-title {
  font-weight: bold;
  color: #276313;
  margin-bottom: 5px;
}

/* RIGHT SIDEBAR */
.bf-sidebar-col {
  width: 310px;
}

/* Search Form */
.bf-side-search-form {
  display: flex;
  margin-bottom: 20px;
}

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

.bf-side-search-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #2b5a88;
  border-right: none;
  border-radius: 2px 0 0 2px;
  font-size: 13px;
  box-sizing: border-box;
}

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

.bf-side-search-btn {
  background: #2b5a88;
  color: #ffffff;
  border: 1px solid #2b5a88;
  border-radius: 0 2px 2px 0;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s ease;
}

.bf-side-search-btn:hover {
  background: #19436d;
}

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

.bf-search-dropdown.active {
  display: block;
}

.bf-search-item {
  padding: 7px 10px;
  font-size: 12.5px;
  color: #333333;
  cursor: pointer;
  border-bottom: 1px solid #f0f4f8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bf-search-item:hover {
  background: #eef4fa;
  color: #0844a4;
}

.bf-search-item-cat {
  font-size: 11px;
  color: #777777;
}

.bf-search-no-results {
  padding: 10px;
  font-size: 12px;
  color: #777777;
  text-align: center;
}

/* Sidebar Card */
.bf-side-card {
  border: 1px solid #2b5a88;
  border-radius: 3px;
  overflow: hidden;
  background: #ffffff;
  margin-bottom: 20px;
}

.bf-side-card-title {
  background: #2b5a88;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  padding: 6px 10px;
}

.bf-side-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px 10px;
  gap: 5px 12px;
  font-size: 12px;
}

.bf-side-card-grid a {
  color: #0844a4;
  text-decoration: none;
  padding: 2px 0;
}

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

.bf-side-card-grid a.active-link {
  font-weight: bold;
  color: #222222;
  text-decoration: none;
}

.bf-side-card-footer {
  border-top: 1px solid #dce4ec;
  padding: 7px 10px;
  font-size: 11.5px;
  color: #666666;
  background: #f7fafc;
  text-align: center;
}

.bf-side-card-footer a {
  color: #0844a4;
  text-decoration: none;
  margin: 0 2px;
}

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

/* MODALS: Saved & Print Dialogs */
.bf-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 15px;
}

.bf-modal-card {
  background: #ffffff;
  border-radius: 4px;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border: 1px solid #cbd5e1;
}

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

.bf-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: bold;
}

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

.bf-modal-body {
  padding: 16px;
  font-size: 13px;
}

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

.bf-btn-clear-all {
  background: #e2e8f0;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 3px;
  cursor: pointer;
}

.bf-btn-close-modal {
  background: #2b5a88;
  color: #ffffff;
  border: 1px solid #19436d;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 3px;
  cursor: pointer;
}

/* Saved item row */
.bf-saved-item {
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fafbfc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bf-saved-item-details {
  font-size: 12.5px;
}

.bf-saved-item-title {
  font-weight: bold;
  color: #3c7d19;
  font-size: 14px;
  margin-bottom: 3px;
}

.bf-saved-item-meta {
  color: #64748b;
  font-size: 11.5px;
}

.bf-saved-item-actions {
  display: flex;
  gap: 6px;
}

.bf-btn-load {
  background: #4c8b25;
  color: #ffffff;
  border: none;
  border-radius: 3px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
}

.bf-btn-del {
  background: #f87171;
  color: #ffffff;
  border: none;
  border-radius: 3px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
}

/* Printable Report Modal Layout */
.bf-print-report {
  font-family: Arial, sans-serif;
  color: #222222;
}

.bf-print-header {
  border-bottom: 2px solid #2b5a88;
  padding-bottom: 8px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.bf-print-logo {
  font-size: 18px;
  font-weight: bold;
  color: #003366;
}

.bf-print-logo span {
  color: #4c8b25;
}

.bf-print-date {
  font-size: 11px;
  color: #666666;
}

.bf-print-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.bf-print-box {
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 10px;
  background: #fcfcfc;
}

.bf-print-box-title {
  font-size: 12px;
  font-weight: bold;
  color: #2b5a88;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
  margin-bottom: 6px;
}

/* RTL Support */
[dir="rtl"] .bf-breadcrumbs {
  direction: rtl;
}

[dir="rtl"] .bf-gender-group {
  direction: rtl;
}

[dir="rtl"] .bf-btn-row {
  direction: rtl;
}

[dir="rtl"] .bf-results-table td:last-child {
  text-align: left;
}

[dir="rtl"] .bf-results-table td:first-child {
  text-align: right;
}

[dir="rtl"] .bf-spectrum-labels {
  direction: rtl;
}

/* Responsive Media Queries */
@media (max-width: 980px) {
  .bf-main-grid {
    grid-template-columns: 1fr;
  }
  .bf-sidebar-col {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .bf-calc-row {
    flex-direction: column;
  }
  .bf-form-container,
  .bf-results-container {
    flex: 1 1 100%;
    width: 100%;
  }
  .bf-ref-table {
    width: 100%;
    font-size: 11px;
  }
}

/* Print Styles */
@media print {
  /* Printing Modal Mode */
  body.bf-printing-modal .site-header,
  body.bf-printing-modal .site-footer,
  body.bf-printing-modal .bf-page-container,
  body.bf-printing-modal .bf-main-grid,
  body.bf-printing-modal .bf-top-actions,
  body.bf-printing-modal #bf-saved-modal,
  body.bf-printing-modal .bf-modal-header,
  body.bf-printing-modal .bf-modal-footer,
  body.bf-printing-modal .bf-modal-close {
    display: none !important;
  }

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

  body.bf-printing-modal .bf-modal-card {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

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

  /* Default page print */
  .site-header,
  .bf-top-actions,
  .bf-sidebar-col,
  .bf-related-section,
  .site-footer,
  .bf-btn-row,
  .bf-tabs,
  .bf-modal-backdrop,
  .bf-modal-footer,
  .bf-modal-close,
  .bf-save-action {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt;
  }

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

  .bf-main-grid {
    display: block !important;
  }

  .bf-calc-row {
    display: flex !important;
    flex-direction: row !important;
    page-break-inside: avoid;
  }

  .bf-results-container {
    border: 1px solid #333 !important;
    background: #ffffff !important;
  }
}
