/*
 * Checkout styles. Served with SRI; no inline style is allowed by the CSP. The appearance of the
 * cashing front (colours, radius, font) comes from `/theme.css` as custom properties; the values
 * below are the defaults (tokens of AUD-GO §16.2).
 */
:root {
  color-scheme: light;
  --text: #3b3933;
  --muted: #6b6860;
  --background: #fffdf5;
  --surface: #ffffff;
  --primary: #ff8329;
  --primary-hover: #ff6b00;
  --field-background: #f2efe3;
  --field-border: #efebdd;
  --danger: #b42318;
  --radius: 16px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--background);
  line-height: 1.5;
}

.site-header,
.site-footer,
.checkout,
.card,
.test-notice {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px;
}

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

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.badge-test {
  margin: 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
}

.test-notice {
  color: var(--danger);
  font-weight: 600;
}

.card {
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  margin-top: 24px;
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 16px;
}

h2 {
  font-size: 1.125rem;
  margin: 0 0 12px;
}

h3 {
  font-size: 1rem;
  margin: 0 0 8px;
}

p {
  margin: 0 0 8px;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.875rem;
}

.columns {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .columns {
    grid-template-columns: 1fr 1fr;
  }
}

.summary,
.contact,
.member,
.payment,
.option {
  background: var(--surface);
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.lines {
  list-style: none;
  margin: 0;
  padding: 0;
}

.line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--field-border);
}

.line-quantity {
  color: var(--muted);
  font-size: 0.875rem;
}

.line-total {
  grid-column: 2;
  grid-row: 1;
  font-weight: 600;
}

.variant {
  color: var(--muted);
}

.totals {
  margin: 12px 0 0;
}

.total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
}

.total-row dt,
.total-row dd {
  margin: 0;
}

.grand-total {
  font-weight: 700;
  font-size: 1.125rem;
}

.tax,
.discount {
  color: var(--muted);
  font-size: 0.875rem;
}

.field {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.field-row {
  display: grid;
  gap: 12px;
}

@media (min-width: 480px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  font-size: 0.875rem;
  font-weight: 600;
}

input,
select {
  font: inherit;
  color: inherit;
  padding: 10px 12px;
  border: 1px solid var(--field-border);
  border-radius: calc(var(--radius) / 2);
  background: var(--field-background);
  width: 100%;
}

.card-fields {
  min-height: 220px;
  margin-bottom: 12px;
}

/* Apple Pay and Google Pay: the frame of the orchestrator, unusable until the terms are accepted. */
.wallets {
  margin-bottom: 16px;
}

.wallet-frame[inert] {
  opacity: 0.5;
}

.wallets-hint,
.wallets-or {
  margin: 8px 0 0;
  font-size: 0.875rem;
  text-align: center;
}

.terms {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.terms input {
  width: auto;
  margin-top: 4px;
}

button,
.button {
  font: inherit;
  cursor: pointer;
  border-radius: var(--radius);
  padding: 12px 20px;
  border: 1px solid transparent;
  text-decoration: none;
  display: inline-block;
}

.primary {
  width: 100%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
}

.primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.secondary,
.button {
  background: var(--surface);
  color: var(--text);
  border-color: var(--field-border);
}

.link {
  background: none;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  padding: 8px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.notice {
  color: var(--danger);
  font-weight: 600;
}

.form-message {
  color: var(--muted);
}

.option-actions {
  display: grid;
  gap: 8px;
}

.order-number strong {
  font-size: 1.25rem;
  letter-spacing: 0.05em;
}

.beacon {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.site-footer {
  color: var(--muted);
  font-size: 0.875rem;
}

.legal ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.legal a,
.support a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

/* Details typed at the cart (R56): a summary, the fields behind « Modifier ». */
.contact-recap {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.contact-recap div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 8px;
}

.contact-recap dt {
  color: var(--muted, inherit);
}

.contact-recap dd {
  margin: 0;
}

.contact-edit > summary {
  cursor: pointer;
  font-weight: 600;
}

.contact-edit[open] > summary {
  margin-bottom: 12px;
}
