/* components/tooltip.css — THE TOOLTIP COMPONENT (operator 2026-09-17): the
   site's one info circle (.component-tooltip-icon, the admin-chosen icon_info
   image, 14px everywhere) and the one tooltip box. Light twins in themes.css. */

.component-tooltip {
  width: 16px;
  height: 16px;
  margin-left: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  position: relative;
}

.component-tooltip-icon {
  width: 14px;
  height: 14px;
  background-color: #888;
  -webkit-mask-image: var(--ui-icon-info);
  mask-image: var(--ui-icon-info);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.component-tooltip:hover .component-tooltip-icon {
  background-color: #fff;
}

/* ============================================================
   TOOLTIP SYSTEM — central (operator 2026-07-12)
   The custom tooltip design, one home for the whole site (2026-09-17: this file) so the
   whole site shares it. Any element carrying a data-tooltip
   attribute shows the box on hover — no more browser-default
   tooltips. The box is ONE shared element on the page body
   (built by TooltipComponent in tooltip.js), so it
   can never collide with a component's own pseudo-elements or be
   clipped by overflow (the ::after attempt broke the menu buttons'
   badge watermark — never render tooltips through a pseudo).
   Reveal waits 700ms by default (the familiar title-attribute
   feel); the info circle reveals instantly (decided in
   the JS). Anchored under the hovered element so it never flies
   away; width is a MAXIMUM — thin tooltips hug their text.
   ============================================================ */
.tooltip-class-1 {
  display: none;
  position: fixed;
  width: max-content;
  max-width: 320px;
  background: #000;
  border: 1px solid #777;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  font-style: normal;
  font-weight: normal;
  text-align: left;
  color: #fff;
  white-space: pre-line;
  line-height: 1.4;
  z-index: var(--layer-dialog, 86);
  pointer-events: none;
}

/* Long-text tooltips widen to panel width (full width on phones) so they
   never become taller than a phone viewport; short tooltips keep 320px. */
.tooltip-class-1--wide {
  max-width: min(500px, calc(100vw - 20px));
}

/* Prominent answer line inside the shared tooltip box — filled from the
   trigger's data-tooltip-answer attribute (color inherits from the box in
   both themes). */
.tooltip-class-1-answer {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
}

/* THE LIST FACES (operator 2026-09-17): the Verdict's title + list and the
   Calculation's plain title + label/value pairs, moved verbatim from the
   editor family's popover (posteditor.css .postmanager-popover-*), now the
   one box's own. */
.tooltip-class-1-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 8px;
  white-space: normal;
}

/* The title's red dot (operator 2026-09-10) sits LEFT of the word and
   wears the Post Studio CELL dot exactly (poststudio.css: 8px circle,
   currentColor fill, size-zeroed glyph, strong red-600 in both themes -
   light twin in themes.css). */
.tooltip-class-1-title .fieldset-label-required {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  font-size: 0;
  margin: 0 6px 0 0;
  vertical-align: middle;
  color: var(--red-600);
}

/* Plain title (a name, not a verdict): the Calculation's row name. */
.tooltip-class-1-title--plain {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}

.tooltip-class-1-list > * {
  margin-bottom: 10px;
}

.tooltip-class-1-list > *:last-child {
  margin-bottom: 0;
}

.tooltip-class-1-item {
  min-width: 200px;
  font-size: 13px;
  line-height: 1.25;
  /* One-line names (operator 2026-09-10): the studio ledger's own cut;
     the box's max-width bounds the line. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tooltip-class-1-item-value {
  float: right;
  /* A clear column gap between the longest label and the values
     (operator 2026-09-17: at 10px the two columns touched). */
  margin-left: 30px;
}

/* A pair row's note (the Ends date beside Duration, operator 2026-09-17):
   the secondary token, so it reads as information beside the row's name. */
.tooltip-class-1-item-note {
  margin-left: 10px;
  color: var(--text-secondary);
}

/* Hint line (operator 2026-09-10): guidance inside a verdict, not a post
   name — italic and dimmer, the text at half strength. */
.tooltip-class-1-item--hint {
  font-style: italic;
  opacity: 0.5;
}

/* THE IMAGE FACE (the Post Studio thumbnail preview, 2026-09-15, now the
   one box's own): the minithumb at its natural 100px, no padding. */
.tooltip-class-1--image {
  padding: 0;
  line-height: 0;
}
.tooltip-class-1-image {
  display: block;
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 7px;
}
