/* Sign-in and the customer account. The sign-in has no header and no footer: one card in the
   middle of the page with the logo and the way back, a short note under it. */
.auth-page {
  display: grid;
  align-content: center;
  padding: 48px 16px;
}

.auth-page [hidden] {
  display: none;
}

.auth {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.auth__head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* A text link without a border or fill: on hover only the colour changes. */
.auth__back {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
  text-decoration: none;
  transition: var(--transition-state);
}

.auth__back:hover {
  color: var(--color-brand);
}

.auth__back .icon {
  width: 14px;
  height: 14px;
}

.auth__card {
  display: grid;
  gap: 16px;
  width: min(100%, 440px);
  padding: 36px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.auth--wide .auth__card,
.auth--wide .auth__note {
  width: min(100%, 560px);
}

.auth__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-brand) 10%, var(--color-surface));
  color: var(--color-brand);
}

.auth__icon .icon {
  width: 26px;
  height: 26px;
}

.auth__title {
  font-size: var(--text-heading-lg);
  font-weight: var(--text-heading-lg--font-weight);
  line-height: var(--text-heading-lg--line-height);
  letter-spacing: var(--text-heading-lg--letter-spacing);
}

.auth__lead {
  margin-top: -6px;
  color: var(--color-fg-muted);
  font-size: var(--text-body);
  line-height: var(--text-body--line-height);
}

.auth__lead strong {
  color: var(--color-fg);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.auth__google,
.auth__submit {
  width: 100%;
}

.auth__google-mark {
  width: 20px;
  height: 20px;
}

/* "nebo e-mailem" between two thin lines. */
.auth__divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--text-label--letter-spacing);
  text-transform: uppercase;
}

.auth__divider::before,
.auth__divider::after {
  height: 1px;
  background: var(--color-line);
  content: "";
}

.auth__form {
  display: grid;
  gap: 14px;
}

/* The password opens under the e-mail. The row grows from nothing, so the change is smooth. */
.auth__password {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: -14px;
  opacity: 0;
  transition:
    grid-template-rows 0.22s ease,
    margin-top 0.22s ease,
    opacity 0.18s ease;
}

.auth__password-inner {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.auth__form[data-mode="password"] .auth__password {
  grid-template-rows: 1fr;
  margin-top: 0;
  opacity: 1;
}

.auth__form[data-mode="code"] [data-auth-label="password"],
.auth__form[data-mode="password"] [data-auth-label="code"] {
  display: none;
}

/* A text action without a border or fill: on hover only the colour changes. */
.auth__switch {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-self: center;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--color-brand);
  font-family: var(--font-sans);
  font-size: var(--text-ui-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-state);
}

.auth__switch:hover {
  color: var(--color-brand-hover);
}

.auth__switch:disabled {
  color: var(--color-fg-hint);
  cursor: default;
}

.auth__switch .icon {
  width: 14px;
  height: 14px;
}

.auth__hint {
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
  font-weight: 400;
  line-height: 1.45;
}

.auth__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: center;
  padding-top: 4px;
  border-top: 1px solid var(--color-line-soft);
}

/* Short lines under the card, one thought per line, in the middle like the card. */
.auth__note {
  display: grid;
  gap: 4px;
  width: min(100%, 440px);
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
}

.auth__note a {
  color: var(--color-brand);
  font-weight: 600;
  transition: var(--transition-state);
}

.auth__note a:hover {
  color: var(--color-brand-hover);
}

/* The code: six boxes in two groups of three, as the e-mail writes it. */
.auth-code {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.auth-code__legend {
  margin-bottom: 8px;
  padding: 0;
  color: var(--color-fg);
  font-size: var(--text-ui);
  font-weight: 600;
}

.auth-code__digits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 8px repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.auth-code__digit:nth-child(4) {
  grid-column: 5;
}

.auth-code__digit {
  width: 100%;
  min-width: 0;
  height: 56px;
  padding: 0;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-fg);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  transition: var(--transition-state);
}

.auth-code__digit:focus {
  border-color: var(--color-fg);
  outline: none;
  box-shadow: 0 0 0 1px var(--color-fg);
}

.auth-code[data-invalid] .auth-code__digit {
  border-color: var(--color-brand);
}

.auth-code[data-invalid] .auth-code__digit:focus {
  box-shadow: 0 0 0 1px var(--color-brand);
}

/* Accounts to choose. An open account is a clickable card with the shared lift, a locked one
   stays flat with its own small form. */
.auth-accounts {
  display: grid;
  gap: 10px;
}

.auth-account {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  transition: var(--transition-lift);
}

.auth-account:not([data-locked]):hover {
  border-color: var(--color-fg);
  box-shadow: var(--shadow-lift);
  transform: translateY(var(--lift-y));
}

.auth-account__link {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  color: var(--color-fg);
  text-decoration: none;
}

.auth-account__avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-ink);
  color: var(--color-on-ink);
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
  font-weight: 600;
}

.auth-account[data-kind="b2b"] .auth-account__avatar {
  border: 1px solid var(--color-line);
  background: var(--color-canvas);
  color: var(--color-fg);
}

.auth-account__avatar .icon {
  width: 20px;
  height: 20px;
}

.auth-account__text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.auth-account__name {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
  font-size: var(--text-title);
  font-weight: 600;
  line-height: 1.3;
}

.auth-account__badge {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--color-canvas);
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 400;
  letter-spacing: var(--text-label--letter-spacing);
  text-transform: uppercase;
}

.auth-account__meta {
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
}

.auth-account__go {
  color: var(--color-fg-hint);
  transition: var(--transition-lift);
}

.auth-account:hover .auth-account__go {
  color: var(--color-fg);
  transform: translateX(2px);
}

.auth-account__locked {
  display: none;
}

.auth-account[data-locked] .auth-account__link {
  grid-column: 1;
  pointer-events: none;
}

.auth-account[data-locked] .auth-account__avatar,
.auth-account[data-locked] .auth-account__text {
  opacity: 0.55;
}

.auth-account[data-locked] .auth-account__go {
  display: none;
}

.auth-account[data-locked] .auth-account__locked {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-right: 16px;
}

.auth-account__locked .icon {
  width: 14px;
  height: 14px;
}

.auth-account__unlock {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
  margin: 0 16px 16px;
  padding-top: 14px;
  border-top: 1px solid var(--color-line-soft);
  animation: auth-open 0.2s ease;
}

.auth-account__unlock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}

@keyframes auth-open {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* The header of a real page carries both states, the remembered account picks one before the
   first paint. */
.site-header__guest,
.account-menu-root {
  display: contents;
}

.site-header__signed {
  display: none;
}

html[data-account] .site-header__signed {
  display: contents;
}

html[data-account] .site-header__guest {
  display: none;
}

/* The round mark of an account: initials of a person on ink, a building of a company on canvas. */
.account-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-ink);
  color: var(--color-on-ink);
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
  font-weight: 600;
}

.account-avatar[data-kind="b2b"] {
  border: 1px solid var(--color-line);
  background: var(--color-canvas);
  color: var(--color-fg);
}

.account-avatar .icon {
  width: 18px;
  height: 18px;
}

/* Account menu: the active account, the accounts to switch to, the account, the sign-out. */
.account-menu {
  width: 300px;
  padding: 6px;
}

.account-menu__current {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 6px;
  padding: 10px 10px 14px;
  border-bottom: 1px solid var(--color-line-soft);
}

.account-menu__who {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-menu__who strong {
  font-size: var(--text-title-sm);
  font-weight: 600;
  line-height: 1.3;
}

.account-menu__who span {
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
  overflow-wrap: anywhere;
}

.account-menu__account[hidden] {
  display: none;
}

.account-menu__account .account-avatar {
  width: 28px;
  height: 28px;
  font-size: var(--text-label);
}

.account-menu__account .account-avatar .icon {
  width: 14px;
  height: 14px;
}

.account-menu__text {
  display: grid;
  flex: 1;
  gap: 1px;
  min-width: 0;
  text-align: left;
}

.account-menu__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu__meta {
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
}

.account-menu__lock {
  display: none;
  width: 14px;
  height: 14px;
  color: var(--color-fg-muted);
}

.account-menu__account[data-locked] .account-menu__lock {
  display: block;
}

.account-menu__account[data-locked] .account-avatar,
.account-menu__account[data-locked] .account-menu__text {
  opacity: 0.6;
}

.account-unlock__form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.account-unlock__code {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--color-line-soft);
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
  font-weight: 400;
  text-align: center;
}

/* The signed-in part: the menu of the account on the left, the page on the right. */
.account {
  padding-top: 28px;
}

.account__layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.account-nav {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 8px;
}

.account-nav__list {
  display: grid;
  gap: 2px;
}

/* A link of the menu has no border and no fill of its own: the hover changes only the colour.
   The open part is a state, it gets the surface and the red edge. */
.account-nav__link {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-fg);
  font-size: var(--text-ui);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition-state);
}

.account-nav__link .icon {
  width: 18px;
  height: 18px;
  color: var(--color-fg-muted);
  transition: var(--transition-state);
}

.account-nav__link:hover,
.account-nav__link:hover .icon {
  color: var(--color-brand);
}

.account-nav__link[aria-current="page"] {
  background: var(--color-surface);
  box-shadow:
    inset 2px 0 var(--color-brand),
    inset 0 0 0 1px var(--color-line);
  font-weight: 600;
}

.account-nav__link[aria-current="page"] .icon {
  color: var(--color-brand);
}

.account-nav__count {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--color-brand);
  color: var(--color-on-brand);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 600;
}

.account-nav__logout {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--color-line);
  border-radius: 0;
  color: var(--color-fg-muted);
}

.account__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  min-width: 0;
}

.account__head {
  display: flex;
  gap: 16px;
  align-items: center;
}

.account__avatar .account-avatar {
  width: 56px;
  height: 56px;
  font-size: var(--text-title);
}

.account__avatar .account-avatar .icon {
  width: 24px;
  height: 24px;
}

.account__heading {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.account__title {
  font-size: var(--text-heading-xl);
  font-weight: var(--text-heading-xl--font-weight);
  line-height: var(--text-heading-xl--line-height);
  letter-spacing: var(--text-heading-xl--letter-spacing);
}

.account__who {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  align-items: baseline;
}

.account__who strong {
  font-size: var(--text-title);
  font-weight: 600;
}

.account__who span,
.account-mono {
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
}

.account-section {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.account-section__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
}

.account-section__title {
  font-size: var(--text-heading-md);
  font-weight: var(--text-heading-md--font-weight);
  line-height: var(--text-heading-md--line-height);
}

.account-section__more {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--color-brand);
  font-size: var(--text-ui-sm);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-state);
}

.account-section__more:hover {
  color: var(--color-brand-hover);
}

.account-section__more .icon {
  width: 14px;
  height: 14px;
}

/* What waits for the customer: one row each, its colour on the left edge. */
.account-tasks {
  display: grid;
  gap: 10px;
}

.account-task {
  --task: var(--color-transit);

  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--color-line);
  border-left: 3px solid var(--task);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.account-task[data-tone="warning"] {
  --task: var(--color-warning);
}

.account-task__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--task) 12%, var(--color-surface));
  color: var(--task);
}

.account-task__icon .icon {
  width: 18px;
  height: 18px;
}

.account-task__text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.account-task__text strong {
  font-size: var(--text-title-sm);
  font-weight: 600;
}

.account-task__text span {
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
}

.account-task__actions {
  display: flex;
  gap: 8px;
}

.account-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.account-stat {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.account-stat__label,
.account-label {
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--text-label--letter-spacing);
  text-transform: uppercase;
}

.account-stat__value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
}

.account-stat__note {
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
  font-weight: 400;
}

/* Parts only a company account has. */
html[data-account-kind="b2c"] [data-for="b2b"] {
  display: none;
}

/* Every row has the same height and every action the same size, whatever its label. */
.account-table td {
  height: 56px;
}

.account-table__action {
  width: 184px;
}

.account-table__action .button {
  justify-content: center;
  width: 100%;
  height: 36px;
  white-space: nowrap;
}

@container table (max-width: 560px) {
  .account-table td {
    height: auto;
  }

  .account-table__action {
    width: auto;
  }
}

.account-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.account-card {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 22px 24px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.account-card > .button {
  justify-self: start;
}

.account-addresses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.account-label {
  display: block;
  margin-bottom: 6px;
}

.account-address {
  font-size: var(--text-ui);
  font-weight: 400;
  line-height: 1.55;
}

.account-address strong {
  font-weight: 600;
}

/* The last claim is a clickable card with the shared lift. */
.account-claim {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  color: var(--color-fg);
  text-decoration: none;
  transition: var(--transition-lift);
}

.account-claim:hover {
  border-color: var(--color-fg);
  box-shadow: var(--shadow-lift);
  transform: translateY(var(--lift-y));
}

.account-claim__top {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.account-claim strong {
  font-size: var(--text-title-sm);
  font-weight: 600;
}

.account-claim__note {
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
}

.account-card__hint {
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
  font-weight: 400;
  line-height: 1.5;
}

.account [hidden] {
  display: none;
}

/* Orders: tabs by state with their counts, the search by number on the right. */
.account-orders__toolbar {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.account-orders__search {
  position: relative;
  display: block;
  width: min(100%, 260px);
}

.account-orders__search .icon {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--color-fg-muted);
  translate: 0 -50%;
  pointer-events: none;
}

.account-orders__search .input {
  width: 100%;
  padding-left: 36px;
}

.account-empty {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 40px 16px;
  border: 1px dashed var(--color-line-strong);
  border-radius: var(--radius-md);
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
  text-align: center;
}

.account-empty strong {
  color: var(--color-fg);
  font-size: var(--text-title);
}

.account-empty__icon {
  width: 28px;
  height: 28px;
  margin-bottom: 4px;
}

.account-empty .button {
  margin-top: 8px;
}

/* Orders loaded later appear softly, so the eye finds where the list grew. */
.account-table tr[data-order-new] {
  animation: auth-open 0.24s ease;
}

.account-orders__more {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding-top: 8px;
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
}

/* A text link back without a border or fill: on hover only the colour changes. */
.account-back {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-self: start;
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-state);
}

.account-back:hover {
  color: var(--color-brand);
}

.account-back .icon {
  width: 14px;
  height: 14px;
}

.order-detail {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.order-detail__head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: -8px;
}

.order-detail__title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.order-detail__meta {
  margin-top: 6px;
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
}

.order-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Progress: the stages side by side, a line joins them, done ones carry a check. */
.order-progress {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  padding: 20px 16px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.order-progress__step {
  position: relative;
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.order-progress__step + .order-progress__step::before {
  position: absolute;
  top: 13px;
  right: calc(50% + 20px);
  left: calc(-50% + 20px);
  height: 2px;
  border-radius: 1px;
  background: var(--color-line);
  content: "";
}

.order-progress__step[data-state="done"] + .order-progress__step[data-state="done"]::before {
  background: var(--color-fg);
}

.order-progress__dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 4px;
  border: 2px solid var(--color-line-strong);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-on-ink);
}

.order-progress__dot .icon {
  width: 14px;
  height: 14px;
}

.order-progress__step[data-state="done"] .order-progress__dot {
  border-color: var(--color-fg);
  background: var(--color-fg);
}

.order-progress__step[data-state="current"] .order-progress__dot {
  border-color: var(--color-warning);
  box-shadow: inset 0 0 0 5px var(--color-surface);
  background: var(--color-warning);
}

.order-progress__step[data-state="cancelled"] .order-progress__dot {
  border-color: var(--color-fg-hint);
  background: var(--color-fg-hint);
}

.order-progress__label {
  font-size: var(--text-ui);
  font-weight: 600;
}

.order-progress__step[data-state="next"] .order-progress__label {
  color: var(--color-fg-muted);
  font-weight: 500;
}

.order-progress__date {
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
}

.order-progress__step[data-state="current"] .order-progress__date {
  color: var(--color-warning);
}

/* Goods: the rows of the checkout, the total under them. */
.order-goods {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
}

.order-goods > .cart-items {
  border: 0;
  border-bottom: 1px solid var(--color-line);
  border-radius: 0;
}

.order-goods__total {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px 20px 4px;
  font-size: var(--text-title);
  font-weight: 600;
}

.order-goods__total strong {
  font-family: var(--font-mono);
  font-size: var(--text-heading-lg);
  font-weight: 600;
}

.order-goods__net {
  padding: 0 20px 18px;
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
  text-align: right;
}

/* The way to a claim or a return of a delivered order. */
.order-return {
  --task: var(--color-brand);

  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.order-return__text h2 {
  font-size: var(--text-title);
  font-weight: 600;
}

.order-return__text p {
  margin-top: 2px;
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
  font-weight: 400;
}

/* Parts only a personal account has, the companion of the rule for companies above. */
html[data-account-kind="b2b"] [data-for="b2c"] {
  display: none;
}

.order-detail__info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.order-detail__info .account-card {
  gap: 0;
  padding: 18px 20px;
}

.order-detail__tracking {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.order-detail__tracking .account-section__more {
  justify-self: start;
}

.order-documents {
  display: grid;
  gap: 8px;
}

/* A document link has no border or fill: on hover only the colour changes. */
.order-documents a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--color-fg);
  font-size: var(--text-ui);
  text-decoration: none;
  transition: var(--transition-state);
}

.order-documents a:hover {
  color: var(--color-brand);
}

.order-documents .icon {
  width: 16px;
  height: 16px;
  color: var(--color-fg-muted);
}

/* Paying afterwards: the amount at the top, the ways to pay, the QR code for a transfer. */
.order-pay {
  display: grid;
  gap: 16px;
  scroll-margin-top: 24px;
  border-color: var(--color-warning);
  box-shadow: inset 3px 0 var(--color-warning);
}

.order-pay__head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.order-pay__amount {
  font-family: var(--font-mono);
  font-size: var(--text-heading-lg);
  font-weight: 600;
  white-space: nowrap;
}

.order-pay__transfer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 24px;
  align-items: center;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--color-canvas);
  animation: auth-open 0.2s ease;
}

.order-pay__transfer .order-payment__rows {
  margin-top: 0;
}

.order-pay__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
}

.order-pay__note {
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
  font-weight: 400;
}

.order-cancel {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
  justify-content: center;
  padding-top: 8px;
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
}

/* Claim or return from an order: the goods are ticked, each with its pieces. */
.return-form {
  display: grid;
  gap: 28px;
  counter-reset: claim-step;
}

.return-form > .form-step:first-child {
  padding-top: 0;
  border-top: 0;
}

/* The rows borrow the parts of the cart rows, not their named grid areas. */
.return-item > * {
  grid-area: auto;
}

.return-items {
  display: grid;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.return-item {
  display: grid;
  grid-template-columns: auto 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-line-soft);
  transition: var(--transition-state);
}

.return-item:last-child {
  border-bottom: 0;
}

.return-item .cart-item__image {
  width: 64px;
  border-radius: var(--radius-sm);
}

.return-item .cart-item__image,
.return-item .cart-item__info,
.return-item__pieces {
  transition: opacity 0.16s ease;
}

.return-item:not([data-checked]) .cart-item__image,
.return-item:not([data-checked]) .cart-item__info,
.return-item:not([data-checked]) .return-item__pieces {
  opacity: 0.5;
}

.return-item:not([data-checked]) .return-item__pieces {
  pointer-events: none;
}

.return-refund {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--color-canvas);
  font-size: var(--text-ui);
  font-weight: 400;
  line-height: 1.5;
}

.return-refund .icon {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--color-fg-muted);
}

.return-form__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--color-line);
}

.return-form__summary {
  display: grid;
  gap: 2px;
}

.return-form__summary span {
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--text-label--letter-spacing);
  text-transform: uppercase;
}

.return-form__summary strong {
  font-family: var(--font-mono);
  font-size: var(--text-price);
  font-weight: 600;
}

/* The list of claims: each one a clickable card with the shared lift. */
.account-claims__intro {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
}

.account-claims {
  display: grid;
  gap: 10px;
}

.account-claim-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  transition: var(--transition-lift);
}

.account-claim-row:hover {
  border-color: var(--color-fg);
  box-shadow: var(--shadow-lift);
  transform: translateY(var(--lift-y));
}

.account-claim-row__link {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 1;
  gap: 4px;
  padding: 16px 18px;
  color: var(--color-fg);
  text-decoration: none;
}

/* The state stays at the top right in every row, an action sits under it. */
.account-claim-row {
  position: relative;
}

.account-claim-row__action {
  position: absolute;
  right: 18px;
  bottom: 14px;
}

.account-claim-row__link strong {
  font-size: var(--text-title-sm);
  font-weight: 600;
}

.claim-photos {
  display: flex;
  gap: 8px;
}

.claim-photos span {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
}

/* Messages with the support: the shop on the left, the customer on the right on ink. */
.claim-messages {
  display: grid;
  gap: 12px;
}

.claim-message {
  display: grid;
  gap: 4px;
  max-width: min(560px, 85%);
  padding: 12px 16px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  animation: auth-open 0.2s ease;
}

.claim-message p {
  font-size: var(--text-ui);
  font-weight: 400;
  line-height: 1.5;
}

.claim-message[data-from="customer"] {
  justify-self: end;
  border-color: var(--color-ink);
  background: var(--color-ink);
  color: var(--color-on-ink);
}

.claim-message__who {
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
}

.claim-message[data-from="customer"] .claim-message__who {
  color: var(--color-on-ink-muted);
}

.claim-reply {
  display: grid;
  gap: 10px;
}

.claim-reply__actions {
  display: flex;
  justify-content: flex-end;
}

/* Billing details: the values in a grid, the way to change them under it. */
.billing-card {
  gap: 20px;
}

.billing-card__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 24px;
}

.billing-value {
  display: grid;
  gap: 2px;
}

.billing-value .account-label {
  margin-bottom: 0;
}

.billing-value__text {
  font-size: var(--text-ui);
  font-weight: 500;
  line-height: 1.45;
}

.billing-value__text--mono {
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
}

.billing-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--color-line-soft);
}

/* Delivery addresses: cards side by side, the last one adds a new address. */
/* The columns are wide enough for the three actions of a card on one line. */
.address-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 12px;
}

.address-grid > li {
  display: grid;
}

.address-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  padding: 18px 20px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  animation: auth-open 0.2s ease;
  transition: var(--transition-state);
}

.address-card[data-default] {
  border-color: var(--color-line-strong);
}

.address-card__head {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.address-card__label {
  font-size: var(--text-title);
  font-weight: 600;
}

.address-card__badge {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-success) 12%, var(--color-surface));
  color: var(--color-success);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: var(--text-label--letter-spacing);
  text-transform: uppercase;
}

.address-card:not([data-default]) .address-card__badge,
.address-card[data-default] .address-card__make-default,
.address-card[data-default] .address-card__remove {
  display: none;
}

/* One line of actions in every card, so the lines above them sit at the same height. */
.address-card__actions {
  display: flex;
  gap: 16px;
  white-space: nowrap;
  padding-top: 10px;
  border-top: 1px solid var(--color-line-soft);
}

/* Text actions without a border or fill: on hover only the colour changes. */
.address-card__action {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--color-fg-muted);
  font-family: var(--font-sans);
  font-size: var(--text-ui-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-state);
}

.address-card__action:hover {
  color: var(--color-brand);
}

.address-card__action .icon {
  width: 14px;
  height: 14px;
}

/* The dashed card has a border, so its hover may change the border with the colour. */
.address-add {
  display: grid;
  gap: 8px;
  place-items: center;
  align-content: center;
  min-height: 180px;
  padding: 24px;
  border: 1px dashed var(--color-line-strong);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-fg-muted);
  font-family: var(--font-sans);
  font-size: var(--text-ui);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-state);
}

.address-add:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.address-add .icon {
  width: 22px;
  height: 22px;
}

.address-modal {
  max-width: 560px;
}

.address-form .form-grid {
  margin-top: 8px;
  margin-bottom: 20px;
}

/* Settings: one block per topic, one row per setting, its action on the right. */
.settings-card {
  gap: 0;
}

.settings-card__head {
  display: grid;
  gap: 4px;
  padding-bottom: 8px;
}

.settings-row {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--color-line-soft);
}

.settings-row__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.settings-row__text strong,
.settings-row__label {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
  color: var(--color-fg);
  font-size: var(--text-ui);
  font-weight: 600;
}

.settings-row__text > span {
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
  font-weight: 400;
  line-height: 1.45;
}

.settings-row > .switch,
.settings-row > .address-card__action {
  flex: none;
}

/* A value edited in its row: the field takes the whole row until it is saved or cancelled. */
.settings-edit {
  flex-wrap: wrap;
}

.settings-edit[data-editing] > .settings-row__text,
.settings-edit[data-editing] > .address-card__action {
  display: none;
}

.settings-edit__form {
  display: grid;
  flex: 1 1 100%;
  gap: 10px;
  animation: auth-open 0.2s ease;
}

.settings-edit__actions {
  display: flex;
  gap: 8px;
}

.settings-accounts {
  display: grid;
}

/* Every account row has the height of the one with the button, the badge does not shrink it. */
.settings-account {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px 0;
  border-top: 1px solid var(--color-line-soft);
}

.settings-account__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.settings-account__text strong {
  font-size: var(--text-ui);
  font-weight: 600;
}

.settings-account__text span {
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
}

.settings-account__active {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-success) 12%, var(--color-surface));
  color: var(--color-success);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: var(--text-label--letter-spacing);
  text-transform: uppercase;
}

.settings-account:not([data-active]) .settings-account__active,
.settings-account[data-active] .settings-account__switch {
  display: none;
}

.settings-card > .account-card__hint {
  margin-top: 12px;
}

.settings-devices {
  display: grid;
}

.settings-devices .settings-row {
  animation: none;
}

.settings-devices__all {
  justify-self: start;
  margin-top: 12px;
}

.settings-delete {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border: 1px dashed var(--color-line-strong);
  border-radius: var(--radius-md);
}

.settings-delete h2 {
  font-size: var(--text-title);
  font-weight: 600;
}

.settings-delete p {
  margin-top: 2px;
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
  font-weight: 400;
  line-height: 1.45;
}

/* An order opened by the link from the e-mail: the detail of the account without its menu. */
.guest-order .order-detail {
  max-width: 960px;
  margin-inline: auto;
}

/* How the page was opened: a short title, one line under it and the way to the account, laid out
   like the tasks of the account. */
.guest-notice {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.guest-notice__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-canvas);
  color: var(--color-fg);
}

.guest-notice__icon .icon {
  width: 18px;
  height: 18px;
}

.guest-notice__text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.guest-notice__text strong {
  font-size: var(--text-title-sm);
  font-weight: 600;
}

.guest-notice__text span {
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
}

/* Find an order: the number and the e-mail, then always the same answer. */
.order-find [hidden] {
  display: none;
}

.order-find__form {
  display: grid;
  gap: 18px;
}

.order-find__fields.form-grid {
  margin-top: 0;
}

.auth .order-find__fields {
  grid-template-columns: minmax(0, 1fr);
}

.auth .order-find__submit {
  width: 100%;
}

.order-find__submit {
  justify-self: start;
}

.order-find__sent {
  display: grid;
  gap: 10px;
  justify-items: start;
  animation: auth-open 0.2s ease;
}

.order-find__sent strong {
  font-size: var(--text-title);
  font-weight: 600;
}

.order-find__sent p {
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
  font-weight: 400;
  line-height: 1.5;
}

.claim__account {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-line-soft);
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
  line-height: 1.5;
}

.form-panel .order-find {
  margin-top: 20px;
}

/* Two-factor sign-in: one dialog in steps, the way, its check and the recovery codes. */
.twofactor-modal {
  max-width: 560px;
}

.twofactor-step {
  display: grid;
  gap: 14px;
  animation: auth-open 0.2s ease;
}

.twofactor-step[hidden] {
  display: none;
}

.twofactor-app {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.twofactor-app__qr {
  width: 132px;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
}

.twofactor-app__key {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.twofactor-app__key code {
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.twofactor-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--color-canvas);
  list-style: none;
}

.twofactor-codes code {
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.twofactor-codes__actions,
.settings-row__actions {
  display: flex;
  flex: none;
  gap: 8px 16px;
}

@media (max-width: 640px) {
  .twofactor-app {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }
}

/* B2B account request: the consent and the sending at the end, the same answer after it. */
.request-form {
  margin-top: 0;
}

.request-form__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--color-line);
}

.request-sent {
  display: grid;
  gap: 12px;
  justify-items: start;
  animation: auth-open 0.2s ease;
}

.request-sent p {
  max-width: 560px;
  color: var(--color-fg-muted);
  font-size: var(--text-ui);
  font-weight: 400;
  line-height: 1.55;
}

.request-benefits {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.request-benefits li {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: var(--text-ui);
}

.request-benefits .icon {
  width: 16px;
  height: 16px;
  color: var(--color-success);
}

/* A step confirmed by a code: first the question, then the six boxes in the same dialog. */
.step-confirm__code {
  display: grid;
  gap: 14px;
  margin-top: 6px;
  animation: auth-open 0.2s ease;
}

.step-confirm [hidden] {
  display: none;
}

/* Cookie banner: a card bottom left that does not block the page. Rejecting is as large and as
   easy as accepting, the custom choice opens the dialog. */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 70;
  display: grid;
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-lift);
  animation: cookie-in 0.24s ease;
}

.cookie-banner[hidden] {
  display: none;
}

/* While the settings or any other dialog is open, the banner steps aside and comes back after,
   if no choice was saved. */
.cookie-banner {
  transition:
    opacity 0.16s ease,
    visibility 0.16s ease;
}

body:has(.modal__overlay[data-open]) .cookie-banner {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.cookie-banner[data-leaving] {
  animation: cookie-out 0.2s ease forwards;
}

@keyframes cookie-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes cookie-out {
  to {
    opacity: 0;
    transform: translateY(12px);
  }
}

.cookie-banner__head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cookie-banner__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-brand) 10%, var(--color-surface));
  color: var(--color-brand);
}

.cookie-banner__icon .icon {
  width: 16px;
  height: 16px;
}

.cookie-banner__title {
  font-size: var(--text-title);
  font-weight: 600;
}

.cookie-banner__text {
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
  font-weight: 400;
  line-height: 1.5;
}

.cookie-banner__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cookie-banner__actions .button {
  width: 100%;
}

/* A text action without a border or fill: on hover only the colour changes. */
.cookie-banner__custom {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-self: center;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--color-fg-muted);
  font-family: var(--font-sans);
  font-size: var(--text-ui-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-state);
}

.cookie-banner__custom:hover {
  color: var(--color-brand);
}

.cookie-banner__custom .icon {
  width: 14px;
  height: 14px;
}

.cookie-modal {
  max-width: 600px;
}

.cookie-groups {
  display: grid;
  margin-top: 12px;
}

.cookie-group {
  border-top: 1px solid var(--color-line-soft);
}

.cookie-group__row {
  padding-bottom: 6px;
  border-top: 0;
}

.cookie-group__details summary {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding-bottom: 12px;
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  transition: var(--transition-state);
}

.cookie-group__details summary::-webkit-details-marker {
  display: none;
}

.cookie-group__details summary:hover {
  color: var(--color-brand);
}

.cookie-group__details summary .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.16s ease;
}

.cookie-group__details[open] summary .icon {
  transform: rotate(180deg);
}

.cookie-list {
  display: grid;
  gap: 8px;
  padding-bottom: 14px;
  animation: auth-open 0.2s ease;
}

.cookie-list li {
  display: grid;
  gap: 2px;
}

.cookie-list code {
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
  font-weight: 600;
}

.cookie-list span {
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
  font-weight: 400;
}

.cookie-modal__footer {
  padding-top: 16px;
  border-top: 1px solid var(--color-line-soft);
}

/* The current choice on the cookies page. */
.cookie-state {
  display: grid;
  margin: 12px 0 8px;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  list-style: none;
}

.cookie-state__item {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 10px 14px;
  border-top: 1px solid var(--color-line-soft);
}

.cookie-state__item:first-child {
  border-top: 0;
}

.cookie-state__item strong {
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
  font-weight: 600;
  text-transform: uppercase;
}

.cookie-state__item[data-on] strong {
  color: var(--color-success);
}

.cookie-state__date {
  color: var(--color-fg-muted);
  font-size: var(--text-ui-sm);
}

.shop-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  justify-content: space-between;
}

.shop-footer__cookies {
  color: var(--color-on-ink-muted);
  text-decoration: none;
  transition: var(--transition-state);
}

.shop-footer__cookies:hover {
  color: var(--color-on-ink);
}

.auth-page__foot {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

@media (max-width: 640px) {
  .cookie-banner {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
  }
}

@media (max-width: 960px) {
  .billing-card__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .account__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  /* On a phone the menu of the account is a row to scroll, the sign-out stays in the header. */
  .account-nav {
    position: static;
    margin-inline: -16px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .account-nav__list {
    display: flex;
    gap: 4px;
    padding-inline: 16px;
  }

  .account-nav__logout {
    display: none;
  }

  .account-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .account {
    padding-top: 16px;
  }

  .account__title {
    font-size: var(--text-heading-lg);
  }

  .account-task {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .account-task__actions {
    grid-column: 1 / -1;
  }

  .account-task__actions .button {
    flex: 1;
  }

  .account-addresses {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-orders__search {
    width: 100%;
  }

  .order-detail__actions .button {
    flex: 1;
  }

  .order-progress {
    padding-inline: 8px;
  }

  .order-progress__label {
    font-size: var(--text-ui-sm);
  }

  .order-return {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .guest-notice {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .guest-notice__login {
    grid-column: 1 / -1;
    width: 100%;
  }

  .order-return .button {
    grid-column: 1 / -1;
  }

  .order-pay__transfer {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-pay__transfer .order-payment__qr {
    width: 140px;
    justify-self: center;
  }

  .order-pay__actions .button {
    width: 100%;
  }

  .return-item {
    grid-template-columns: auto 48px minmax(0, 1fr);
  }

  .return-item .cart-item__image {
    width: 48px;
  }

  .return-item__pieces {
    grid-column: 3;
  }

  .return-form__footer .button {
    width: 100%;
  }

  .account-claim-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .billing-card__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-row {
    flex-wrap: wrap;
  }

  .settings-row--switch {
    flex-wrap: nowrap;
  }

  .account-claim-row__action {
    position: static;
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    margin: 0 18px 16px;
  }
}

@media (max-width: 640px) {
  .auth-page {
    padding: 24px 16px;
  }

  .auth__card {
    padding: 24px 20px;
  }

  .auth-code__digits {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 4px repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .auth-account[data-locked] {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-account[data-locked] .auth-account__locked {
    padding: 0 16px 14px 74px;
  }
}

/* Průchod košíkem: parts for one kind of visitor. A guest gets the sign-in and the plain form,
   a signed-in visitor the saved addresses, a company its billing and the invoice. */
html[data-account] [data-when="guest"],
html:not([data-account]) [data-when="signed"],
html:not([data-account-kind="b2b"]) [data-when="b2b"],
html[data-account-kind="b2b"] [data-when="person"] {
  display: none !important;
}

/* A company pays by invoice first, the other payments follow. */
html[data-account-kind="b2b"] .checkout-choices [data-when="b2b"] {
  order: -1;
}

.cart-account {
  margin: 18px 0 22px;
}

.cart-account[data-tone="success"] {
  --task: var(--color-success);
}

/* The billing of a company comes from the account, the order only shows it. */
.cart-billing {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-canvas);
}

.cart-billing__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-fg);
}

.cart-billing__icon .icon {
  width: 18px;
  height: 18px;
}

.cart-billing__text {
  display: grid;
  gap: 4px;
}

.cart-billing__lines {
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
  line-height: 1.6;
  white-space: pre-line;
}

.cart-billing__edit {
  font-size: var(--text-ui-sm);
  font-weight: 600;
}

@media (max-width: 640px) {
  .cart-billing {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .cart-billing__edit {
    grid-column: 2;
  }
}
