:root {
  --blue: #2b3a8f;
  --red: #e2433b;
  --text: #1d2233;
  --muted: #5b6275;
  --border: #cfd4e2;
  --bg: #f5f6fa;
  --error: #b3261e;
  --ok-bg: #eaf6ee;
  --ok-border: #2e7d4f;
  --warn-bg: #fff6dd;
  --warn-border: #c98a00;
  /* Overridden by a brand's brand.css (brands/<key>/static/). */
  --blue-tint: #eef0fa;
  --button-bg: var(--red);
  --button-text: #fff;
  --header-bg: #fff;
  --header-border: var(--red);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--blue); }

.eshop-bar {
  background: var(--blue);
  padding: 6px 16px;
  font-size: 0.9rem;
}
.eshop-bar-inner { max-width: 640px; margin: 0 auto; }
.eshop-bar a { color: #fff; text-decoration: none; }
.eshop-bar a:hover { text-decoration: underline; }

.site-header {
  background: var(--header-bg);
  border-bottom: 3px solid var(--header-border);
  padding: 12px 16px;
  text-align: center;
}

.logo { height: 48px; width: auto; }

.language-switcher { padding: 6px 16px 0; font-size: 0.9rem; }
.language-switcher-inner { max-width: 640px; margin: 0 auto; display: flex; justify-content: flex-end; gap: 12px; }
.language-switcher span { font-weight: 700; }

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

h1 { font-size: 1.5rem; color: var(--blue); margin: 0.5rem 0 1rem; }

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

fieldset {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin: 0 0 16px;
}

legend {
  font-weight: 700;
  color: var(--blue);
  padding: 0 6px;
}

.field { margin-bottom: 14px; }
.field[hidden] { display: none; }

label { display: block; font-weight: 600; margin-bottom: 4px; }

.optional { font-weight: 400; color: var(--muted); font-size: 0.9em; }

input[type="text"], input[type="email"], input[type="number"], input[type="date"],
input[type="tel"], input[type="password"], input[type="file"], select {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  min-height: 44px;
}

input:focus, select:focus { outline: 2px solid var(--blue); outline-offset: 1px; }

/* Receipt upload: the native file input covers the whole drop area (click and drop work without JS). */
.dropzone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 8px;
  background: var(--bg);
  padding: 28px 16px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--blue); background: var(--blue-tint); }
.dropzone:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.dropzone.has-file { border-style: solid; border-color: var(--ok-border); background: var(--ok-bg); }
.has-error .dropzone { border-color: var(--error); }
.dropzone-text { margin: 0; color: var(--text); }
.dropzone-touch { display: none; }
.dropzone-file { margin: 8px 0 0; font-weight: 600; color: var(--ok-border); word-break: break-all; }
@media (hover: none) {
  .dropzone-pointer { display: none; }
  .dropzone-touch { display: inline; }
}

.field ul { list-style: none; margin: 0; padding: 0; }
.field ul label { font-weight: 400; display: flex; gap: 8px; align-items: center; min-height: 36px; }
.field ul input { width: 20px; height: 20px; }

.row { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 520px) { .row { grid-template-columns: 1fr 1fr; } }
.row[hidden] { display: none; }

.check { display: grid; grid-template-columns: 24px 1fr; gap: 8px; margin-bottom: 12px; align-items: start; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; }
.check label { font-weight: 400; margin: 0; }
.check .help, .check .error { grid-column: 2; }
/* Honeypot field: off screen rather than display:none, which some bots skip. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.help { color: var(--muted); font-size: 0.9rem; margin: 4px 0 0; }
.error { color: var(--error); font-size: 0.9rem; margin: 4px 0 0; }
.has-error input, .has-error select { border-color: var(--error); }

.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; }
.alert-error { background: #fdecea; border: 1px solid var(--error); color: var(--error); }
.alert-info { background: var(--blue-tint); border: 1px solid var(--blue); color: var(--blue); }

.preview {
  background: var(--ok-bg);
  border-left: 4px solid var(--ok-border);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 0 0 14px;
}
.preview p { margin: 4px 0; }

.date-check {
  background: var(--warn-bg);
  border-left: 4px solid var(--warn-border);
  border-radius: 6px;
  padding: 10px 14px 2px;
  margin: -6px 0 14px;
}
.date-check p { margin: 0 0 10px; }
.date-check .check { margin-bottom: 8px; }
.date-check .check label { font-weight: 700; }

.button {
  display: block;
  width: 100%;
  font: inherit;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--button-text);
  background: var(--button-bg);
  border: 0;
  border-radius: 10px;
  padding: 14px;
  min-height: 52px;
  cursor: pointer;
}
.button:hover { filter: brightness(0.95); }
.button-link { text-align: center; text-decoration: none; margin-top: 24px; }
.button-secondary {
  color: var(--blue);
  background: #fff;
  border: 2px dashed var(--border);
  font-size: 1rem;
  min-height: 48px;
  padding: 10px;
}
.button-secondary:hover { border-color: var(--blue); background: var(--blue-tint); filter: none; }
.button[hidden] { display: none; }

/* Mattress rows of the registration form. */
.items-help { margin: 0 0 12px; }
.item + .item { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 4px; }
.item-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.item-head[hidden] { display: none; }
.item-title { font-size: 1rem; color: var(--blue); margin: 0 0 8px; }
.link-button {
  font: inherit;
  font-size: 0.9rem;
  color: var(--error);
  background: none;
  border: 0;
  padding: 4px 0;
  text-decoration: underline;
  cursor: pointer;
}
.link-button[hidden] { display: none; }
.row-quantity { grid-template-columns: 7rem 1fr; align-items: end; }
.row-quantity .field { margin-bottom: 0; }
.item-help { margin: 4px 0 14px; }

.summary {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
}
.summary dt { color: var(--muted); }
.summary dd { margin: 0; }
.summary + .summary { margin-top: 12px; }
.summary .number { font-size: 1.3rem; font-weight: 700; letter-spacing: 0.05em; }

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 16px;
}
.site-footer p { margin: 4px 0; }

.qr { background: #fff; display: inline-block; padding: 8px; border: 1px solid var(--border); border-radius: 8px; }
.qr svg { display: block; width: 200px; height: auto; }
code { background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; }
