/* P009: Microsoft Fluent 2 on the server page (loaded after hp.css). Fluent web components supply the toolbar and
   edit-bar buttons, the switches and the status badges. Controls that stay native this pass (Back up now, dialog
   buttons, row links, the guest editor's inputs, the filters and page tabs, the side menu) take Fluent's look from its
   tokens, so the page reads as one family. Sizes are Fluent's (14 px body, 32 px controls). The P008 layout and pixel
   rules in hp.css stay in force. */

/* Native buttons in Fluent's button look. */
.hp .hbtn, dialog.hv .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; min-width: 96px; padding: 0 12px;
  border-radius: var(--borderRadiusMedium); border: var(--strokeWidthThin) solid var(--colorNeutralStroke1);
  background: var(--colorNeutralBackground1); color: var(--colorNeutralForeground1); box-shadow: none; cursor: pointer;
  font: var(--fontWeightSemibold) var(--fontSizeBase300)/var(--lineHeightBase300) var(--fontFamilyBase);
}
.hp .hbtn:hover, dialog.hv .btn:hover { background: var(--colorNeutralBackground1Hover); border-color: var(--colorNeutralStroke1Hover); color: var(--colorNeutralForeground1Hover); }
.hp button.primary.hbtn, dialog.hv .btn.primary { background: var(--colorBrandBackground); border-color: transparent; color: var(--colorNeutralForegroundOnBrand); }
.hp button.primary.hbtn:hover, dialog.hv .btn.primary:hover { background: var(--colorBrandBackgroundHover); border-color: transparent; color: var(--colorNeutralForegroundOnBrand); }
.hp .hbtn:focus-visible, dialog.hv .btn:focus-visible { outline: 2px solid var(--colorStrokeFocus2); outline-offset: 1px; }
.hp .hbtn .ico { width: 16px; height: 16px; }
.hp .hbtn:disabled, .hp .hbtn.sec:disabled, .hp button.primary:disabled, dialog.hv .btn:disabled {
  background: var(--colorNeutralBackgroundDisabled); border-color: var(--colorNeutralStrokeDisabled); color: var(--colorNeutralForegroundDisabled); cursor: not-allowed; }
.hp button.primary:disabled .ico, .hp button.primary:disabled svg { color: var(--colorNeutralForegroundDisabled); }
.hp fluent-button .ico { width: 16px; height: 16px; display: block; }
.hp .vmbar fluent-button, .hp .editbar fluent-button { flex: none; }
.hp .ged .btns fluent-button { white-space: nowrap; }

/* Filters: Fluent's subtle tabs (text with an underline marker), not a grey segmented box. */
.hp .seg { background: none; padding: 0; gap: 2px; height: 32px; border-radius: 0; }
.hp .seg .chip, .hp .seg .chip.on, .hp .seg .chip:hover {
  position: relative; height: 32px; padding: 0 10px; border-radius: var(--borderRadiusMedium); background: none; box-shadow: none;
  font: var(--fontWeightRegular) var(--fontSizeBase300)/var(--lineHeightBase300) var(--fontFamilyBase); color: var(--colorNeutralForeground2); }
.hp .seg .chip:hover { background: var(--colorSubtleBackgroundHover); color: var(--colorNeutralForeground2Hover); }
.hp .seg .chip.on { color: var(--colorNeutralForeground1); font-weight: var(--fontWeightSemibold); }
.hp .seg .chip.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: var(--borderRadiusCircular); background: var(--colorCompoundBrandStroke); }
.hp .seg .chip .cnt { color: var(--colorNeutralForeground3); font-weight: var(--fontWeightRegular); }
.hp .seg .chip:disabled { color: var(--colorNeutralForegroundDisabled); background: none; cursor: not-allowed; }
.hp .seg .chip.on:disabled::after { background: var(--colorNeutralStrokeDisabled); }
:root .hp .seg .chip.on, :root[data-theme="dark"] .hp .seg .chip.on { background: none; box-shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hp .seg .chip.on { background: none; box-shadow: none; } }

/* Page tabs: Fluent's tab look (3 px rounded marker under the selected tab, semibold label). Tabs and filters sit
   10 px out so their labels line up with the page's text edge and the hover box hangs outside it, as in Fluent. */
.hp .tabs { gap: 4px; }
.hp .tabs a:first-child { margin-left: -10px; }   /* the label on the text edge; the tabs' hairline still starts at the card edge */
.hp .tabs a { position: relative; height: 44px; padding: 0 10px; border-bottom: none; margin-bottom: 0; color: var(--colorNeutralForeground2); }
.hp .tabs a:hover { color: var(--colorNeutralForeground2Hover); text-decoration: none; }
.hp .tabs a.on { color: var(--colorNeutralForeground1); font-weight: var(--fontWeightSemibold); }
.hp .tabs a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: var(--borderRadiusCircular); background: var(--colorCompoundBrandStroke); }
.hp .tabs a .n { height: 16px; min-width: 16px; padding: 0 4px; font-size: var(--fontSizeBase100); line-height: 16px; border-radius: var(--borderRadiusCircular); background: var(--colorBrandBackground2); color: var(--colorBrandForeground2); }
.hp .tabs a:not(.on) .n { background: var(--colorNeutralBackground3); color: var(--colorNeutralForeground3); }
.hp #toolbar { margin-left: -10px; }

/* Side menu: Fluent's navigation (neutral highlight and a brand marker on the selected item). */
.side nav a, .side > a:not(.brand) { position: relative; color: var(--colorNeutralForeground2); font-weight: var(--fontWeightRegular); }
.side nav a:hover, .side > a:not(.brand):hover { background: var(--colorNeutralBackground1Hover); color: var(--colorNeutralForeground2Hover); text-decoration: none; }
.side nav a.on, .side nav a.on:hover { background: var(--colorNeutralBackground1Selected); color: var(--colorNeutralForeground1); font-weight: var(--fontWeightSemibold); }
.side nav a.on::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: var(--borderRadiusCircular); background: var(--colorCompoundBrandStroke); }
.side nav a .ico, .side nav a > svg { color: inherit; }
.side .brand svg { color: var(--colorBrandForeground1); }

/* Status badges (Fluent) in the table and header; tags keep their own box (they can be long and must ellipsize). */
.hp fluent-badge.sbadge { flex: none; }
.hp table.vms .tag { border: var(--strokeWidthThin) solid transparent; border-radius: var(--borderRadiusMedium); font-weight: var(--fontWeightSemibold); }
.hp table.vms .tag.warn { background: var(--colorStatusWarningBackground1); color: var(--colorStatusWarningForeground1); border-color: var(--colorStatusWarningBorder1); }
.hp table.vms .tag.bad { background: var(--colorStatusDangerBackground1); color: var(--colorStatusDangerForeground1); border-color: var(--colorStatusDangerBorder1); }
.hp table.vms fluent-switch { flex: none; }
.hp .vmcard.editing table.vms .statecell .swword, .hp .vmcard.editing table.vms .vercell .swword { color: var(--colorNeutralForeground1); }

/* Row links (Replace…, Set…, Resume…, Withdraw) in Fluent's link colour. */
.hp table.vms button.lb { color: var(--colorBrandForegroundLink); background: none; border: none; padding: 0; cursor: pointer; }
.hp table.vms button.lb:hover { color: var(--colorBrandForegroundLinkHover); text-decoration: underline; }

/* Guest editor inputs: Fluent's text input (hairline box, darker bottom edge, brand underline on focus). */
.hp .ged input { height: 32px; padding: 0 10px; border: var(--strokeWidthThin) solid var(--colorNeutralStroke1); border-bottom-color: var(--colorNeutralStrokeAccessible); border-radius: var(--borderRadiusMedium); background: var(--colorNeutralBackground1); color: var(--colorNeutralForeground1); font: var(--fontSizeBase300)/var(--lineHeightBase300) var(--fontFamilyBase); }
.hp .ged input:focus { outline: none; border-bottom: 2px solid var(--colorCompoundBrandStroke); }
.hp .ged label { font-weight: var(--fontWeightRegular); color: var(--colorNeutralForeground1); }

/* Dialogs: Fluent's dialog surface. */
.hp dialog.hv { border: var(--strokeWidthThin) solid var(--colorTransparentStroke); border-radius: var(--borderRadiusXLarge); box-shadow: var(--shadow64); background: var(--colorNeutralBackground1); color: var(--colorNeutralForeground1); padding: 24px; }
.hp dialog.hv h3 { font-size: var(--fontSizeBase500); line-height: var(--lineHeightBase500); font-weight: var(--fontWeightSemibold); }
.hp dialog.hv::backdrop { background: rgba(0, 0, 0, 0.4); }

/* Cards: Fluent's card edge and shadow; the edit bar on the card in Fluent's brand tint. */
.hp .vmcard { border-color: var(--colorTransparentStroke); box-shadow: var(--shadow4); border-radius: var(--borderRadiusXLarge); }
.hp .editbar { background: var(--colorBrandBackground2); }
