/* Clickable explanation behind a form field, and the documentation button next to a page title.
   Both are driven by data the server already sends: the field hint and the page's doc key. */

.s-field-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    margin-inline-start: 4px;
    padding: 0;
    border: 1px solid var(--s-border-color, #c8ced3);
    border-radius: 50%;
    background: transparent;
    color: var(--s-text-muted-color, #6c757d);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
}

.s-field-help:hover,
.s-field-help:focus-visible {
    border-color: var(--s-primary-color, #0d6efd);
    background: var(--s-primary-color, #0d6efd);
    color: #fff;
    outline: none;
}

.s-field-help[aria-expanded="true"] {
    border-color: var(--s-primary-color, #0d6efd);
    background: var(--s-primary-color, #0d6efd);
    color: #fff;
}

.s-field-help-popover {
    position: absolute;
    z-index: 100000;
    max-width: 320px;
    padding: 8px 10px;
    border: 1px solid var(--s-border-color, #c8ced3);
    border-radius: 4px;
    background: var(--s-panel-bg, #fff);
    color: var(--s-text-color, #23282c);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    white-space: normal;
}

.s-field-help-popover[hidden] {
    display: none;
}

.s-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-inline-start: 10px;
    padding: 2px 9px;
    border: 1px solid var(--s-border-color, #c8ced3);
    border-radius: 4px;
    background: transparent;
    color: var(--s-text-muted-color, #6c757d);
    font-size: 12px;
    font-weight: 400;
    text-decoration: none;
    vertical-align: middle;
}

.s-doc-link:hover,
.s-doc-link:focus-visible {
    border-color: var(--s-primary-color, #0d6efd);
    color: var(--s-primary-color, #0d6efd);
    text-decoration: none;
    outline: none;
}

.grid-title .s-doc-link {
    align-self: center;
}
