/* Info tooltip: click-to-reveal explanation icon next to a form field label.
   Markup: templates/includes/_info_tooltip.html. Behavior: static/js/info-tooltip.js. */

.info-tooltip {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    /* Site-wide field labels are `uppercase` (Tailwind class) and this
       component is nested inside them — text-transform is inherited, so
       reset it here rather than relying on callers to override it. */
    text-transform: none;
}

.info-tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    font-size: 11px;
    line-height: 1;
    transition: color 0.15s;
}

.info-tooltip-trigger:hover,
.info-tooltip-trigger[aria-expanded="true"] {
    color: #2A6FDB;
}

/* Rendered as a normal block-level element (info-tooltip.js moves it out of
   the <label> to be the label's next sibling) so opening it pushes the
   field's control down the page instead of floating over — and
   overlapping — it. */
.info-tooltip-popover {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 6px 0 2px;
    background: #111111;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 500;
    text-transform: none;
    padding: 8px 12px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.info-tooltip-popover[hidden] {
    display: none;
}
