/*
 * Custom handlebars charts: tooltips, template picker in Explore,
 *   gallery overlay. Static styles only; positioning and show/hide
 *   logic live in JS (tooltips.js, gallery.js, chart_edit.js).
 */

/* Tooltip container: antd 5 markup to match Superset's native tooltips.
   Double selectors override antd CSS from the bundle.
   position:fixed follows cursor; pointer-events:none prevents capture. */
.ant-tooltip.ant-tooltip-placement-top {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  margin: 0;
  left: 0;
  top: 0;
}

.ant-tooltip .ant-tooltip-inner {
  background: #fff;
  color: #333;
  font-size: 12px;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Template picker select above the Handlebars editor in Explore. */
.__template-picker {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 4px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 12px;
  color: #333;
  background: #fff;
}

/* Custom gallery overlay: same layout as IconsPane.
   top/left/width/height are set from JS to match the card grid. */
#__customTemplateGallery {
  position: fixed;
  z-index: 9999;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, 192px);
  grid-auto-rows: max-content;
  gap: 16px;
  justify-content: space-evenly;
  padding: 16px;
  align-content: start;
  justify-items: center;
}
