/* Portál pre hostí – hlavné farby sa nastavujú v config.php (brand.accent ...) */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --ink: #17201e;
  --muted: #5d6967;
  --line: #d5dddb;
  --card: #ffffff;
  --radius: 18px;
  --error: #b42318;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}

html, body { margin: 0; min-height: 100%; }

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: var(--page-bg);
  background-size: cover;
  background-position: center;
  line-height: 1.5;
}
body:not(.has-photo) {
  background-image:
    radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--accent) 16%, transparent) 0 22%, transparent 55%),
    radial-gradient(circle at 90% 95%, color-mix(in srgb, var(--accent) 12%, transparent) 0 18%, transparent 50%);
}
body.has-photo::before {
  content: ""; position: fixed; inset: 0;
  background: rgba(10, 16, 15, .45);
}

.card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px 28px 22px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 18px 48px -18px rgba(16, 40, 36, .35);
}

.brand { margin-bottom: 22px; }
.logo { display: block; max-height: 52px; max-width: 220px; }
.wordmark { font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; color: var(--accent); }

h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 6px; letter-spacing: -.02em; }
.lead { margin: 0 0 18px; color: var(--muted); }
.muted { color: var(--muted); font-size: .92rem; }
a { color: var(--accent); }

.ssid {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 18px; padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, white);
  color: color-mix(in srgb, var(--accent) 80%, black);
  font-size: .85rem; font-weight: 600;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.alert {
  border-radius: 10px; padding: 10px 14px; margin-bottom: 16px;
  background: #fdecea; color: var(--error); font-size: .92rem;
}
.alert p { margin: 0; }
.alert p + p { margin-top: 4px; }
.alert.info { background: #f1f5f4; color: var(--muted); }

.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field input {
  width: 100%; font: inherit; font-size: 16px;   /* 16px = iPhone nezoomuje */
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fbfcfc; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
  outline: none; border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.terms { margin: 4px 0 10px; font-size: .88rem; color: var(--muted); }
.terms summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.terms p { margin: 8px 0 0; padding: 10px 12px; background: #f6f8f8; border-radius: 8px; }

.check-row { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 18px; font-size: .92rem; cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }

button {
  width: 100%; font: inherit; font-weight: 600; font-size: 1.02rem;
  padding: 14px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--accent); color: var(--accent-text);
  transition: filter .15s, transform .05s;
}
button:hover { filter: brightness(1.08); }
button:active { transform: translateY(1px); }

.done { text-align: center; padding: 8px 0 4px; }
.check {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, white); color: var(--accent);
}
.check svg { width: 34px; height: 34px; }

footer {
  margin-top: 22px; padding-top: 14px; border-top: 1px solid #edf1f0;
  font-size: .78rem; color: var(--muted); text-align: center;
}

@media (prefers-color-scheme: dark) {
  :root:not(.light-only) { --ink: #e8eeec; --muted: #9aa8a5; --line: #34403d; --card: #182120; }
  html:not(.light-only) body:not(.has-photo) { background-color: #0e1413; }
  html:not(.light-only) .field input { background: #121a19; }
  html:not(.light-only) .field input:focus { background: #121a19; }
  html:not(.light-only) .terms p, html:not(.light-only) .alert.info { background: #121a19; }
  html:not(.light-only) .ssid, html:not(.light-only) .check { background: color-mix(in srgb, var(--accent) 22%, #182120); color: #d6f2ec; }
  html:not(.light-only) footer { border-color: #26302e; }
  html:not(.light-only) .alert { background: #3a1814; color: #ffb4a8; }
}
