/* Overlay for the floating panel */

.info-button {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--ink-2); /* Light grey border */
  background: transparent;
  color: var(--ink-2); /* Grey color for the "i" */
  font-size: var(--fs-base);
  font-style: normal;
  font-weight: var(--fw-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-sizing: border-box; /* Ensures border is included in width/height */
}

.info-button:hover {
  box-shadow: 0 0 4px var(--danger); /* Light white shadow on hover */
}

/* The 18px base is sized for a standalone corner badge; sitting beside a
   control's label it has to match the label's line, not tower over it. */
.info-button-inline {
  width: calc(14px * var(--cv-font-scale, 1));
  height: calc(14px * var(--cv-font-scale, 1));
  font-size: calc(9px * var(--cv-font-scale, 1));
  line-height: 1;
  flex-shrink: 0;
}



.info-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--popup-bg);
  /* Was --z-anchor (999) — opened from a floating panel/side-dock tab's ⓘ
     button (ui/panels/PanelWindow.js), so it must outrank --z-dock (1200) or
     it renders behind the panel that opened it. See --z-info-panel's own
     comment in theme.css. */
  z-index: var(--z-chrome);
  display: none;
}

.info-panel-overlay.show {
  display: block;
}

/* Info panel */
.info-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--popup-bg);
  color: var(--fg-75);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-width: 80%;
  max-height: 80%;
  overflow-y: auto;
  z-index: var(--z-info-panel); /* one rung above .info-panel-overlay — see theme.css */
  display: none;
}

.info-panel.show {
  display: block;
}

.info-panel-close {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--sp-3) var(--sp-5);
  background: var(--bg-color);
  color: var(--fg-1);
  border: none;
  border-radius: var(--radius-4);
  cursor: pointer;
}

.info-panel-close:hover {
  box-shadow: 0 0 4px var(--fg-1);
  border: 1px solid var(--hover-color);
}

.info-panel-content {
  margin-bottom: 30px;
}

/* Blocks emitted by the markdown renderer in ui/InfoPanel.js. */
.info-panel-content p,
.info-panel-content ul,
.info-panel-content ol {
  margin: 0 0 var(--sp-3);
  line-height: 1.5;
}

.info-panel-content ul,
.info-panel-content ol {
  padding-left: var(--sp-5);
}

/* A nested list belongs to the item above it — no extra gap between them. */
.info-panel-content li > ul,
.info-panel-content li > ol {
  margin-bottom: 0;
}

.info-panel-content li {
  margin-bottom: var(--sp-1);
}

.info-panel-content blockquote {
  margin: 0 0 var(--sp-3);
  padding-left: var(--sp-3);
  border-left: 2px solid var(--panel-border, var(--wash-4));
  opacity: 0.85;
}
