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

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

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

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

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

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

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

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

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

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

.bmr-saved-badge {
  background: #003366;
  color: #ffffff;
  border-radius: 10px;
  padding: 0 5px;
  font-size: 10px;
  line-height: 14px;
}

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

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

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

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

.bmr-intro-text em {
  font-style: italic;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.bmr-age-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bmr-age-row .bmr-input {
  width: 75px;
}

.bmr-age-note {
  font-size: 12px;
  color: #555555;
}

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

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

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

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

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

/* Settings Toggle */
.bmr-settings-link-row {
  margin-top: 6px;
  margin-bottom: 8px;
  text-align: center;
}

.bmr-settings-toggle {
  background: none;
  border: none;
  color: #0844a4;
  font-size: 12px;
  cursor: pointer;
  font-weight: bold;
  padding: 2px 6px;
  text-decoration: underline;
  font-family: inherit;
}

.bmr-settings-toggle:hover {
  color: #002277;
}

.bmr-settings-panel {
  background: #f8fafc;
  border: 1px dashed #c2d1e0;
  border-radius: 3px;
  padding: 8px 10px;
  margin-top: 4px;
  margin-bottom: 10px;
  font-size: 12px;
}

.bmr-settings-panel label {
  display: block;
  margin-bottom: 4px;
  color: #333;
  font-weight: bold;
}

.bmr-settings-select {
  width: 100%;
  padding: 4px;
  font-size: 12px;
  border: 1px solid #999;
  border-radius: 2px;
  margin-bottom: 6px;
}

.bmr-fat-group {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bmr-fat-group input {
  width: 60px;
}

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

.bmr-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);
}

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

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

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

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

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

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

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

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

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

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

/* Main BMR Headline */
.bmr-res-headline {
  font-size: 18px;
  color: #222222;
  margin: 0 0 12px 0;
  font-weight: normal;
}

.bmr-res-headline strong {
  color: #4c8b25;
  font-size: 22px;
  font-weight: bold;
}

/* Activity Table Subhead */
.bmr-table-subhead {
  font-size: 13px;
  color: #222222;
  margin: 0 0 8px 0;
  font-weight: normal;
}

/* Results Activity Table */
.bmr-activity-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.bmr-activity-table th {
  background: #2b5a88;
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
  padding: 5px 8px;
  text-align: left;
}

.bmr-activity-table th:last-child {
  text-align: right;
  width: 90px;
}

.bmr-activity-table td {
  padding: 6px 8px;
  font-size: 12.5px;
  border-bottom: 1px solid #e2e8f0;
  color: #222222;
}

.bmr-activity-table td:last-child {
  text-align: right;
  font-weight: bold;
  color: #111111;
}

.bmr-activity-table tr:nth-child(even) td {
  background: #f8fafc;
}

.bmr-activity-table tr:hover td {
  background: #edf4fa;
}

/* Footnotes */
.bmr-footnotes {
  font-size: 11.5px;
  line-height: 1.5;
  color: #444444;
  margin-top: 8px;
  padding-top: 6px;
}

.bmr-footnotes div {
  margin-bottom: 3px;
}

.bmr-footnotes strong {
  color: #222222;
}

/* SIDEBAR COLUMN (Right) */
.bmr-sidebar-col {
  width: 310px;
}

/* Search Box */
.bmr-search-card {
  margin-bottom: 16px;
}

.bmr-search-form {
  display: flex;
  gap: 4px;
  position: relative;
}

.bmr-search-input {
  flex: 1;
  border: 1px solid #7f9db9;
  padding: 5px 8px;
  font-size: 13px;
  border-radius: 2px;
  font-family: inherit;
}

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

.bmr-search-btn {
  background: #2b5a88;
  color: #ffffff;
  border: 1px solid #1c3c5b;
  font-size: 13px;
  font-weight: bold;
  padding: 5px 12px;
  border-radius: 2px;
  cursor: pointer;
}

.bmr-search-btn:hover {
  background: #1e4265;
}

/* Search Autocomplete Dropdown */
.bmr-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #b5c7d8;
  border-top: none;
  border-radius: 0 0 3px 3px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  max-height: 260px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

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

.bmr-search-item {
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bmr-search-item:hover {
  background: #eef4fb;
  color: #0844a4;
}

.bmr-search-item-cat {
  font-size: 10.5px;
  color: #777777;
}

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

/* Fitness and Health Calculators Card */
.bmr-side-card {
  border: 1px solid #b5c7d8;
  border-radius: 3px;
  background: #ffffff;
  margin-bottom: 16px;
  overflow: hidden;
}

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

.bmr-side-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px 10px;
  gap: 4px 12px;
}

.bmr-side-card-grid a {
  font-size: 12px;
  color: #0844a4;
  text-decoration: none;
  line-height: 1.6;
}

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

.bmr-side-card-grid a.active-link {
  font-weight: bold;
  color: #111111;
  text-decoration: none;
  cursor: default;
}

.bmr-side-card-more {
  padding: 4px 10px 8px;
  font-size: 12px;
  border-top: 1px solid #eef2f6;
  text-align: left;
}

.bmr-side-card-more a {
  color: #0844a4;
  text-decoration: none;
}

.bmr-side-card-more a:hover {
  text-decoration: underline;
}

.bmr-side-card-footer {
  background: #f4f6f8;
  border-top: 1px solid #e1e7ec;
  padding: 6px 10px;
  font-size: 11px;
  color: #555555;
  text-align: center;
}

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

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

/* EDITORIAL / SEO CONTENT SECTION (500+ Words) */
.bmr-editorial-content {
  margin-top: 24px;
  border-top: 1px solid #dcdcdc;
  padding-top: 18px;
  line-height: 1.6;
  font-size: 13.5px;
  color: #222222;
}

.bmr-editorial-content h2 {
  font-size: 18px;
  font-weight: bold;
  color: #003366;
  margin: 18px 0 8px 0;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
}

.bmr-editorial-content h3 {
  font-size: 15px;
  font-weight: bold;
  color: #2b5a88;
  margin: 14px 0 6px 0;
}

.bmr-editorial-content p {
  margin: 0 0 12px 0;
}

.bmr-editorial-content ul,
.bmr-editorial-content ol {
  margin: 0 0 12px 24px;
  padding: 0;
}

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

/* Direct Answer AEO Callout Box */
.bmr-aeo-callout {
  background: #f0f7ff;
  border: 1px solid #b8daff;
  border-left: 4px solid #0056b3;
  padding: 12px 14px;
  margin: 14px 0 18px 0;
  border-radius: 0 3px 3px 0;
}

.bmr-aeo-callout-title {
  font-size: 13.5px;
  font-weight: bold;
  color: #004085;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bmr-aeo-callout p {
  margin: 0;
  font-size: 13px;
  color: #1c3d5a;
  line-height: 1.5;
}

/* Formula Block */
.bmr-formula-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 10px 14px;
  margin: 12px 0;
  font-family: monospace, Courier, sans-serif;
  font-size: 12.5px;
  color: #1e293b;
  line-height: 1.6;
}

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

.bmr-modal-card {
  background: #ffffff;
  border-radius: 4px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

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

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

.bmr-modal-body {
  padding: 14px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.5;
}

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

.bmr-btn-primary {
  background: #4c8b25;
  color: #ffffff;
  border: 1px solid #3d701e;
  border-radius: 3px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

.bmr-btn-primary:hover {
  background: #3f741f;
}

.bmr-btn-secondary {
  background: #e2e8f0;
  color: #333333;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
}

.bmr-btn-secondary:hover {
  background: #cbd5e1;
}

.bmr-btn-danger {
  background: #ef4444;
  color: #ffffff;
  border: 1px solid #dc2626;
  border-radius: 3px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
}

.bmr-btn-danger:hover {
  background: #dc2626;
}

/* Saved item in modal */
.bmr-saved-item {
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  padding: 8px 10px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
}

.bmr-saved-item:hover {
  background: #f0f7ff;
}

.bmr-saved-item-title {
  font-weight: bold;
  color: #003366;
  font-size: 13px;
}

.bmr-saved-item-meta {
  font-size: 11px;
  color: #666666;
  margin-top: 2px;
}

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

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

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

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

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

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

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

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

.bmr-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"] .bmr-breadcrumbs {
  direction: rtl;
}

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

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

[dir="rtl"] .bmr-activity-table th:last-child,
[dir="rtl"] .bmr-activity-table td:last-child {
  text-align: left;
}

[dir="rtl"] .bmr-activity-table th:first-child,
[dir="rtl"] .bmr-activity-table td:first-child {
  text-align: right;
}

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

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

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

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

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

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

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

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

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

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

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

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