/* v1.3 contextual help + Admin board right-edge polish */
.dq-help-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.dq-help-trigger {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid #aab4bc;
    border-radius: 50%;
    background: #fff;
    color: #697780;
    font: inherit;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    cursor: help;
    vertical-align: middle;
    transition: color .12s ease, border-color .12s ease, background .12s ease, box-shadow .12s ease;
}

.dq-help-trigger:hover,
.dq-help-trigger:focus-visible,
.dq-help-trigger[aria-expanded="true"] {
    border-color: #315d94;
    background: #eef4fb;
    color: #214b80;
}

.dq-help-trigger:focus-visible {
    outline: 2px solid rgba(49, 93, 148, .22);
    outline-offset: 2px;
}

.dq-context-tooltip {
    position: fixed;
    z-index: 220;
    width: min(310px, calc(100vw - 24px));
    padding: 9px 11px;
    border: 1px solid #cfd7de;
    border-radius: 7px;
    background: #1f2c35;
    color: #fff;
    box-shadow: 0 12px 32px rgba(11, 10, 11, .2);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    pointer-events: none;
}

.dq-context-tooltip[hidden] { display: none; }

/* Keep compact labels from breaking when a help trigger is added. */
.m11-kpi > span.dq-help-label,
.widget-kicker.dq-help-label {
    width: fit-content;
    max-width: 100%;
}

/* A help target can itself be a TH. Never change its table-cell display mode. */
.m11-board-table th.dq-help-label,
.m11-dashboard-table th.dq-help-label {
    display: table-cell;
}

.m11-board-table th.dq-help-label .dq-help-trigger,
.m11-dashboard-table th.dq-help-label .dq-help-trigger {
    margin-left: 4px;
}

/* The Admin board may gain additional operational columns at runtime. Reserve
   enough horizontal canvas and explicit space for the rightmost timestamp/
   action column so it never sits underneath the scroll edge. */
#board .m11-board-table-wrap {
    box-sizing: border-box;
    padding-right: 10px;
    scroll-padding-right: 18px;
    scrollbar-gutter: stable;
}

#board .m11-board-table {
    min-width: 1220px;
}

#board .m11-board-table th:last-child,
#board .m11-board-table td:last-child,
#board .m11-admin-updated-cell {
    width: 132px;
    min-width: 132px;
    padding-right: 12px;
    white-space: normal;
}

#board .m11-admin-updated-cell .m11-updated-cell,
#board .m11-board-table td:last-child .m11-updated-cell {
    display: block;
    min-width: 0;
    line-height: 1.35;
    white-space: normal;
}

@media (max-width: 760px) {
    .dq-context-tooltip {
        width: min(280px, calc(100vw - 16px));
        font-size: 10px;
    }

    #board .m11-board-table-wrap { padding-right: 8px; }
}
