/* pa-seg.css · the choice controls in a card head (30 Nov 2026, Mikky: "this is not our filter style"). Screen only.
   3+ choices: the house quiet text trigger (kit/hd.css .qh .msel.sel: 12px medium, no box, 10px chevron) on ui.js's compact menu,
   rows in the Filters panel's look (.flp: lilac tint plus tick). 2 short choices: the borderless seg (.vh-rs), at the 24px size.
   The wrapper keeps .ovc-tog .pa-seg, so the print sheets still drop it. */
body:not(.rp-body) .ovc-tog:is(.pa-seg--m, .pa-seg--2) { height: 28px; padding: 0; border: 0; border-radius: 0; background: none; overflow: visible; flex: none; min-width: 0; max-width: 100%; }
body:not(.rp-body) .pa-segs { flex-wrap: nowrap; align-items: center; gap: var(--space-1); min-width: 0; }
body:not(.rp-body) .pa-card .ovc-r:has(.pa-seg) { gap: var(--space-1); min-height: 28px; margin-top: -3px; }
body:not(.rp-body) .pa-segs:has(.pa-seg--2 + .pa-seg--2) { gap: var(--space-3); }

/* The trigger */
body:not(.rp-body) .pa-seg--m .msel.sel { min-height: 0; height: 28px; min-width: 0; max-width: 100%; padding: 0 20px 0 var(--space-2); margin: 0; border: 0; border-radius: var(--radius-sm); background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 6px center / 10px; font-size: var(--font-size-12); font-weight: var(--font-weight-medium); color: var(--color-text-secondary); white-space: nowrap; }
body:not(.rp-body) .pa-seg--m .msel.sel[aria-expanded="true"] { background-color: var(--color-bg-surface); color: var(--color-text-primary); }
body:not(.rp-body) .pa-seg--m .msel__t { display: block; line-height: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The two-way */
body:not(.rp-body) .pa-seg--2 { display: inline-flex; align-items: center; gap: 2px; }
body:not(.rp-body) .pa-seg--2 button { flex: none; height: 24px; min-width: 24px; padding: 0 var(--space-2); border: 0; border-radius: 6px; background: none; font-size: var(--font-size-12); font-weight: var(--font-weight-regular); line-height: 1; color: var(--color-text-secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }
body:not(.rp-body) .pa-seg--2 button[aria-pressed="true"] { background: var(--color-bg-surface); color: var(--color-text-primary); font-weight: var(--font-weight-medium); }
body:not(.rp-body) .pa-seg--2 button[aria-disabled="true"] { color: var(--color-text-disabled); }
body:not(.rp-body) .pa-seg :is(.msel, button):focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color) !important; outline-offset: 0 !important; }
@media (hover: hover) and (pointer: fine) {
  body:not(.rp-body) .pa-seg--m .msel.sel:hover { background-color: var(--color-bg-surface); color: var(--color-text-primary); }
  body:not(.rp-body) .pa-seg--2 button[aria-pressed="false"]:not([aria-disabled="true"]):hover { color: var(--color-text-primary); }
}

/* Right edge: the chevron (or the arrow after it) ends on the content edge */
body:not(.rp-body) .pa-card .ovc-r > .pa-seg--m:last-child, body:not(.rp-body) .pa-card .ovc-r > .pa-segs:last-child:has(> .pa-seg--m:last-child) { margin-right: -5px; }
body:not(.rp-body) .pa-card .ovc-r:has(.pa-seg) > .ovc-go { margin-block: 0; }

/* The menu (data-search="paseg" marks its rows, so no other compact menu changes) */
.mnu:has(.mnu__i[data-k$=" paseg"]) { min-width: 136px !important; padding: 6px; }
.mnu .mnu__i[data-k$=" paseg"] { height: 30px; gap: 6px; border-radius: var(--radius-xs); font-size: var(--font-size-12); color: var(--color-text-primary); white-space: nowrap; }
.mnu .mnu__i[data-k$=" paseg"] + .mnu__i { margin-top: 1px; }
.mnu .mnu__i[data-k$=" paseg"] .mnu__c { order: 9; }
.mnu .mnu__i[data-k$=" paseg"] .mnu__c svg { stroke: currentColor; }
.mnu .mnu__i[data-k$=" paseg"][aria-selected="true"], .mnu .mnu__i[data-k$=" paseg"][aria-selected="true"]:is(:hover, :focus) { background: var(--color-bg-brand); color: var(--color-text-accent); }
.mnu .mnu__i[data-k$=" paseg"][aria-selected="true"] .mnu__t { font-weight: var(--font-weight-semibold); }
.mnu .mnu__i[data-k$=" paseg"][aria-disabled="true"] { display: grid; grid-template-columns: 1fr; align-content: center; gap: 0; height: 40px; color: var(--color-text-tertiary); cursor: default; }
.mnu .mnu__i[data-k$=" paseg"][aria-disabled="true"] .mnu__c { display: none; }
.mnu .mnu__i[data-k$=" paseg"] .mnu__cnt { margin: 0; font-size: var(--font-size-11); line-height: 14px; }

/* Phone: the controls take their own line under the title, 44px to touch, level with the title text */
@container page (max-width: 560px) {
  body:not(.rp-body) .pa-card .ovc-r:has(.pa-seg) { margin: 0; }
  body:not(.rp-body) .pa-card .ovc-r:has(.pa-seg) .pa-segs { justify-content: flex-start; max-width: 100%; }
  body:not(.rp-body) .pa-card .ovc-r:has(.pa-seg) > :is(.pa-segs, .pa-seg) { margin-left: -8px; }
  body:not(.rp-body) .pa-card .ovc-r:has(.pa-seg) > :is(.pa-seg--m, .pa-segs:has(> .pa-seg--m:first-child)) { margin-left: -16px; }
  body:not(.rp-body) .pa-seg--2 button { height: 28px; min-width: 32px; }
  body:not(.rp-body) .pa-seg :is(.msel.sel, button) { position: relative; }
  body:not(.rp-body) .pa-seg :is(.msel.sel, button)::after { content: ""; position: absolute; inset: -8px 0; }
}
@media (max-width: 560px) {
  .mnu .mnu__i[data-k$=" paseg"], .mnu .mnu__i[data-k$=" paseg"][aria-disabled="true"] { height: 44px; font-size: var(--font-size-13); }
}

/* 30 Nov, Mikky: "it's not obvious this is a filter yet": the same white box and line as Filters and the period, at 28px */
body:not(.rp-body) .pa-seg--m .msel.sel { border: 1px solid var(--color-border-default); background-color: var(--color-bg-canvas); color: var(--color-text-primary); padding: 0 24px 0 10px; background-position: right 8px center; }
body:not(.rp-body) .pa-seg--m .msel.sel[aria-expanded="true"] { background-color: var(--color-bg-surface); border-color: var(--color-border-strong); }
@media (hover: hover) and (pointer: fine) { body:not(.rp-body) .pa-seg--m .msel.sel:hover { background-color: var(--color-bg-surface); border-color: var(--color-border-strong); } }
body:not(.rp-body) .pa-segs, body:not(.rp-body) .pa-card .ovc-r:has(.pa-seg) { gap: var(--space-2); }
body:not(.rp-body) .pa-card .ovc-r > .pa-seg--m:last-child, body:not(.rp-body) .pa-card .ovc-r > .pa-segs:last-child:has(> .pa-seg--m:last-child) { margin-right: 0; }
/* the two-way gets the same line, so it reads as a switch */
body:not(.rp-body) .ovc-tog.pa-seg--2 { padding: 1px; border: 1px solid var(--color-border-default); border-radius: var(--radius-sm); background: var(--color-bg-canvas); }
@container page (max-width: 560px) { body:not(.rp-body) .pa-card .ovc-r:has(.pa-seg) > :is(.pa-segs, .pa-seg, .pa-seg--m, .pa-segs:has(> .pa-seg--m:first-child)) { margin-left: 0; } }
