/* Account/community navigation only. JS moves existing nodes, including forms.
 * Keep the 80rem JS breakpoint and native closed-dialog visibility unchanged.
 * System-color fallbacks support the standalone account shell without ERP CSS. */
body[data-hrc-shell="account"] {
  --hrc-account-control-size: var(--hrc-touch-target, 44px);
  --hrc-account-drawer-width: 24rem;
}
body[data-hrc-shell="account"] .portal-sidebar[hidden],
body[data-hrc-shell="account"] .hrc-account-menu-toggle[hidden] { display: none; }
body[data-hrc-shell="account"] .hrc-account-menu-toggle,
body[data-hrc-shell="account"] .hrc-account-drawer-heading > button {
  box-sizing: border-box;
  min-inline-size: var(--hrc-account-control-size);
  min-block-size: var(--hrc-account-control-size);
  padding: var(--hrc-space-2, .5rem) var(--hrc-space-3, .75rem);
  border: var(--hrc-border-width, 1px) solid var(--hrc-color-border-strong, ButtonBorder);
  border-radius: var(--hrc-radius-control, .625rem);
  background: var(--hrc-color-surface, Canvas);
  color: var(--hrc-color-text, CanvasText);
  font: inherit;
  font-weight: var(--hrc-weight-semibold, 600);
  cursor: pointer;
  overflow-wrap: anywhere;
}
body[data-hrc-shell="account"] .hrc-account-drawer {
  box-sizing: border-box;
  inline-size: min(var(--hrc-account-drawer-width), 100%);
  max-inline-size: 100%;
  block-size: 100dvh;
  max-block-size: 100dvh;
  margin: 0 0 0 auto;
  padding: max(var(--hrc-space-4, 1rem), env(safe-area-inset-top)) max(var(--hrc-space-4, 1rem), env(safe-area-inset-right)) max(var(--hrc-space-4, 1rem), env(safe-area-inset-bottom)) var(--hrc-space-4, 1rem);
  border: 0;
  border-inline-start: var(--hrc-border-width, 1px) solid var(--hrc-color-border, ButtonBorder);
  background: var(--hrc-color-surface, Canvas);
  color: var(--hrc-color-text, CanvasText);
  overscroll-behavior: contain;
  overflow-y: auto;
}
body[data-hrc-shell="account"] .hrc-account-drawer::backdrop {
  background: var(--hrc-component-overlay-backdrop, var(--color-surface-overlay, color-mix(in srgb, black 48%, transparent)));
}
body[data-hrc-shell="account"] .hrc-account-drawer-heading {
  display: flex; align-items: center; justify-content: space-between; gap: var(--hrc-space-3, .75rem);
  margin-block-end: var(--hrc-space-4, 1rem);
}
body[data-hrc-shell="account"] .hrc-account-drawer-heading > button { flex: 0 0 auto; }
body[data-hrc-shell="account"] .hrc-account-drawer-heading h2 {
  margin: 0; min-inline-size: 0;
  font-size: clamp(var(--hrc-text-lg, 1rem), 1.5vw, var(--hrc-text-xl, 1.25rem));
  line-height: var(--hrc-leading-normal, 1.5); overflow-wrap: anywhere;
}
body[data-hrc-shell="account"] .hrc-account-drawer-content {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--hrc-space-4, 1rem); min-inline-size: 0;
}
body[data-hrc-shell="account"] .hrc-account-drawer-content nav {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--hrc-space-1, .25rem);
  inline-size: auto; min-inline-size: 0; max-inline-size: 100%; margin: 0; padding: 0;
  overflow: visible; white-space: normal;
}
body[data-hrc-shell="account"] .hrc-account-drawer-content nav + nav {
  border-block-start: var(--hrc-border-width, 1px) solid var(--hrc-color-border, ButtonBorder); padding-block-start: var(--hrc-space-4, 1rem);
}
body[data-hrc-shell="account"] .hrc-account-drawer-content nav a,
body[data-hrc-shell="account"] .hrc-account-drawer-content nav button {
  display: flex; box-sizing: border-box; align-items: center;
  min-block-size: var(--hrc-account-control-size); min-inline-size: 0;
  max-inline-size: 100%; padding: var(--hrc-space-2, .5rem) var(--hrc-space-3, .75rem);
  white-space: normal; overflow-wrap: anywhere; line-height: var(--hrc-leading-normal, 1.5);
}
body[data-hrc-shell="account"] .hrc-account-drawer-content .portal-logout { margin: 0; min-inline-size: 0; }
body.community-portal[data-hrc-shell="account"] .portal-menu a[aria-current="page"] {
  background: var(--hrc-action-primary, Highlight);
  color: var(--hrc-action-on-primary, HighlightText);
  border-color: var(--hrc-action-primary, Highlight);
  font-weight: var(--hrc-weight-bold, 700);
}
body[data-hrc-shell="account"] :is(.hrc-account-menu-toggle, .hrc-account-drawer a, .hrc-account-drawer button):focus-visible {
  outline: var(--hrc-focus-width, 3px) solid var(--hrc-color-focus, Highlight); outline-offset: var(--hrc-focus-offset, 2px);
}
@media (max-width: 79.999rem) {
  body.community-portal[data-hrc-shell="account"] .portal-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  body.community-portal[data-hrc-shell="account"] .portal-header {
    min-block-size: var(--hrc-topbar-height, 68px); height: auto; flex-wrap: nowrap;
    justify-content: space-between; align-items: center; gap: var(--hrc-space-4, 1rem);
  }
}
