.account-menu {
  position: relative;
  flex: none;
}

.account-menu [hidden] {
  display: none !important;
}

.account-toggle {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.account-toggle:hover {
  background: #b90000;
  transform: translateY(-1px);
}

.account-toggle svg {
  width: 24px;
  height: 24px;
}

.account-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 12px);
  right: 0;
  width: min(336px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--line, #3b3030);
  border-radius: 16px;
  background: var(--surface, #181615);
  color: var(--fg, #efeee8);
  box-shadow: 0 16px 40px rgb(0 0 0 / 22%), 0 2px 8px rgb(0 0 0 / 8%);
  font-family: Archivo, system-ui, sans-serif;
  text-align: left;
}

.account-popover .account-details {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 10px 20px;
  margin: 0 0 8px;
  border-bottom: 1px solid var(--line, #3b3030);
}

.account-popover .account-menu-person {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.account-popover .account-details .account-menu-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line, #3b3030);
  border-radius: 14px;
  background: var(--theme-soft, #251c1a);
  color: var(--accent, #ef0606);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.account-popover [data-account-name] {
  display: block;
  min-width: 0;
  color: var(--fg, #efeee8);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  word-break: normal;
  overflow-wrap: break-word;
}

.account-popover [data-account-email] {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted, #b9b0aa);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

.account-menu-actions {display: grid; gap: 4px}
.account-popover .account-menu-action > span {color: inherit; font: inherit}

.account-popover .account-menu-action {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--fg, #efeee8);
  font: 600 13px/1.5 Archivo, system-ui, sans-serif;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.account-popover .account-menu-action svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-popover .account-menu-action .account-menu-arrow {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--muted, #b9b0aa);
}

.account-popover .account-menu-action:hover,
.account-popover .account-menu-action:focus-visible {
  background: var(--theme-soft, #251c1a);
  border-color: var(--line, #3b3030);
  color: var(--fg, #efeee8);
}

.account-popover .account-menu-action:focus-visible {outline: 2px solid var(--accent, #ef0606); outline-offset: 2px}
.account-popover .account-menu-exit {color: var(--muted, #b9b0aa); font-weight: 500}
.account-popover .account-menu-exit:hover {color: var(--accent, #ef0606)}
.account-popover .account-menu-action:disabled {cursor: wait; opacity: .6}

@media (max-width: 1040px) {
  header nav .account-menu {width: min(336px, 100%)}
  header nav .account-popover {position: static; width: 100%; margin-top: 12px}
  #store-navigation .account-menu {flex-wrap: wrap}
  #store-navigation .account-popover {flex-basis: 100%}
}

@media (prefers-reduced-motion: reduce) {
  .account-popover .account-menu-action {transition: none}
}

.account-status:not(:empty) {
  margin-top: 10px;
  color: #ffb3b3;
  font-size: .82rem;
  line-height: 1.4;
}

.account-feedback:not([hidden]) {
  position: absolute;
  z-index: 31;
  top: calc(100% + 12px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid #6a2525;
  border-radius: 10px;
  background: #0b0b0b;
  color: #ffb3b3;
  font-size: .82rem;
  line-height: 1.4;
}
.policy-summary {font-size:14px;line-height:1.65;margin:18px 0;padding:18px;border:1px solid #dce1d8;border-radius:10px;background:#f8faf5;color:#263623}
.policy-summary details {margin:10px 0}
.policy-summary summary {cursor:pointer;font-weight:700}
.policy-summary p {white-space:pre-wrap;margin:8px 0}
.checkout-coupon{display:grid;gap:10px;margin:18px 0}.checkout-coupon input{font:inherit;padding:10px;border:1px solid #b6b6b6;border-radius:5px}.checkout-coupon button{font:inherit;border:0;border-radius:5px;background:#111;color:#fff;padding:10px;cursor:pointer}.checkout-coupon p{font-size:14px;line-height:1.5}

html[data-theme] .account-popover .account-details .account-menu-avatar{color:var(--accent)}
