/* Vzhled podle surtep.cz (barvy a písma šablony Shoptetu). Barvy lze upravit v proměnných níže. */
:root {
  --accent: #4d6efc;
  --accent-2: #33deff;
  --accent-soft: #eef1ff;
  --accent-text: #fff;
  --text: #1d2433;
  --muted: #6b7385;
  --line: #e4e7ef;
  --field-bg: #f5f6f8;
  --error: #d62d2d;
  --ok: #1fae74;
  --warn-bg: #fff6ec;
  --warn-line: #f6dfc6;
  --warn-ink: #c2640e;
  --font: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Exo 2", var(--font);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 4px;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  /* Průhledné, aby kolem karty prosvítalo pozadí stránky v Shoptetu */
  background: transparent;
}

svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.card {
  position: relative;
  max-width: 720px;
  padding: 32px;
  background: linear-gradient(160deg, #f7f8ff 0, #fff 45%);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
}
@media (max-width: 560px) { .card { padding: 20px 16px; border-radius: 16px; } }

h1, h2, h3, legend { font-family: var(--font-head); color: var(--text); }
.head h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.2; font-weight: 700; }
.head p { margin: 0 0 20px; color: var(--muted); }

/* Ukazatel postupu */
.progress { margin-bottom: 28px; }
.progress-bar { height: 10px; background: var(--accent-soft); border-radius: 99px; overflow: hidden; }
.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: inherit;
  transition: width .5s var(--ease);
}
.progress-text { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 0; font-size: 14px; color: var(--muted); }
#progress-pct { font-family: var(--font-head); font-weight: 700; color: var(--accent); }
.progress.is-done .progress-bar span { background: linear-gradient(90deg, var(--ok), #5fe0a8); }
.progress.is-done #progress-msg, .progress.is-done #progress-pct { color: var(--ok); font-weight: 600; }

/* Kroky */
.step { display: flex; align-items: center; gap: 10px; margin: 8px 0 16px; padding: 0; font-size: 20px; font-weight: 700; }
.step-num {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 50%;
}
#rest .step { margin-top: 32px; }
#rest > .step:first-child { margin-top: 28px; }

/* Výběr tématu jako karty */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.topics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.topic-wide { grid-column: 1 / -1; }
@media (max-width: 520px) { .topics { grid-template-columns: 1fr; } }
.topic {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .2s;
}
.topic:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -20px rgba(29, 36, 51, .45); border-color: transparent; }
.topic input { position: absolute; opacity: 0; pointer-events: none; }
.topic-icon {
  flex: 0 0 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 50%;
  transition: background .2s, color .2s, transform .4s var(--ease);
}
.topic-text { display: flex; flex-direction: column; line-height: 1.3; }
.topic-text strong { font-weight: 600; }
.topic-text small { color: var(--muted); font-size: 13px; }
.topic:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 14px 28px -22px rgba(77, 110, 252, .8); }
.topic:has(input:checked) .topic-icon { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; transform: rotate(-8deg) scale(1.05); }
.topic:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Pole */
.field { position: relative; margin-bottom: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.row.wide-narrow { grid-template-columns: 2fr 1fr; }
@media (max-width: 520px) { .row, .row.wide-narrow { grid-template-columns: 1fr; } }

label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.req { color: var(--error); }
.opt { color: var(--muted); font-weight: 400; font-size: 0.9em; }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: inherit;
  background: var(--field-bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(77, 110, 252, .18);
}
[aria-invalid="true"] { border-color: var(--error); background: #fff7f7; }
textarea { resize: vertical; }

/* Zelená fajfka u správně vyplněného pole */
.field.is-valid input, .field.is-valid textarea { padding-right: 40px; border-color: #bfe8d6; }
.field.is-valid::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 38px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E") center/14px no-repeat;
  animation: pop .35s var(--ease);
}
@keyframes pop { from { transform: scale(0); } 70% { transform: scale(1.2); } to { transform: scale(1); } }

.check { display: flex; align-items: center; gap: 10px; font-weight: 400; cursor: pointer; margin-bottom: 16px; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }

.hint { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.error { margin: 6px 0 0; font-size: 14px; color: var(--error); }
.error:empty { display: none; }
.form-error { margin-bottom: 12px; }

h3.section { margin: 24px 0 12px; font-size: 18px; font-weight: 700; }

/* Upozornění, vzhledem jako box „Máte dotaz k danému produktu?“ na webu */
.notice {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border-radius: 8px;
  font-size: 15px;
}
.notice-icon { display: flex; gap: 14px; align-items: flex-start; }
.notice-icon svg { flex: 0 0 28px; width: 28px; height: 28px; color: var(--accent); }
.notice-icon p { margin: 0; }
.notice-warn { background: var(--warn-bg); border: 1px solid var(--warn-line); }
.notice-warn svg { color: var(--warn-ink); }

/* Tlačítka jako „Přidat do košíku“ */
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font: inherit;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  color: var(--accent-text);
  text-decoration: none;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border: 0;
  border-radius: 4px;
  box-shadow: 0 10px 24px -12px rgba(77, 110, 252, .7);
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s, filter .2s;
}
button:hover, .button:hover { transform: translateY(-1px); filter: brightness(1.05); }
button:disabled { opacity: .6; cursor: wait; transform: none; }
button svg, .button svg { width: 20px; height: 20px; }
#submit { width: 100%; }
#submit.is-ready { animation: ready 1.8s ease-in-out infinite; }
@keyframes ready {
  0%, 100% { box-shadow: 0 10px 24px -12px rgba(77, 110, 252, .7), 0 0 0 0 rgba(51, 222, 255, .45); }
  50% { box-shadow: 0 10px 24px -12px rgba(77, 110, 252, .7), 0 0 0 8px rgba(51, 222, 255, 0); }
}
button.secondary, .button.secondary { color: var(--accent); background: #fff; border: 1px solid var(--accent); box-shadow: none; }

.turnstile { margin-bottom: 16px; min-height: 65px; }

.privacy { margin: 12px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.privacy a { color: inherit; }

/* Vrácení a reklamace */
.returns { margin-top: 24px; }
.returns h2 { margin: 0 0 8px; font-size: 22px; }
.returns > p { margin: 0 0 16px; color: var(--muted); }
.returns-steps { list-style: none; counter-reset: s; margin: 0 0 20px; padding: 0; }
.returns-steps li {
  counter-increment: s;
  position: relative;
  margin-bottom: 12px;
  padding: 14px 16px 14px 60px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.returns-steps li::before {
  content: counter(s);
  position: absolute;
  left: 16px;
  top: 14px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 50%;
}
.returns-steps strong { display: block; }
.download {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 16px 10px 12px;
  color: var(--accent);
  text-decoration: none;
  background: var(--accent-soft);
  border: 1px solid transparent;
  border-radius: 10px;
  transition: border-color .2s, transform .2s var(--ease);
}
.download:hover { border-color: var(--accent); transform: translateY(-1px); }
.download svg { flex: 0 0 28px; width: 28px; height: 28px; }
.download span { display: flex; flex-direction: column; line-height: 1.25; }
.download small { color: var(--muted); font-size: 13px; }
.returns-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 12px; }
.nowrap { white-space: nowrap; }

/* Sídlo společnosti a mapa */
.company {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 28px;
  padding-top: 20px;
  font-size: 14px;
  border-top: 1px solid var(--line);
}
@media (max-width: 600px) { .company { grid-template-columns: 1fr; } }
.company-info { display: flex; gap: 14px; align-items: flex-start; font-style: normal; }
.company-info svg { flex: 0 0 28px; width: 28px; height: 28px; color: var(--accent); }
.company-info strong { display: block; margin-bottom: 6px; font-family: var(--font-head); font-size: 15px; }
.company-info .company-sub { margin-top: 14px; }
.bank dd { font-variant-numeric: tabular-nums; }
.bank dt:nth-of-type(3), .bank dt:nth-of-type(3) + dd { margin-top: 6px; }
.company dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; margin: 0; }
.company dt { color: var(--muted); }
.company dd { margin: 0; }
@media (max-width: 400px) { .company dl { grid-template-columns: 1fr; } .company dd { margin-bottom: 4px; } .bank dt:nth-of-type(3) + dd { margin-top: 0; } }
.company-map { margin: 0; }
.company-map iframe { display: block; width: 100%; height: 200px; border: 1px solid var(--line); border-radius: 14px; }
.company-map figcaption { display: flex; gap: 16px; margin-top: 6px; }
.company-map a { color: var(--accent); font-weight: 600; text-decoration: none; }
.company-map a:hover { text-decoration: underline; }

/* Poděkování */
#thanks { position: relative; padding: 24px 0 8px; text-align: center; }
#thanks h2 { margin: 16px 0 8px; font-size: 26px; }
#thanks p { margin: 0 0 24px; color: var(--muted); }
.thanks-badge {
  width: 84px;
  height: 84px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--ok), #5fe0a8);
  border-radius: 50%;
  box-shadow: 0 18px 40px -18px rgba(31, 174, 116, .8);
  animation: pop .5s var(--ease);
}
.thanks-badge svg { width: 44px; height: 44px; stroke-width: 2.6; }
.confetti {
  position: absolute;
  top: 0;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  pointer-events: none;
  animation: fall 1.8s ease-in forwards;
}
@keyframes fall {
  from { transform: translate(0, -20px) rotate(0); opacity: 1; }
  to { transform: translate(var(--drift), 320px) rotate(var(--spin)); opacity: 0; }
}

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

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

[hidden] { display: none !important; }
