/* crm-tip.css — the ⓘ mark and the panel it opens. See crm-tip.js.
 *
 * The panel is appended to <body>, which is outside every overlay's palette, so
 * it carries its own colours - the same lesson the Setup menu taught by
 * rendering completely transparent with its text lying over the deals.
 */

:root {
  --tip-ink: #1d1b1c;
  --tip-muted: #55606c;
  --tip-faint: #606a76;
  --tip-line: #e8ebe4;
  --tip-card: #ffffff;
  --tip-shadow: rgba(16, 24, 40, .18);
}

:root.dark,
.dark,
[data-theme="dark"] {
  --tip-ink: #e8eaed;
  --tip-muted: #98a1ad;
  --tip-faint: #78828e;
  --tip-line: #2c3138;
  --tip-card: #1b1e23;
  --tip-shadow: rgba(0, 0, 0, .45);
}

/* NOTE: the class is `fi-rr-<name>` ALONE - never with UIcons' own `fi`
   helper class. The platform's stylesheet already owns `.fi` and sets
   `content: " "` on it, which wins and paints a space where the glyph
   should be. The `[class*=fi-rr-]` rules in uicons.css are all that is
   needed. */

/* ------------------------------------------------------------------- mark */

.crm-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  font-size: 14px;
  line-height: 1;
  color: var(--tip-faint);
  cursor: help;
  vertical-align: middle;
  transition: color .12s ease;
  /* The mark is a glyph, not text in the sentence beside it: it must not take
     the weight, the letter-spacing or the italics of whatever it sits in. */
  font-weight: 400 !important;
  font-style: normal;
}

.crm-tip:hover,
.crm-tip:focus-visible {
  color: var(--tip-ink);
  outline: none;
}

.crm-tip:focus-visible {
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--tip-muted);
}

/* ------------------------------------------------------------------ panel */

.crm-tip__p {
  position: fixed;
  top: -9999px;
  left: -9999px;
  z-index: 2147483000;          /* over drawers, scrims and the platform's z-50 */
  display: none;
  width: 300px;
  max-width: calc(100vw - 20px);
  padding: 11px 13px;
  border: 1px solid var(--tip-line);
  border-radius: 8px;
  background: var(--tip-card);
  box-shadow: 0 12px 30px var(--tip-shadow);
  font-family: inherit;
  text-align: left;
  direction: ltr;
  white-space: normal;
  cursor: default;
}

.crm-tip__p[data-open] { display: block; }

.crm-tip__t {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--tip-ink);
}

.crm-tip__b {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--tip-muted);
  white-space: pre-line;   /* two explanations under one title keep their own paragraphs */
}

/* The line that stops two numbers being read as one. */
.crm-tip__f {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid var(--tip-line);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--tip-faint);
}
