/* Cookie consent banner and the legal pages. Shared by every page (app.css and order.css). */

.consent {
  position: fixed;
  inset-inline: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 50;
  max-width: 420px;
  margin-inline-start: auto; /* the left corner (inline end), clear of the page's centre */
  padding: var(--space-lg);
  background: var(--color-paper);
  color: var(--color-ink);
  border: 1px solid var(--color-stroke);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-float);
  font-size: var(--text-sm);
  line-height: 1.55;
}
.consent[hidden] { display: none; }
.consent p { margin: 0 0 var(--space-md); padding-inline-end: var(--space-xl); }
.consent a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.consent-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-sm); }
.consent-actions button {
  min-height: 44px;
  border: 1px solid var(--color-ink);
  border-radius: 999px;
  background: transparent;
  color: var(--color-ink);
  font: inherit;
  font-weight: var(--weight-strong);
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.consent-actions button:active, .footer-links a:active, .footer-link:active { opacity: 0.7; }
.consent-actions button:hover { background: var(--color-ink); color: var(--color-paper); }
.consent-close {
  position: absolute;
  top: var(--space-xs);
  inset-inline-end: var(--space-xs);
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--color-muted);
  font-size: var(--text-lg);
  line-height: 1;
  cursor: pointer;
}
.consent button:focus-visible,
.footer-link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

.footer-links { display: flex; flex-wrap: wrap; gap: 0 var(--space-lg); }
.footer-links a,
.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.22em;
  white-space: nowrap;
  cursor: pointer;
}
.footer-links a:hover, .footer-link:hover { color: var(--color-accent); }
.footer-link[hidden] { display: none; }

.legal { max-width: calc(72ch + 2 * var(--gutter)); padding-block: var(--space-3xl) var(--space-2xl); line-height: 1.7; }
.legal h1 { font-size: var(--text-display-s); max-width: 24ch; margin: 0 0 var(--space-lg); }
.legal h2 { font-size: var(--text-title); margin: var(--space-2xl) 0 var(--space-sm); padding-top: var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); }
.legal h3 { font-family: var(--font-body); font-weight: var(--weight-strong); font-size: var(--text-md); letter-spacing: 0; margin: var(--space-lg) 0 var(--space-xs); }
.legal p, .legal li { margin: 0 0 var(--space-sm); max-width: 72ch; }
.legal ul { padding-inline-start: var(--space-lg); margin: 0 0 var(--space-md); }
.legal table { width: 100%; border-collapse: collapse; margin: var(--space-xs) 0 var(--space-lg); font-size: var(--text-sm); }
.legal th, .legal td { border-bottom: var(--rule-hair) solid var(--color-rule); padding: var(--space-xs); text-align: start; vertical-align: top; }
.legal th { font-weight: var(--weight-strong); white-space: nowrap; }
.legal .clause { font-variant-numeric: tabular-nums; margin-inline-end: var(--space-2xs); }
.legal a { color: inherit; text-decoration: underline; text-underline-offset: 0.22em; }
@media (max-width: 40rem) {
  .legal table, .legal tbody, .legal tr, .legal td, .legal th { display: block; }
  .legal tr { border-bottom: var(--rule-hair) solid var(--color-rule); padding-block: var(--space-xs); }
  .legal td, .legal th { border: 0; padding: var(--space-3xs) 0; white-space: normal; }
}

/* Order page: the legal notices and the terms checkbox above the order button. */
.order-facts { margin: var(--space-xs) 0; }
.order-facts a, .terms-accept a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.terms-accept { display: flex; gap: var(--space-sm); align-items: flex-start; margin: var(--space-md) 0 var(--space-xs); font-size: var(--text-sm); line-height: 1.5; cursor: pointer; }
.terms-accept input { width: 20px; height: 20px; margin: var(--space-3xs) 0 0; flex: none; accent-color: var(--color-ink); }
