.onecup-preview-tabs>.onecup-preview-actions { margin-left:auto; flex-shrink:0; }
.onecup-preview-actions>.onecup-preview-open-record { display:inline-flex; align-items:center; gap:5px; }
.onecup-preview-actions>.dropdown-menu { min-width:205px; }
.onecup-preview-actions>.dropdown-menu>li>a { display:flex; align-items:center; gap:8px; white-space:nowrap; }
.onecup-preview-actions>.dropdown-menu>li>a>:is(i,svg) { flex:0 0 14px; width:14px; height:14px; }
.onecup-preview-actions-error { position:absolute; right:0; top:100%; background:#fff; min-width:205px; z-index:1; }
#onecup-preview-delete .btn-red { display:inline-flex; align-items:center; gap:5px; }

/* Keep record actions aligned with the tabs and let the menu extend over the feed. */
html body .onecup-entity-preview > .task-wrapper > .onecup-preview-tabs:has(> .onecup-preview-actions) {
  overflow:visible; flex-wrap:nowrap; align-items:center;
}
html body .onecup-preview-tabs:has(> .onecup-preview-actions) > .btn-wrapper {
  overflow-x:auto; overflow-y:hidden; scrollbar-width:none;
}
html body .onecup-preview-tabs > .onecup-preview-actions {
  position:relative; padding:0; border:0; align-self:center; margin-left:auto;
}
html body .onecup-preview-tabs > .onecup-preview-actions > .onecup-preview-open-record {
  display:inline-flex; flex-flow:row nowrap; align-items:center; justify-content:center;
  gap:5px; white-space:nowrap;
}
html body .onecup-preview-actions > .onecup-preview-open-record > .caret {
  display:inline-block!important; flex:0 0 auto; width:0!important; height:0!important;
  margin:0!important; padding:0!important; border-top:4px solid currentColor!important;
  border-right:4px solid transparent!important; border-left:4px solid transparent!important;
  border-bottom:0!important;
}

/* Record menus sit above every panel, including the linked-communications toolbar. */
html body .onecup-entity-preview > .task-wrapper > .onecup-preview-tabs {
  position:relative; z-index:2; overflow:visible;
}
html body .onecup-entity-preview > .task-wrapper > .side-option-body {
  position:relative; z-index:0; isolation:isolate;
}
html body .onecup-preview-tabs > .btn-wrapper > .btn-group[hidden] {
  display:none!important;
}

/* Shared preview tabs, filters and actions keep the same clickable affordance. */
html body :is(.onecup-preview-tabs, .onecup-preview-section-menu) .btn-select:not(:disabled):not(.disabled):not([aria-disabled="true"]),
html body .onecup-preview-actions > .dropdown-menu > li:not(.disabled) > a:not([aria-disabled="true"]) {
  cursor: pointer;
}

/* Native caret and monochrome Help icon, including detached mobile menus. */
html body .onecup-preview-actions .dropdown-toggle .caret{display:inline-block!important;flex:0 0 auto;width:0;height:0;margin-left:5px;vertical-align:middle;border-top:4px solid currentColor;border-right:4px solid transparent;border-left:4px solid transparent;border-bottom:0}
html body .dropdown-menu .onecup-help-question[data-onecup-help-icon]{display:inline-block;width:16px;height:16px;flex:0 0 16px;vertical-align:middle;margin-right:0;color:#4b4f56!important}
