/* Zwrot24 - neutralny, uniwersalny wyglad (docelowy projekt UX pozniej) */
:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --ink: #1b2430;
  --muted: #5a6575;
  --line: #dde2e9;
  --accent: #146c5f;
  --accent-ink: #ffffff;
  --accent-soft: #e3f1ee;
  --danger: #b42318;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151b;
    --surface: #1a2029;
    --ink: #e6eaf0;
    --muted: #9aa5b3;
    --line: #2b3440;
    --accent: #4dbba6;
    --accent-ink: #0d1a17;
    --accent-soft: #17302b;
    --danger: #f97066;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #11151b;
  --surface: #1a2029;
  --ink: #e6eaf0;
  --muted: #9aa5b3;
  --line: #2b3440;
  --accent: #4dbba6;
  --accent-ink: #0d1a17;
  --accent-soft: #17302b;
  --danger: #f97066;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.z-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.z-header, .z-main, .z-footer {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
}

.z-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 24px;
}

.z-logo {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.z-logo span { color: var(--accent); }

.z-main { flex: 1; }

.z-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.z-card + .z-card { margin-top: 16px; }

h1, h2 {
  margin: 0 0 12px;
  line-height: 1.25;
  text-wrap: balance;
}
h1 { font-size: 26px; }
h2 { font-size: 19px; }

p { margin: 0 0 12px; max-width: 65ch; }
.z-muted { color: var(--muted); }

.z-steps {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.z-steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
}
.z-steps .z-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}
.z-steps strong { display: block; }

.z-error-code {
  font-size: 44px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 12px;
}

.z-button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 8px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.z-footer {
  padding-top: 24px;
  padding-bottom: 32px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- strona zwrotu ---------- */
.z-eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.z-facts { margin: 16px 0 0; display: grid; gap: 10px; }
.z-facts div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; }
.z-facts dt { color: var(--muted); }
.z-facts dd { margin: 0; }
.z-total { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }

.z-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin-right: 8px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: 14px; vertical-align: 2px;
}
h3 { font-size: 16px; margin: 0 0 6px; }

.z-fieldset { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
.z-fieldset legend { font-weight: 600; margin-bottom: 10px; padding: 0; }
.z-hint { font-size: 14px; color: var(--muted); margin: 8px 0 12px; }

.z-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-bottom: 20px; }
.z-span-2 { grid-column: span 2; }
.z-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.z-field span { color: var(--muted); }
.z-field small { font-weight: normal; }
.z-narrow { max-width: 260px; margin-top: 10px; }
.z-field input, .z-field select {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%;
}
.z-field input:focus, .z-field select:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); }

.z-sizes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.z-size, .z-offer { position: relative; display: block; cursor: pointer; }
.z-size input, .z-offer input { position: absolute; opacity: 0; pointer-events: none; }
.z-size-body, .z-offer-body {
  display: flex; flex-direction: column; gap: 2px; height: 100%;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--surface);
}
.z-size input:checked + .z-size-body, .z-offer input:checked + .z-offer-body { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.z-size input:focus-visible + .z-size-body, .z-offer input:focus-visible + .z-offer-body { outline: 3px solid var(--accent); outline-offset: 2px; }
.z-size-code { font-size: 20px; font-weight: 700; }
.z-size-dims { font-size: 14px; font-variant-numeric: tabular-nums; }
.z-tag { margin-top: 6px; font-size: 12px; color: var(--accent); font-weight: 600; }

.z-offers { display: grid; gap: 10px; margin-bottom: 18px; }
.z-offer-body { flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.z-offer-label { font-weight: 600; }
.z-offer-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.z-offer.is-disabled { cursor: not-allowed; }
.z-offer.is-disabled .z-offer-body { opacity: 0.6; }

.z-option { margin: 0 0 18px; padding: 14px; border-radius: var(--radius); background: var(--bg); }
.z-check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 18px; font-size: 14px; }
.z-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); }

.z-alert { margin: 16px 0; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.z-alert-error { border-color: var(--danger); color: var(--danger); }

.z-cancel { margin-top: 16px; text-align: center; }
.z-link-button { background: none; border: 0; padding: 4px; font: inherit; font-size: 14px; color: var(--muted); text-decoration: underline; cursor: pointer; }

@media (max-width: 560px) {
  .z-grid, .z-sizes { grid-template-columns: 1fr; }
  .z-span-2 { grid-column: auto; }
  .z-facts div { grid-template-columns: 1fr; gap: 2px; }
  .z-card { padding: 22px 16px; }
}

.z-button:disabled { cursor: progress; opacity: 0.85; }
.z-button.is-loading::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: z-spin 0.7s linear infinite;
}
@keyframes z-spin { to { transform: rotate(360deg); } }

.z-button-secondary { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.z-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.z-pay { margin-top: 20px; }
.z-alert-progress { display: flex; align-items: center; gap: 10px; border-color: var(--accent); }
.z-spinner {
  flex: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--accent); border-right-color: transparent; animation: z-spin 0.7s linear infinite;
}

.z-sandbox { background: #b42318; color: #ffffff; text-align: center; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; padding: 8px 16px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
