/* Info buttons next to the calculator options and their help popover (option-help.js). */
.help-btn {
  /* sits in the label strip at the top-right of the field, clear of the select chevron */
  position: absolute; top: 1px; right: 1px; width: 40px; height: 24px; padding: 0;
  display: grid; place-items: center; border: none; border-radius: 0 3px 0 12px;
  background: transparent; color: var(--md-on-surface-variant); cursor: pointer;
}
.field.has-help > input:placeholder-shown:not(:focus) + span.label { max-width: calc(100% - 64px); }
.help-btn .material-symbols-outlined { font-size: 18px; }
.help-btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; transition: opacity .15s; }
.help-btn:hover::after { opacity: .08; }
.help-btn:active::after { opacity: .12; }
.help-btn[aria-expanded="true"] { color: var(--md-primary); }
.help-btn:focus-visible { outline: 2px solid var(--md-primary); outline-offset: -2px; }

.help-pop {
  position: fixed; z-index: 60; width: min(360px, calc(100vw - 16px)); max-height: min(70vh, 560px); overflow-y: auto;
  padding: 12px 16px 16px; border-radius: var(--md-shape-m);
  background: var(--md-surface-high); color: var(--md-on-surface); box-shadow: var(--md-elev-2);
  font-size: 14px; line-height: 20px; letter-spacing: .25px;
}
.help-pop.sheet {
  left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 75vh;
  border-radius: var(--md-shape-xl) var(--md-shape-xl) 0 0; padding: 8px 16px 24px; box-shadow: var(--md-elev-3);
}
.help-pop.sheet::before {
  content: ""; display: block; width: 32px; height: 4px; margin: 4px auto 8px; border-radius: 2px;
  background: var(--md-on-surface-variant); opacity: .4;
}
.help-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.help-pop-head .icon-btn { margin-right: -8px; }
.help-pop p { margin: 8px 0 0; }
.help-tag {
  display: inline-block; margin-top: 2px; padding: 2px 8px; border-radius: var(--md-shape-s);
  background: var(--md-secondary-container); color: var(--md-on-secondary-container);
}
.help-example-title { margin-top: 12px !important; color: var(--md-on-surface-variant); }
.help-example {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 6px 0 0;
  padding: 8px 12px; border-radius: var(--md-shape-s); background: var(--md-surface-container);
}
.help-example dt { color: var(--md-on-surface-variant); }
.help-example dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.help-note {
  padding-top: 8px; border-top: 1px solid var(--md-outline-variant);
  font-size: 12px; line-height: 16px; color: var(--md-on-surface-variant);
}
.report-field .supporting { min-height: 16px; }
.help-example.stacked { grid-template-columns: minmax(0, 1fr); gap: 0; }
.help-example.stacked dt { color: var(--md-on-surface); font-weight: 500; margin-top: 8px; }
.help-example.stacked dt:first-child { margin-top: 0; }
.help-example.stacked dd { color: var(--md-on-surface-variant); }
