/* ── CSS VÁLTOZÓK (kampányonként felülíródnak JS-ből) ── */
:root {
  --color-primary:   #E31937;
  --color-secondary: #FFFFFF;
  --color-accent:    #000000;
  --color-primary-dark: #c0101f;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  color: #222;
  font-size: 15px;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ── BETÖLTÉS ── */
#loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #eee;
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── HIBA KÉPERNYŐ ── */
#error-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.error-box {
  background: #fff;
  border-radius: 12px;
  padding: 48px 40px;
  text-align: center;
  max-width: 440px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
#error-msg { white-space: pre-line; }

.error-icon { font-size: 48px; margin-bottom: 16px; }
.error-box h2 { margin-bottom: 10px; color: #333; }
.error-box p  { color: #666; line-height: 1.6; }

/* ── FEJLÉC ── */
.form-header {
  background: var(--color-primary);
  color: var(--color-secondary);
  padding: 18px 24px;
  text-align: center;
}

.brand-name {
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 0.03em;
}

/* ── LAYOUT ── */
.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.form-container {
  max-width: 560px;
  width: 100%;
  margin: 32px auto 48px;
  padding: 0 16px;
  flex: 1;
}

/* ── LÉPÉS JELZŐ ── */
.steps {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #aaa;
  font-weight: bold;
}

.step span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ddd;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.step.active {
  color: var(--color-primary);
}

.step.active span {
  background: var(--color-primary);
}

.step.done span {
  background: #4caf50;
}

.step.done {
  color: #4caf50;
}

.step-line {
  flex: 1;
  height: 2px;
  background: #ddd;
  margin: 0 8px;
}

/* ── LÉPÉS TARTALOM ── */
.step-content h2 {
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--color-accent);
}

.step-desc {
  color: #777;
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── MEZŐK ── */
.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 6px;
  color: #333;
}

.field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color .2s;
  background: #fff;
}

.field input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

.field input.error {
  border-color: #e53935;
}

.field input[readonly] {
  background: #f5f5f5;
  color: #555;
}

.field-row {
  display: flex;
  gap: 14px;
}

.field-row .field {
  flex: 1;
}

.field-hint {
  font-size: 12px;
  color: #999;
  margin-top: 5px;
}

.field-error {
  background: #fff0f0;
  border: 1px solid #fcc;
  color: #c00;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 8px;
}

.optional {
  font-weight: normal;
  color: #aaa;
  font-size: 13px;
}

/* ── KÓD BEVITEL ── */
.code-wrap {
  display: flex;
  gap: 10px;
}

.code-wrap input {
  flex: 1;
  font-family: monospace;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── TELEFON ── */
.phone-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: border-color .2s;
}

.phone-wrap:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

.phone-prefix {
  padding: 11px 12px;
  background: #f5f5f5;
  border-right: 1.5px solid #ccc;
  font-size: 15px;
  font-weight: bold;
  color: #555;
  flex-shrink: 0;
}

.phone-wrap input {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0;
  padding: 11px 14px;
  font-size: 15px;
  flex: 1;
}

.phone-wrap input:focus {
  outline: none;
}

/* ── NYEREMÉNY BOX ── */
.prize-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 2px solid var(--color-primary);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  animation: fadeIn .3s ease;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.prize-icon { font-size: 40px; }
.prize-label { font-size: 13px; color: #888; margin-bottom: 4px; }
.prize-name  { font-size: 20px; font-weight: bold; color: var(--color-accent); }
.prize-delivery { font-size: 13px; color: #555; margin-top: 6px; }
.prize-delivery .tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: bold;
}
.tag-post    { background: #e8f0fe; color: #1a56db; }
.tag-digital { background: #fef3c7; color: #92400e; }

/* ── CÍM SZEKCIÓ ── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 16px;
  font-weight: bold;
  font-size: 15px;
  color: #333;
}

.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

/* ── INFO BANNER ── */
.info-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #2e7d32;
  margin-bottom: 20px;
  gap: 10px;
}

/* ── ÖSSZEFOGLALÓ ── */
.summary-box {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.summary-section {
  padding: 18px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.summary-section:last-child { border-bottom: none; }

.summary-title {
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 4px 0;
  gap: 16px;
}

.summary-row span  { color: #777; flex-shrink: 0; }
.summary-row strong { color: #222; text-align: right; word-break: break-all; }

/* ── JOGI SZÖVEG ── */
.legal-block {
  margin-bottom: 24px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
}

.checkbox-label input[type=checkbox] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.checkbox-label a {
  color: var(--color-primary);
}

.legal-text {
  font-size: 12px;
  color: #aaa;
  line-height: 1.6;
  margin-top: 12px;
}

/* ── GOMBOK ── */
.btn-primary {
  background: var(--color-primary);
  color: var(--color-secondary);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: background .2s, transform .1s;
}

.btn-primary:hover   { background: var(--color-primary-dark); }
.btn-primary:active  { transform: scale(.98); }
.btn-primary:disabled { background: #ccc; cursor: not-allowed; }

.btn-primary.btn-full { width: 100%; margin-top: 4px; }

.btn-ghost {
  background: none;
  border: 1.5px solid #ccc;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  color: #555;
}

.btn-ghost:hover { background: #f5f5f5; }

.btn-text {
  background: none;
  border: none;
  color: #2e7d32;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

/* ── SIKER ── */
.success-wrap {
  text-align: center;
  padding: 32px 0;
}

.success-icon { font-size: 64px; margin-bottom: 20px; }

.success-wrap h2 {
  font-size: 22px;
  color: #2e7d32;
  margin-bottom: 12px;
}

.success-wrap p {
  color: #555;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.success-details {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e0e0e0;
  text-align: left;
  font-size: 14px;
  line-height: 1.8;
  color: #444;
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .field-row { flex-direction: column; gap: 0; }
  .code-wrap  { flex-direction: column; }
  .code-wrap input { font-size: 16px; }
  .btn-row { flex-direction: column-reverse; }
  .btn-ghost, .btn-primary { width: 100%; text-align: center; }
  .steps .step:not(.active) > span + * { display: none; }
}
