/*
 * The firmware manual intentionally reuses the Koheron website stylesheet
 * from https://assets.koheron.com/css/main.css so its documentation pages
 * match the Koheron SDK documentation styling.
 *
 * Keep this file for firmware-manual-only fixes that cannot live in the
 * website stylesheet. Avoid layout, typography, navigation, or code-block
 * overrides here unless they are also present on the website documentation.
 */

.api-table th:first-child,
.api-table td:first-child {
  min-width: 8rem;
  white-space: nowrap;
}

.comparison-table {
  table-layout: fixed;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  width: 17%;
  white-space: normal;
  overflow-wrap: break-word;
}

.comparison-table th:nth-child(2),
.comparison-table td:nth-child(2) {
  width: 33%;
}

.comparison-table th:nth-child(3),
.comparison-table td:nth-child(3) {
  width: 50%;
}

@media (max-width: 767px) {
  .comparison-table,
  .comparison-table tbody,
  .comparison-table tr,
  .comparison-table td {
    display: block;
    width: 100%;
  }

  .comparison-table thead {
    display: none;
  }

  .comparison-table {
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .comparison-table tbody tr {
    margin: 0 0 1rem;
    border: 1px solid #d7dee8;
    border-radius: 0.35rem;
    overflow: hidden;
  }

  .comparison-table td {
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid #e8edf2;
  }

  .comparison-table td::before {
    display: block;
    margin-bottom: 0.25rem;
    color: #536273;
    font-size: 0.8125rem;
    font-weight: 600;
  }

  .comparison-table td:nth-child(1)::before { content: "Area"; }
  .comparison-table td:nth-child(2)::before { content: "V0.x"; }
  .comparison-table td:nth-child(3)::before { content: "V1"; }

  .comparison-table td:first-child {
    background: #eef7fc;
    color: #17324d;
    font-weight: 600;
  }

  .comparison-table td:first-child::before {
    display: none;
  }

  .comparison-table td:last-child {
    border-bottom: 0;
  }
}

.api-command-badges,
.api-applicable-boards {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.api-applicable-boards {
  margin: 0.25rem 0 1.25rem;
}

.api-command-badges {
  margin: -0.25rem 0 1.25rem;
}

.api-applicable-boards-label {
  color: #6c757d;
  font-size: 0.875rem;
  line-height: 1;
}

.api-board-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  background: #f8f9fa;
  color: #343a40;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8125rem;
  line-height: 1;
  padding: 0.15rem 0.45rem;
}

.api-board-chip-all {
  background: #eef7ff;
  border-color: #c8e4ff;
}

.firmware-command-mode-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #eadb8f;
  border-radius: 999px;
  background: #fff8d6;
  color: #5f4b00;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8125rem;
  line-height: 1;
  padding: 0.15rem 0.45rem;
  text-decoration: none;
}

.firmware-command-mode-badge:hover,
.firmware-command-mode-badge:focus {
  color: #5f4b00;
  text-decoration: none;
}

.firmware-notice {
  border-left: 4px solid #0f9dcc;
  background: #eef8fc;
  padding: 14px 18px;
  margin: 1.75rem 0 2rem;
}

.firmware-notice-title {
  color: #17324d;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.firmware-notice p {
  margin: 0.35rem 0 0;
}
