/* Orders as a list of cards: "Your orders" on the account page, and the Order Board
   (Phase 2, steps 2 and 3). The state is in words, with an icon, as well as colour. */

.order-list { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }

.order-list__order {
  padding: var(--space-3);
  background: var(--surface-sunk);
  border-radius: var(--radius);
}

.order-list__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.order-list__top a,
.order-list__top strong { font-weight: 800; overflow-wrap: anywhere; }
.order-list__top a { padding-block: .6rem; } /* a bigger tap area */

.order-state {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .6rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 800;
}

.order-state svg { width: 1.1em; height: 1.1em; flex: none; }
.order-state--sent { color: var(--text); background: var(--info-bg); }
.order-state--good { color: var(--success-text); background: var(--success-bg); }
.order-state--stopped { color: var(--danger-text); background: var(--danger-bg); }

.order-list__when { margin: var(--space-1) 0 var(--space-2); color: var(--text-muted); font-size: var(--fs-sm); font-weight: 700; }
.order-list__items { display: grid; gap: var(--space-1); margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); }
.order-list__items li { display: flex; justify-content: space-between; gap: var(--space-3); }
.order-list__items span:first-child { min-width: 0; overflow-wrap: anywhere; }
.order-list__items span:last-child { white-space: nowrap; }
.order-list__choices { display: block; color: var(--text-muted); font-size: var(--fs-xs); font-weight: 700; }
.order-list__total { margin: var(--space-2) 0 0; font-weight: 800; }
/* A completed order's "Receipt" button (seller tools, step T10b). */
.order-list__receipt { margin-top: var(--space-2); }
.order-list__again { margin-top: var(--space-2); }
.order-list__receipt + .order-list__again { margin-left: var(--space-2); }
.order-list__why { margin: var(--space-1) 0 0; font-size: var(--fs-sm); overflow-wrap: anywhere; }

/* After the seller accepts: where to get the food, and how to pay. */
.order-list__next {
  display: grid;
  gap: var(--space-1);
  margin-top: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border-radius: var(--radius-sm);
}
.order-list__info { margin: 0; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.order-list__fine { margin: var(--space-2) 0 0; color: var(--text-muted); font-size: var(--fs-sm); }
.order-list__next .order-list__fine { margin: 0; }

/* Buttons and short forms on a card (cancel, accept, decline). */
.order-list__cancel,
.order-list__actions { margin-top: var(--space-3); }
.order-list__cancel-form,
.order-list__form { display: grid; gap: var(--space-2); }
.order-list__cancel-form .field__hint,
.order-list__form .field__hint { margin: 0; }
.order-list__buttons { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.order-list__buttons .btn { flex: 1 1 10rem; }

/* Thank-you stickers (Trina, 17 Oct 2026): the seller's "Say thanks with a sticker" on a
   completed order, and the customer's line about it. */
.thanks { display: grid; gap: var(--space-2); margin-top: var(--space-3); }
.thanks__open { justify-self: start; }
.thanks__choices { display: grid; gap: var(--space-2); }
.thanks__choices[hidden] { display: none; }
.thanks__lead { margin: 0; font-size: var(--fs-sm); }
.thanks__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); max-width: 26rem; margin: 0; padding: 0; list-style: none; }
.page__body .thanks__list { padding: 0; } /* beats ".page__body ul" */
.page__body .thanks__list li + li { margin-top: 0; }
.thanks__pick {
  display: grid;
  justify-items: center;
  gap: var(--space-1);
  width: 100%;
  min-height: var(--tap);
  padding: var(--space-2) var(--space-1);
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--outline);
  border-radius: var(--radius);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 800;
  overflow-wrap: normal;
  cursor: pointer;
}
.thanks__pick:hover:not(:disabled) { background: var(--surface-sunk); }
.thanks__pick:disabled { opacity: .6; cursor: progress; }
.thanks__picture { width: min(3.5rem, 100%); height: auto; aspect-ratio: 1; }
.thanks__sent, .thanks__got {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 800;
}
.thanks__mini { flex: none; width: 2rem; height: 2rem; }
.thanks__got a { font-weight: 800; }
/* "Add to calendar" on an accepted order (25 Oct 2026). */
.order-list__calendar { margin-top: var(--space-2); }
