:root {
  --bslib-sidebar-main-bg: #f8f8f8;
}

.popover {
  --bs-popover-header-bg: #222;
  --bs-popover-header-color: #fff;
}

.popover .btn-close {
  filter: var(--bs-btn-close-white-filter);
}
shiny-chat-message table td,
shiny-chat-message table th {
  border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);
  padding: 3px;
}

shiny-chat-message table td {
  font-family: var(--bs-font-monospace);
}

#show_title:empty, #show_query:empty {
  /* Prevent empty title/query blocks from taking any space */
  border: 0;
  padding: 0;
  margin-bottom: 0;
}

#show_title:empty, #show_query {
  /* We can't affect the flex parent's gap, so instead we use a negative margin
     to counteract it */
     margin-top: calc(-1 * var(--bslib-mb-spacer));
}

@media screen and (min-width: 575.98px) {
  @container bslib-value-box (max-width: 300px) {
      .bslib-value-box:not(.showcase-bottom) .value-box-grid .value-box-showcase {
          /* Hide showcase on all but the largest screen sizes to save room for plots */
          display: none !important;
      }
  }
}