/* Load after the editor/layout/mobile styles. Keep the visible i independent
   from the surrounding accordion, full-width button and touch-target rules. */
.info-tip {
  --info-hit-size: 32px;
  --info-icon-size: 18px;
  display: inline-flex;
  flex: 0 0 var(--info-hit-size);
  align-items: center;
  justify-content: center;
  align-self: center;
  width: var(--info-hit-size);
  min-width: var(--info-hit-size);
  max-width: var(--info-hit-size);
  height: var(--info-hit-size);
  min-height: var(--info-hit-size);
  max-height: var(--info-hit-size);
  vertical-align: middle;
  line-height: 1;
}

.info-tip > button.info-trigger {
  box-sizing: border-box;
  display: inline-flex;
  position: relative;
  flex: 0 0 var(--info-hit-size);
  align-items: center;
  justify-content: center;
  align-self: center;
  width: var(--info-hit-size);
  min-width: var(--info-hit-size);
  max-width: var(--info-hit-size);
  height: var(--info-hit-size);
  min-height: var(--info-hit-size);
  max-height: var(--info-hit-size);
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted, #aebcc8);
  font: 600 13px/1 Georgia, serif;
  text-align: center;
  text-indent: 0;
  letter-spacing: normal;
  white-space: nowrap;
  touch-action: manipulation;
}

.info-tip > button.info-trigger::before {
  box-sizing: border-box;
  content: '';
  position: absolute;
  inset: auto;
  top: 50%;
  left: 50%;
  width: var(--info-icon-size);
  height: var(--info-icon-size);
  transform: translate(-50%, -50%);
  border: 1px solid currentColor;
  border-radius: 50%;
  pointer-events: none;
}

.info-tip > button.info-trigger:hover,
.info-tip > button.info-trigger[aria-expanded="true"] {
  color: var(--cyan, #19d0df);
  background: #19d0df12;
}

.info-tip > button.info-trigger:focus-visible {
  outline: 2px solid var(--cyan, #19d0df);
  outline-offset: 0;
}

/* Existing text placeholders sit between the row and the disclosure itself. */
.config-heading > [data-info],
.config-heading > #color-note,
.hint-label > [data-info],
.hint-label > #price-note,
.config-note > #zone-summary,
.up-help {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  align-self: center;
  min-width: max-content;
  line-height: 1;
}

.info-tip > .info-popover {
  box-sizing: border-box;
  width: min(280px, calc(100vw - 24px));
  min-width: 0;
  min-height: 0;
  height: auto;
  max-height: calc(100dvh - 24px);
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
  color: var(--text, #e3edf1);
  font: 400 12px/1.6 Arial, Helvetica, sans-serif;
  text-align: left;
  white-space: normal;
  letter-spacing: normal;
  touch-action: pan-y;
}

.info-tip > .info-popover[hidden] { display: none !important; }
.info-tip > .info-popover:focus-visible { outline: 2px solid var(--cyan, #19d0df); outline-offset: 2px; }

@media (max-width: 700px) {
  .info-tip { --info-hit-size: 40px; }
}
@media (pointer: coarse) {
  .info-tip { --info-hit-size: 40px; }
}
