/* This panel and its buttons are always light (they're chrome around a
   light-themed iframe, not part of the doc page itself), but without an
   explicit `color` they inherit the surrounding page's text color -- which
   in the site's dark mode is near-white, making text on these light
   backgrounds unreadable. Set it explicitly everywhere below instead of
   relying on inheritance, so this stays legible regardless of page theme. */
.bloch-panel {
  position: fixed;
  top: 6rem;
  right: 2rem;
  width: 960px;
  height: 420px;
  min-width: 260px;
  min-height: 220px;
  /* User-resizable (drag the bottom-right corner); `overflow` must be
     something other than `visible` for `resize` to take effect. */
  resize: both;
  overflow: hidden;
  z-index: 1000;
  background: #fff;
  color: #222;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.bloch-panel--hidden {
  display: none;
}

.bloch-panel__titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: #f3f3f3;
  font-size: 0.85rem;
  cursor: move;
}

.bloch-panel__titlebar span {
  flex: 1;
}

.bloch-panel__close {
  border: none;
  background: transparent;
  color: #222;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
}

.bloch-panel__close:hover {
  background: #e2e2e2;
  border-radius: 3px;
}

.bloch-panel__iframe {
  flex: 1;
  border: 0;
  width: 100%;
  background: #fff;
}

.bloch-preset-btn {
  padding: 0.3rem 0.7rem;
  margin: 0.25rem 0.5rem 0.25rem 0;
  border: 1px solid #999;
  border-radius: 4px;
  background: #fafafa;
  color: #222;
  cursor: pointer;
  font-size: 0.85rem;
}

.bloch-preset-btn:hover {
  background: #eee;
}
