html.burhan-web-bridge-has-sidebar,
html.burhan-web-bridge-has-sidebar body {
  box-sizing: border-box;
}

@media (min-width: 921px) {
  body.burhan-web-bridge-has-sidebar {
    padding-right: 0;
  }

  body.burhan-web-bridge-has-sidebar .site-main {
    box-sizing: border-box;
    width: calc(100vw - 442px);
    max-width: calc(100vw - 442px);
    min-height: calc(100vh - 7rem);
    margin-left: 0;
    margin-right: 0;
  }

  body.burhan-web-bridge-has-sidebar .site-layout--with-sidebar .site-main {
    width: auto;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  body.burhan-web-bridge-has-sidebar .site-main main {
    max-width: 100%;
  }
}

.burhan-web-bridge-pane {
  box-sizing: border-box;
  width: min(360px, calc(100vw - 2rem));
  margin: 0;
  padding: 1rem;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 14px;
  background: #ffffff;
  color: inherit;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.18);
  z-index: 9998;
}

.burhan-web-bridge-pane[data-burhan-surface="engagement-pane"] {
  position: fixed;
  top: 7rem;
  right: 1rem;
  max-height: calc(100vh - 8rem);
  overflow: hidden;
}

@media (min-width: 921px) {
  .site-sidebar .burhan-web-bridge-pane[data-burhan-surface="engagement-pane"] {
    position: sticky;
    top: 1rem;
    right: auto;
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 2rem);
    border-radius: 12px;
    box-shadow: none;
  }
}

.admin-bar .burhan-web-bridge-pane[data-burhan-surface="engagement-pane"] {
  top: calc(7rem + 32px);
  max-height: calc(100vh - 8rem - 32px);
}

.burhan-web-bridge-pane__title {
  display: block;
  margin: 0 0 0.35rem;
  font-weight: 700;
}

.burhan-web-bridge-pane__summary {
  margin: 0 0 0.75rem;
  color: #4b5563;
  font-size: 0.92rem;
}

.burhan-web-bridge-pane__diagnostic-json {
  overflow: auto;
  max-height: calc(100vh - 17rem);
  margin: 0;
  padding: 0.875rem;
  border-radius: 10px;
  background: #111827;
  color: #e5e7eb;
  font: 0.82rem/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.burhan-web-bridge-pane__mount:empty::before {
  content: '';
  display: block;
  min-height: 1px;
}

@media (max-width: 920px) {
  body.burhan-web-bridge-has-sidebar {
    padding-right: 0;
  }

  .burhan-web-bridge-pane[data-burhan-surface="engagement-pane"] {
    position: sticky;
    top: 0;
    right: auto;
    width: 100%;
    max-height: 45vh;
    margin: 0 0 1rem;
    border-radius: 0 0 14px 14px;
  }

  .admin-bar .burhan-web-bridge-pane[data-burhan-surface="engagement-pane"] {
    top: 46px;
    max-height: calc(45vh - 46px);
  }

  .burhan-web-bridge-pane__diagnostic-json {
    max-height: 24vh;
    font-size: 0.76rem;
  }
}

@media (max-width: 600px) {
  .admin-bar .burhan-web-bridge-pane[data-burhan-surface="engagement-pane"] {
    top: 0;
    max-height: 45vh;
  }
}
