/*
Стили кастомных handlebars-чартов: тултипы, селект шаблонов в Explore,
    оверлей галереи Custom. Статичное оформление; динамика
    (позиционирование, показ/скрытие) остаётся в JS.
*/
/* Тултипы: разметка antd 5, чтобы внешний вид совпадал с нативными.
   Двойные селекторы — перебивают antd CSS из бандла.
   position:fixed — следует за курсором; pointer-events:none — не
   перехватывает мышь. */
.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;
}

/* Селект готовых шаблонов над редактором handlebars в 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: та же раскладка, что у IconsPane.
   top/left/width/height привязываются к области сетки из JS. */
#__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;
}
