/* Password rules ------------------------------------------------------ */
/* What a new password needs, under its field. A line is quiet until the
   typed password meets it; the client script then adds --met and the tick
   lights up. Colour is never the only signal: the tick itself appears. */
.pw-rules {
  list-style: none;
  margin: calc(-1 * var(--space-2)) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: var(--space-1) var(--space-4);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}
.pw-rules__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.pw-rules__item .icon {
  display: none;
  flex: none;
}
/* The unmet line's dot sits in the same 1em slot the tick takes, so a line
   does not shift sideways when it is met. */
.pw-rules__item::before {
  content: "";
  flex: none;
  width: 1em;
  height: 1em;
  background: radial-gradient(circle, currentColor 0 0.16em, transparent 0.18em);
}
.pw-rules__item--met {
  color: var(--success);
  font-weight: 700;
}
.pw-rules__item--met::before {
  display: none;
}
.pw-rules__item--met .icon {
  display: block;
}

/* Account page -------------------------------------------------------- */
/* The customer's own page: a rail of the account's sections and a stage for
   the one that is open. On a phone the rail is a row of chips above the
   stage; from 1024px it is a column that sticks under the navbar. */
.account {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  padding-block: var(--space-8) var(--space-16);
}
.account__head {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
}
.account__mail {
  margin: var(--space-1) 0 0;
  color: var(--ink-muted);
  font-size: var(--text-sm);
}
/* A form on an account page (the password change) keeps to a reading
   width instead of stretching across the stage. */
.account__form {
  width: 100%;
  max-width: 32rem;
}
.account__stage {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  min-width: 0;
}
.account-nav {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-1);
  scrollbar-width: none;
}
.account-nav::-webkit-scrollbar {
  display: none;
}
/* The row scrolls, so it clips: the ring is drawn inside the link. */
.account-nav__link:focus-visible {
  outline-offset: -2px;
}
.account-nav__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  color: var(--ink-soft);
  font-weight: 700;
  white-space: nowrap;
}
.account-nav__link:hover {
  color: var(--ink);
  background: var(--surface);
}
.account-nav__link[aria-current="page"] {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: inset 3px 0 0 var(--primary);
}
.account-nav__link .badge {
  margin-inline-start: auto;
}
.account-nav__link--quiet {
  color: var(--ink-muted);
  font-weight: 500;
  /* The quiet entry is the logout, a <button>: without this it keeps the
     browser's grey button face. */
  background: none;
}
.account-nav__sep {
  display: none;
  height: 1px;
  background: var(--line);
  margin-block: var(--space-2);
}
@media (min-width: 1024px) {
  .account {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: var(--space-10);
    padding-block: var(--space-10) var(--space-16);
  }
  .account-nav {
    flex-direction: column;
    overflow: visible;
    position: sticky;
    top: calc(4rem + var(--space-6));
    align-self: start;
  }
  .account-nav__sep {
    display: block;
  }
}
/* The login the account page shows a guest: the checkout's auth panel in a
   narrow column of its own. */
.account-login {
  max-width: 28rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-block: var(--space-12);
  text-align: center;
}
.account-login .auth-panel {
  text-align: left;
}

/* Order list (account page) ------------------------------------------ */
/* One order is one <details>: the summary is the collapsed row, the body
   opens under it. Nothing but structure sits in the summary, so a row reads
   whole on a phone (number and date, then status, then pictures, then the
   total) and as one line from 640px. */
.order-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.order {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--dur-fast), box-shadow var(--dur-base) var(--ease-out);
}
.order:hover {
  border-color: var(--line-strong);
}
.order[open] {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-1);
}
.order__summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "id chev"
    "meta chev"
    "thumbs thumbs"
    "total total";
  gap: var(--space-2) var(--space-4);
  align-items: center;
  padding: var(--space-4) var(--space-5);
}
.order__summary::-webkit-details-marker {
  display: none;
}
.order__id {
  grid-area: id;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.order__number {
  font-family: var(--font-brand);
  font-size: var(--text-lg);
  letter-spacing: 0.04em;
}
.order__date {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.order__meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  min-width: 0;
}
.order__count {
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.order__thumbs {
  grid-area: thumbs;
  display: flex;
  gap: var(--space-1);
}
.order__thumbs .order__cover {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
}
.order__cover {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-raised);
  flex: none;
}
.order__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.order__cover--more {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: var(--text-xs);
  font-weight: 700;
}
.order__total {
  grid-area: total;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.order__chev {
  grid-area: chev;
  align-self: center;
  color: var(--ink-muted);
  transition: transform var(--dur-base) var(--ease-out);
}
.order[open] .order__chev {
  transform: rotate(180deg);
}
@media (min-width: 640px) {
  .order__summary {
    grid-template-areas: "id meta thumbs total chev";
    grid-template-columns: 8rem minmax(0, 1fr) auto 7.5rem auto;
    padding: var(--space-4) var(--space-6);
  }
  .order__total {
    text-align: right;
    font-size: var(--text-lg);
  }
}
.order__body {
  border-top: 1px solid var(--line);
  padding: var(--space-5) var(--space-5) var(--space-6);
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 640px) {
  .order__body {
    padding-inline: var(--space-6);
  }
}
@media (min-width: 1024px) {
  .order__body {
    grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 1fr);
  }
}
.order__lines {
  display: flex;
  flex-direction: column;
}
.order-line {
  display: grid;
  grid-template-columns: 3.75rem 1fr auto;
  gap: var(--space-4);
  align-items: center;
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--line);
}
.order-line:last-child {
  border-bottom: 0;
}
.order-line__name {
  font-weight: 700;
}
a.order-line__name:hover {
  color: var(--primary);
}
.order-line__meta {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink-muted);
}
.order-line__price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.order-line__price small {
  display: block;
  font-weight: 500;
  color: var(--ink-muted);
  font-size: var(--text-xs);
}
.order__aside {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.order__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
/* The facts of one order — delivery, payment, the sums — as label/value
   pairs; a value keeps its own line breaks (an address). */
.order-facts {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}
.order-facts dt {
  color: var(--ink-muted);
}
.order-facts dd {
  margin: 0;
  color: var(--ink);
  white-space: pre-line;
}
.order-facts__total {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
  font-size: var(--text-base);
  font-weight: 700;
}
.order-facts__total dd {
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
/* A panel inside the order's aside: the one thing this order still needs
   from the customer, e.g. to be paid. */
.order-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.order-panel__title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--label-tracking);
  text-transform: var(--label-transform);
  color: var(--ink-muted);
}
.order-panel--pay {
  border-color: color-mix(in srgb, var(--warning) 40%, transparent);
  background: var(--warning-soft);
}
.order-panel--pay .order-panel__title {
  color: var(--warning);
}
/* Status pill: one colour per status key — semantic, apart from the brand
   pink — and a plain one for a status the shop added itself. */
/* The order's status history, newest first; the current status is lit. */
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}
.timeline__entry {
  position: relative;
  display: grid;
  grid-template-columns: 1rem 1fr;
  gap: var(--space-3);
  padding-block: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
}
.timeline__entry::before {
  content: "";
  grid-column: 1;
  width: 0.6rem;
  height: 0.6rem;
  margin: 0.35rem 0 0 0.2rem;
  border-radius: 50%;
  background: var(--line-strong);
}
.timeline__entry::after {
  content: "";
  position: absolute;
  left: 0.47rem;
  top: 1.2rem;
  bottom: -0.1rem;
  width: 2px;
  background: var(--line);
}
.timeline__entry:last-child::after {
  display: none;
}
.timeline__entry--current::before {
  background: var(--primary);
  box-shadow: var(--glow-pink);
}
.timeline__what {
  font-weight: 700;
}
.timeline__when {
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* A wishlist tile with its "remove" under it. */
.wishlist-item { display: grid; gap: var(--space-2); align-content: start; }
