/* BTF shared navigation + audio (matches biblerelationships.pages.dev) */

.btf-audio-panel {
  background: #ffffff;
  border-bottom: 2px solid #1F3864;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 950;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
  margin: 0 0 20px;
}

.btf-audio-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.btf-audio-label {
  font-size: 11px;
  font-weight: 700;
  color: #1F3864;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.btf-audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

.btf-audio-btn:focus {
  outline: 2px solid #d97706;
  outline-offset: 2px;
}

.btf-btn-play-main {
  background: #1F3864;
  color: #ffffff;
}

.btf-btn-play-main:hover {
  background: #2c54a0;
}

.btf-btn-stop {
  background: #f2f2f2;
  color: #1c1c1e;
  border: 1px solid #cccccc;
}

.btf-btn-stop:hover:not(:disabled) {
  background: #e0e0e0;
}

.btf-btn-stop:disabled {
  opacity: 0.4;
  cursor: default;
}

.btf-speed-group {
  display: flex;
  gap: 2px;
  align-items: center;
}

.btf-speed-label {
  font-size: 11px;
  color: #777;
  margin-right: 4px;
}

.btf-speed-btn {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border: 1px solid #cccccc;
  background: #f2f2f2;
  color: #555;
  cursor: pointer;
  border-radius: 2px;
}

.btf-speed-btn.active {
  background: #1F3864;
  color: #ffffff;
  border-color: #1F3864;
}

.btf-speed-btn:focus {
  outline: 2px solid #d97706;
  outline-offset: 1px;
}

.btf-audio-progress {
  font-size: 12px;
  color: #888;
  margin-left: auto;
  white-space: nowrap;
}

.btf-play-section-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  cursor: pointer;
  flex-shrink: 0;
}

.btf-play-section-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.btf-play-section-btn:focus {
  outline: 2px solid #d97706;
  outline-offset: 2px;
}

.btf-play-section-btn.btf-btn-active {
  background: #d97706;
  border-color: #d97706;
}

.btf-play-section-btn.btf-on-light {
  background: #1F3864;
  color: #ffffff;
  border-color: #1F3864;
}

.btf-play-section-btn.btf-on-light:hover {
  background: #2c54a0;
  border-color: #2c54a0;
}

.btf-play-bar {
  margin: 0 0 14px;
}

.section-body:not(.open) > .btf-play-bar:first-child,
.how-to-body:not(.open) > .btf-play-bar:first-child {
  display: none;
}

.btf-minimise-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 24px auto 8px;
  background: none;
  border: 1px solid #cccccc;
  color: #777;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btf-minimise-btn:hover {
  background: #f2f2f2;
  border-color: #1F3864;
  color: #1F3864;
}

.btf-minimise-btn:focus {
  outline: 2px solid #d97706;
  outline-offset: 2px;
}

.btf-section-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 40px;
}

.btf-section-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid #cccccc;
  color: #777;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btf-section-ctrl-btn:hover {
  background: #f2f2f2;
  border-color: #1F3864;
  color: #1F3864;
}

.btf-section-ctrl-btn:focus {
  outline: 2px solid #d97706;
  outline-offset: 2px;
}

section.btf-section-playing,
.part-section.btf-section-playing,
.how-to-wrap.btf-section-playing {
  box-shadow: 0 0 0 3px #d97706;
  border-radius: 4px;
}

.toc-menu .toc-back-top {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 700;
}

.toc-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
}

.toc-btn {
  background: #1F3864;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: left;
}

.toc-btn:hover {
  background: #2c54a0;
}

.toc-btn:focus {
  outline: 2px solid #2c54a0;
  outline-offset: 2px;
}

.toc-menu {
  display: none;
  background: #1F3864;
  border-radius: 4px 4px 0 0;
  padding: 8px 0;
  margin-bottom: 4px;
  max-height: 60vh;
  overflow-y: auto;
  min-width: 220px;
}

.toc-menu.open {
  display: block;
}

.toc-menu a {
  display: block;
  padding: 8px 16px;
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
}

.toc-menu a:hover,
.toc-menu a:focus {
  background: #2c54a0;
  outline: none;
}

/* Mobile: stack wide tables instead of horizontal scroll */
@media (max-width: 639px) {
  .table-wrap {
    overflow-x: visible;
    margin: 16px 0 24px;
  }

  .table-wrap table {
    display: block;
    width: 100%;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tbody {
    display: block;
  }

  .table-wrap tbody tr {
    display: block;
    margin-bottom: 16px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
  }

  .table-wrap tbody td {
    display: block;
    width: 100% !important;
    border: none;
    border-bottom: 1px solid #eeeeee;
    box-sizing: border-box;
  }

  .table-wrap tbody td:last-child {
    border-bottom: none;
  }

  .table-wrap tbody td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1F3864;
    margin-bottom: 8px;
  }

  .table-wrap td.label-cell {
    background: #f2f2f2;
  }
}

@media print {
  .btf-audio-panel,
  .btf-minimise-btn,
  .btf-section-controls,
  .btf-play-section-btn,
  .btf-play-bar,
  .toc-container {
    display: none !important;
  }
}
