/* Highlight overlay for flagged elements.
   Uses outline (not border) so no layout shift.
   Sets position:relative on marked elements when static; JS restores on removal. */

.g3-mark-root {
    outline-offset: 2px;
    outline-style: solid;
    outline-width: 3px;
}
.g3-mark-root.g3-mark--critical { outline-color: rgba(220, 20, 50, 0.95); }
.g3-mark-root.g3-mark--serious  { outline-color: rgba(220, 120, 20, 0.95); }
.g3-mark-root.g3-mark--moderate { outline-color: rgba(200, 170, 20, 0.95); }
.g3-mark-root.g3-mark--minor    { outline-color: rgba(100, 130, 150, 0.95); }

.g3-mark-badge {
    position: absolute;
    top: -16px;
    left: 0;
    z-index: 99998;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.3;
    color: #fff;
    border-radius: 3px;
    pointer-events: auto;
    cursor: help;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.02em;
}
.g3-mark-badge.g3-mark--critical { background: rgba(220, 20, 50, 0.95); }
.g3-mark-badge.g3-mark--serious  { background: rgba(220, 120, 20, 0.95); }
.g3-mark-badge.g3-mark--moderate { background: rgba(200, 170, 20, 0.95); color: #1a1a1a; }
.g3-mark-badge.g3-mark--minor    { background: rgba(100, 130, 150, 0.95); }

/* Admin bar pill states for the highlight toggle */
#wpadminbar .g3-hl-pill[data-state="idle"]    { background: #444; }
#wpadminbar .g3-hl-pill[data-state="running"] { background: #1976d2; }
#wpadminbar .g3-hl-pill[data-state="on"]      { background: #2e7d32; }
#wpadminbar .g3-hl-pill[data-state="fail"]    { background: #c62828; }

#wpadminbar #wp-admin-bar-g3-access-highlight.g3-hl-active > a {
    box-shadow: inset 0 0 0 2px rgba(46, 125, 50, 0.5);
}
