/* One selection contract for semantic tabs and explicitly opted-in status
   selectors. The compatibility list covers existing view/mode switches, not
   category-value choosers or joined action rows. Declare this important layer
   before focus/corners so legacy page
   rules cannot restore rounded edges or draw a second selection line. */
@layer pioneer-tabs {
  :root {
    --oms-tab-line-width: 3px;
    --oms-tab-background: var(--oms-surface, #fff);
    --oms-tab-hover-background: var(--oms-action-secondary-hover, #edf5ff);
    --oms-tab-text: var(--oms-text-muted, #607086);
  }

  html body :is([role="tablist"], .oms-tabs, .wh-promotion-tabs, .analytics-segmented, .storefront-styling-device-switch, .order-scheduler-hub__switch, .route-sms-modal__switch, .customer-hub__filters, .order-hub__contact-tabs) {
    border-radius: 0 !important;
  }

  html body [role="tablist"] :is([role="tab"], button[aria-selected]),
  html body :is(.oms-tabs, .wh-promotion-tabs, .analytics-segmented, .storefront-styling-device-switch, .order-scheduler-hub__switch, .route-sms-modal__switch, .customer-hub__filters, .order-hub__contact-tabs) :is(button, a, [role="button"], [aria-disabled]) {
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--oms-tab-background) !important;
    color: var(--oms-tab-text) !important;
    box-shadow: none !important;
    text-decoration: none !important;
  }

  html body [role="tablist"] :is([role="tab"], button[aria-selected]):hover,
  html body :is(.oms-tabs, .wh-promotion-tabs, .analytics-segmented, .storefront-styling-device-switch, .order-scheduler-hub__switch, .route-sms-modal__switch, .customer-hub__filters, .order-hub__contact-tabs) :is(button, a, [role="button"], [aria-disabled]):hover {
    background: var(--oms-tab-hover-background) !important;
  }

  html body [role="tablist"] :is([role="tab"], button[aria-selected])[aria-selected="true"],
  html body :is(.oms-tabs, .wh-promotion-tabs, .analytics-segmented, .storefront-styling-device-switch, .order-scheduler-hub__switch, .route-sms-modal__switch, .customer-hub__filters, .order-hub__contact-tabs) :is(button, a, [role="button"]):is([aria-pressed="true"], [aria-selected="true"], [aria-current="page"], [aria-current="step"]) {
    background: var(--oms-selected-tab-bg, #d9edff) !important;
    color: var(--oms-selected-tab-text, #0b4f92) !important;
    box-shadow: inset 0 calc(-1 * var(--oms-tab-line-width)) var(--oms-selected-tab-line, #123b63) !important;
  }
}
