/* Scoped compact annotation presentation; original panel and circle CSS stays authoritative. */
.hpo-compact-table td {vertical-align:middle!important;padding:7px 5px!important;}
.hpo-compact-table .hpo-compact-id {white-space:nowrap;width:1%;}
.hpo-status-dot {display:inline-block!important;width:9px;height:9px;border-radius:50%;margin-right:7px;vertical-align:middle;background:#d49a00;flex-shrink:0;}
.hpo-status-dot.observed {background:#dc3545;}
.hpo-status-dot.notobserved {background:#2879c7;}
.hpo-status-dot.review {background:#d49a00;}
.hpo-status-dot:before {content:none!important;}
.hpo-compact-table .hpo-compact-tools {width:60px;}
.hpo-kebab {display:inline-flex!important;align-items:center;justify-content:center;border:0!important;background:transparent!important;color:#424b55!important;padding:2px!important;width:28px!important;height:28px!important;min-width:0!important;margin:0!important;border-radius:3px!important;}
.hpo-kebab svg {width:20px;height:20px;fill:currentColor;}
.hpo-review-menu {position:fixed;z-index:1080;width:260px;max-height:70vh;overflow:auto;box-sizing:border-box;background:white;color:#222;border:1px solid #ccc;border-radius:4px;padding:5px;box-shadow:0 3px 12px #0003;font-size:14px;text-align:left;}
.hpo-review-menu[hidden],.hpo-evidence-details[hidden] {display:none!important;}
.hpo-review-menu button {display:block!important;width:100%!important;text-align:left!important;padding:7px 9px!important;margin:0!important;border:0!important;background:white!important;color:#222!important;border-radius:2px!important;font-size:14px!important;}
.hpo-review-menu button:hover,.hpo-review-menu button:focus {background:#e8edf4!important;}
.hpo-review-menu button[aria-checked=true] {font-weight:bold;}
.hpo-evidence-details {padding:5px 9px;border-top:1px solid #ddd;overflow-wrap:anywhere;white-space:normal;}
.hpo-evidence-details p {font-size:12px!important;margin:5px 0!important;}
.hpo-status-legend {font-size:12px;display:flex;gap:12px;flex-wrap:wrap;padding:6px 0;line-height:1.5;}
.hpo-status-legend>span {white-space:nowrap;}
.hpo-destination-note {flex-basis:100%;font-size:12px;}
.hpo-linked-evidence span.observed {border-bottom:2px solid #dc3545!important;background:transparent!important;}
.hpo-linked-evidence span.notobserved {border-bottom:2px solid #2879c7!important;background:transparent!important;}
.hpo-linked-evidence span.hpo-needs-review {border-bottom:2px solid #d49a00!important;background:transparent!important;}
.hpo-linked-evidence span.chosen {background:#fff1b5!important;outline:1px solid #a36d00;}
.hpo-compact-table tr:focus,.hpo-kebab:focus {outline:2px solid #376aa1;outline-offset:-2px;}
.hpo-compact-table {height:auto!important;table-layout:auto!important;}
.hpo-compact-table .selection {width:32px!important;}
.hpo-compact-table .hpo_name {width:auto!important;overflow-wrap:anywhere;}

.hpo-compact-pane {overflow-y:auto;}

/* Annotation modal uses Bootstrap's existing 1040/1050 layers, not a higher z-index. */
body.hpo-annotation-open > .hpo-modal-background {isolation:isolate!important;z-index:0!important;pointer-events:none!important;}
#text-input-modal,.hpo-linked-evidence,.hpo-compact-pane,.hpo-review-menu {overscroll-behavior:contain;}

/* A fixed-width visual cue; no timer or repeated accessible announcements. */
.hpo-ai-busy-dots {display:inline-block;width:3em;white-space:nowrap;vertical-align:baseline;}
.hpo-ai-busy-dots[hidden] {display:none!important;}
.hpo-ai-busy-dots>span {display:inline-block;width:1em;animation:hpo-ai-dot 1.2s infinite;}
.hpo-ai-busy-dots>span:nth-child(2) {animation-delay:.2s;}
.hpo-ai-busy-dots>span:nth-child(3) {animation-delay:.4s;}
@keyframes hpo-ai-dot {0%,70%,100% {opacity:.25;}35% {opacity:1;}}
@media (prefers-reduced-motion:reduce) {.hpo-ai-busy-dots>span {animation:none;opacity:1;}}

/* Keep mouse focus quiet; keyboard focus remains clearly visible. */
.hpo-ai-controls .hpo-ai-about {margin-top:8px;}
.hpo-ai-controls :is(.hpo-ai-mode-standard,.hpo-ai-mode-assisted):focus:not(:focus-visible) {
  outline:none!important;
  box-shadow:none!important;
}
.hpo-ai-controls :is(.hpo-ai-mode-standard,.hpo-ai-mode-assisted):focus-visible {
  outline:2px solid #174b77!important;
  outline-offset:2px!important;
  box-shadow:none!important;
}

/* Slightly tighten title/privacy spacing and separate the two mode buttons. */
#text-input-modal .modal-content > .modal-header + p,
#text-input-container > .text-input-header + p {margin-top:4px!important;}
.hpo-ai-controls [role="group"] {gap:6px!important;}

/* Remove header-container padding responsible for the large title/subtitle gap. */
#text-input-modal .modal-content > .modal-header {padding-bottom:0;}
#text-input-modal .modal-content > .modal-header .modal-title {margin-bottom:0;}
#text-input-container > .text-input-header {margin-bottom:0;}
#text-input-container > .text-input-header h5 {margin-bottom:0;}
/* Wrapping selection/status popups; only vertical scrolling. */
.hpo-manual-popup {position:fixed;z-index:1080;box-sizing:border-box;background:#fff;border:1px solid #d5dce3;border-radius:7px;box-shadow:0 4px 16px #0002;padding:4px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;}
.hpo-manual-popup[hidden] {display:none!important;}
.hpo-manual-popup .hpo-manual-option {display:flex!important;align-items:center;gap:8px;width:100%;min-width:0;box-sizing:border-box;min-height:31px; height:auto;flex-wrap:wrap;padding:4px 8px!important;margin:0!important;border:0!important;border-radius:3px;background:#fff;color:#253649;font-size:13px;text-align:left;white-space:normal;overflow-wrap:anywhere;}
.hpo-manual-option.hpo-menu-active {background:#edf3f8!important;}
.hpo-manual-option:focus-visible {outline:2px solid #376aa1;outline-offset:-2px;}
.hpo-manual-id {flex:0 0 auto;max-width:100%;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;}
.hpo-manual-label {flex:1 1 150px;min-width:0;white-space:normal;overflow-wrap:anywhere;}
.hpo-manual-message {display:block;overflow-wrap:anywhere;padding:6px 8px;font-size:13px;}
.hpo-compact-tools {white-space:nowrap;}
.hpo-trash {display:inline-flex!important;align-items:center;justify-content:center;width:26px!important;height:28px!important;margin:0!important;padding:3px!important;border:0!important;border-radius:3px;background:transparent!important;color:#64748b!important;vertical-align:middle;}
.hpo-trash svg {width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;}
.hpo-trash:hover {color:#b42318!important;background:#fff1f0!important;}
.hpo-trash:focus-visible {outline:2px solid #376aa1;}
.hpo-trash:disabled {opacity:.4;}

.hpo-remove-menu {overflow-x:hidden!important;overflow-y:auto!important;}
.hpo-remove-menu button {box-sizing:border-box;min-width:0!important;max-width:100%;white-space:normal!important;overflow-wrap:anywhere;}

/* Two rows, sized to their labels; never a scrollbox. */
.hpo-status-popup {z-index:1081;width:max-content;min-width:0;height:auto;max-height:none;overflow:visible;}
.hpo-status-popup .hpo-manual-option {width:100%;min-height:30px;flex-wrap:nowrap;white-space:nowrap;}
.hpo-remove-menu button:hover,.hpo-remove-menu button:focus {background:white!important;}
.hpo-remove-menu button.hpo-menu-active {background:#edf3f8!important;}
.hpo-remove-menu button:focus-visible {outline:2px solid #376aa1;outline-offset:-2px;}

/* Place actions alongside the instructions, rather than a separate lower row. */
.hpo-legend-colors {display:flex;gap:12px;flex-wrap:wrap;}
.hpo-legend-colors>span {white-space:nowrap;}
#text-input-modal .hpo-review-footer {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 16px;padding:6px 16px 12px;align-items:start;}
#text-input-modal .hpo-review-footer>.hpo-status-legend {display:contents;}
#text-input-modal .hpo-review-footer .hpo-legend-colors {grid-column:1 / -1;font-size:12px;line-height:1.5;}
#text-input-modal .hpo-review-footer .hpo-destination-note {grid-column:1;grid-row:2;line-height:1.5;min-width:0;}
#text-input-modal .modal-dialog .modal-content .hpo-review-footer>.modal-footer {grid-column:2;grid-row:2;min-width:0;margin:0;padding:0;border:0;align-items:flex-start;flex-wrap:wrap;gap:8px;}
#text-input-modal .hpo-review-footer>.modal-footer>button {margin:0;}
@media(max-width:760px) {
 #text-input-modal .hpo-review-footer {grid-template-columns:minmax(0,1fr);}
 #text-input-modal .modal-dialog .modal-content .hpo-review-footer>.modal-footer {grid-column:1;grid-row:3;}
}

/* The table uses weight 300: relative `bolder` only becomes 400 there. */
.hpo-remove-menu button {font-weight:400!important;}
.hpo-remove-menu button>.hpo-remove-target {font-weight:700!important;}
