/* The header's account control (web/account-menu.js), on every customer page.
   Tokens come from styles.css; nothing here defines a color of its own. Written to sit
   in both the site header (.hdr, site.css) and the order wizard's (.wz-head). */

.acct { position: relative; display: flex; align-items: center; flex-shrink: 0; }
.hdr .acct { margin-left: 8px; }
.hdr .acct .btn { margin-left: 0; }
.acct .acct-signin[hidden] { display: none; }

/* The wizard's header links are small and muted; its Sign in is a button like the site's. */
.wz-head .acct .acct-signin {
  color: var(--ink); font-size: 13px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none;
}
.wz-head .acct .acct-signin:hover { border-color: var(--accent); }

.acct-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 12px 0 10px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: transparent; color: var(--ink); cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: -.01em;
}
.acct-btn:hover, .acct.is-open .acct-btn { border-color: var(--accent); background: var(--panel); }
.acct-btn > svg:first-child { width: 19px; height: 19px; }
.acct-btn .acct-caret { width: 12px; height: 12px; transition: transform .15s; }
.acct.is-open .acct-caret { transform: rotate(180deg); }
.wz-head .acct-btn { height: 32px; font-size: 13px; padding: 0 9px 0 8px; }
.wz-head .acct-btn > svg:first-child { width: 16px; height: 16px; }

.acct-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  z-index: calc(var(--layer-sticky) + 1);
  min-width: 230px; max-width: min(320px, calc(100vw - 24px));
  padding: 6px;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}
.acct-panel[hidden] { display: none; }

.acct-who {
  margin: 0; padding: 8px 10px 9px;
  font-size: 13px; line-height: 1.4; color: var(--muted);
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
  overflow-wrap: anywhere;
}
.acct-who strong { color: var(--ink); font-weight: 600; }

.acct-items { list-style: none; margin: 0; padding: 0; }
.acct-items a, .acct-items button {
  display: block; width: 100%; box-sizing: border-box;
  padding: 10px 10px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--ink); text-align: left; text-decoration: none;
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.3; cursor: pointer;
}
.acct-items a:hover, .acct-items button:hover,
.acct-items a:focus-visible, .acct-items button:focus-visible { background: var(--panel-2); }
.acct-items .acct-signout { border-top: 1px solid var(--line); border-radius: 0 0 var(--r-sm) var(--r-sm); margin-top: 4px; }
.acct-items .acct-admin { color: var(--accent-ink); }

/* At phone width the icon alone: "Account" and the caret would push the logo onto
   two lines. The button keeps its accessible name ("Account menu") either way. */
@media (max-width: 780px) {
  /* site.css makes the header static here. Relative instead (it looks the same) so its
     z-index applies and the open menu sits above the page, not under the design tool. */
  .hdr { position: relative; }
  .hdr .acct { margin-left: 0; }
  .acct-btn { height: 38px; padding: 0 9px; }
  .acct-btn .acct-label, .acct-btn .acct-caret { display: none; }
}

@media print { .acct { display: none !important; } }
