body {
  min-height: 100vh;
}

.language-select {
  width: auto;
  min-width: 7.5rem;
}

.sidebar-toggle-btn {
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
  min-width: 2.25rem;
  min-height: 2rem;
}

.sidebar-toggle-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  width: 1.25rem;
  height: 1rem;
}

.sidebar-toggle-icon span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: #fff;
}

.sidebar-toggle-btn:hover,
.sidebar-toggle-btn:focus-visible,
.sidebar-toggle-btn.is-active {
  background: #fff;
  border-color: #fff;
  color: #212529;
}

.sidebar-toggle-btn:hover .sidebar-toggle-icon span,
.sidebar-toggle-btn:focus-visible .sidebar-toggle-icon span,
.sidebar-toggle-btn.is-active .sidebar-toggle-icon span {
  background: #212529;
}

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 1060;
  pointer-events: auto;
}

.onboarding-spotlight {
  position: fixed;
  border-radius: 0.5rem;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.62);
  z-index: 1061;
  pointer-events: none;
  transition: top 0.15s ease, left 0.15s ease, width 0.15s ease, height 0.15s ease;
}

.onboarding-popover {
  position: fixed;
  z-index: 1062;
  width: min(92vw, 18rem);
  max-width: calc(100vw - 1.5rem);
}

.sidebar {
  min-height: calc(100vh - 56px);
}

.panel-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.api-panel {
  width: 100%;
}

.json-output-wrap .json-output {
  padding-top: 2.35rem;
}

.view-table-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
}

.data-table-modal {
  border: none;
  padding: 0;
  width: min(96vw, 1200px);
  max-height: 90vh;
}

.data-table-modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.data-table-modal-box {
  padding: 1.25rem;
  max-height: 90vh;
  overflow: auto;
}

.data-table-modal-scroll {
  overflow-x: auto;
}

.data-table-modal-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

.data-table-modal-table thead th {
  white-space: nowrap;
  vertical-align: middle;
}

.data-table-modal-table tbody td {
  white-space: nowrap;
}

.mnemonic-text {
  line-height: 1.6;
  word-break: break-word;
  color: var(--bs-body-color);
}

.json-output {
  max-height: 24rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.menu-count {
  min-width: 1.75rem;
}

.menu-divider {
  opacity: 0.5;
}

.app-dialog {
  border: none;
  padding: 0;
  width: min(92vw, 28rem);
  max-width: 100%;
}

.app-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.app-dialog-box {
  padding: 1.25rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
}

#clientIpInfo {
  font-family: var(--bs-font-monospace);
}

@media (max-width: 991.98px) {
  .navbar-brand {
    max-width: 55vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.sidebar-mobile-open {
    overflow: hidden;
  }

  .sidebar {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    width: min(20rem, 88vw);
    max-width: 100%;
    height: calc(100vh - 56px);
    min-height: auto;
    z-index: 1040;
    overflow-y: auto;
    border-bottom: none;
    border-right: 1px solid var(--bs-border-color);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
  }

  .sidebar.sidebar-open {
    display: block;
  }

  .sidebar-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 56px;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1030;
    background: rgba(0, 0, 0, 0.45);
  }

  .sidebar-backdrop.show {
    display: block;
  }

  #moduleMenu {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-x: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  #moduleMenu .list-group-item {
    border-radius: 0;
    flex: initial;
    min-width: auto;
    width: 100%;
    scroll-snap-align: none;
  }

  #moduleMenu .menu-divider {
    display: none;
  }

  .api-panel .card-body {
    padding: 1rem;
  }

  .json-output {
    max-height: 18rem;
    font-size: 0.78rem;
  }

  .table-responsive {
    font-size: 0.82rem;
  }
}

@media (min-width: 992px) {
  .sidebar-mobile-header {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .language-select {
    min-width: 6.5rem;
  }

  main {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  #logsView .table th:nth-child(6),
  #logsView .table td:nth-child(6) {
    display: none;
  }
}

