/* ═══════════════════════════════════════
   DFS-Pridruži — Profil stranke styles
   Mobile-first, matches /cv/ visual language
   ═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --red: #EE1000;
  --red-dark: #c50d00;
  --red-light: #fff0ef;
  --cream: #F7EAE1;
  --cream-dark: #efe0d5;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --green: #10b981;
  --radius: 8px;
  --radius-lg: 12px;
}

body {
  font-family: 'Barlow', system-ui, sans-serif;
  background: var(--cream);
  color: var(--gray-900);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: 90px;
}

/* ═══ TRUST BANNER ═══ */
#trust-banner {
  background: var(--gray-900);
  color: var(--cream);
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
}

/* ═══ HEADER ═══ */
#header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.header-logo { height: 36px; width: auto; max-width: 110px; object-fit: contain; }
.header-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
}
.header-right { display: flex; gap: 4px; }
.lang-btn {
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-500);
  transition: all 0.15s;
  min-height: 36px;
}
.lang-btn:hover { border-color: var(--gray-400); color: var(--gray-700); }
.lang-btn.active {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-light);
}

/* ═══ PROGRESS BAR ═══ */
#progress-bar {
  background: var(--white);
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
}
#progress-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
#progress-fill {
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  overflow: hidden;
}
#progress-fill::after {
  content: '';
  display: block;
  height: 100%;
  background: var(--red);
  border-radius: 2px;
  width: var(--progress, 50%);
  transition: width 0.3s ease;
}

/* ═══ WIZARD ═══ */
#wizard {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px;
}

.step { display: none; }
.step.active { display: block; }
.step-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
}

/* GDPR header card */
.gdpr-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  font-size: 13.5px;
  color: var(--gray-700);
  line-height: 1.55;
  border-left: 3px solid var(--red);
}

/* ═══ FORM FIELDS ═══ */
.field-group { margin-bottom: 18px; }
.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.field-label .req { color: var(--red); margin-left: 2px; }
.field-input,
.field-select,
.field-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 44px;
  -webkit-appearance: none;
  appearance: none;
}
.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(238,16,0,0.08);
}
.field-input.error,
.field-select.error,
.field-textarea.error {
  border-color: var(--red);
  background: var(--red-light);
}
.field-error {
  color: var(--red);
  font-size: 12px;
  margin-top: 4px;
  display: none;
}
.field-error.visible { display: block; }
.field-textarea { resize: vertical; min-height: 96px; }

/* Radio group (Da/Ne) */
.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
  min-height: 44px;
  background: var(--white);
}
.radio-option:hover { border-color: var(--gray-400); }
.radio-option.selected {
  border-color: var(--red);
  background: var(--red-light);
  color: var(--red);
  font-weight: 600;
}
.radio-option input[type="radio"] { display: none; }

/* Conditional area */
.conditional { margin-top: 12px; }
.hidden { display: none !important; }

/* ═══ SIGNATURE ═══ */
.signature-block {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 24px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.signature-hint {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 10px;
}
.signature-canvas-wrap {
  position: relative;
  border: 1.5px dashed var(--gray-300);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  touch-action: none;
  width: 100%;
  max-width: 600px;
}
.signature-canvas-wrap.error { border-color: var(--red); background: var(--red-light); }
#signature-canvas {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
  background: var(--white);
}
.signature-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}
.signature-clear-btn {
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
}
.signature-clear-btn:hover { color: var(--red); border-color: var(--red); }

/* ═══ CONSENT ═══ */
.consent-group {
  margin: 24px 0;
  padding: 14px 16px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.consent-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
}
.consent-label input[type=checkbox] {
  width: 20px; height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--red);
}
.consent-label.error { color: var(--red); }
.consent-label.error input[type=checkbox] { outline: 2px solid var(--red); outline-offset: 2px; }

/* ═══ BOTTOM BAR ═══ */
#bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}

.btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  white-space: nowrap;
  min-height: 44px;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline {
  background: none;
  border: 1.5px solid var(--gray-200);
  color: var(--gray-700);
}
.btn-outline:hover { border-color: var(--gray-400); }
.btn-ghost {
  background: none;
  border: none;
  color: var(--gray-500);
  font-size: 13px;
}
.btn-ghost:hover { color: var(--gray-700); }

/* ═══ MODAL ═══ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.modal-box h2 { font-size: 20px; margin-bottom: 8px; }
.modal-box p { color: var(--gray-500); font-size: 14px; margin-bottom: 22px; }
.modal-actions { display: flex; gap: 12px; justify-content: center; }

/* ═══ TOAST ═══ */
#toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  z-index: 1001;
  max-width: calc(100% - 32px);
  text-align: center;
  transition: opacity 0.3s;
}
#toast.error { background: var(--red); }
#toast.hidden { opacity: 0; pointer-events: none; }

/* ═══ SUCCESS SCREEN ═══ */
#success-screen {
  position: fixed;
  inset: 0;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
}
.success-box { text-align: center; max-width: 420px; }
.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-size: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.success-box h1 { font-size: 28px; margin-bottom: 8px; font-family: 'Barlow Condensed', sans-serif; }
.success-box p { color: var(--gray-700); font-size: 16px; }
.success-id { margin-top: 20px; font-size: 13px; color: var(--gray-500); }
.success-id strong { color: var(--gray-900); font-family: ui-monospace, Menlo, monospace; }

/* ═══ RESPONSIVE ═══ */
.field-row { display: flex; gap: 12px; }
.field-row > .field-group { flex: 1; }
@media (max-width: 560px) {
  .field-row { flex-direction: column; gap: 0; }
}
@media (min-width: 1024px) {
  #wizard { padding: 32px 24px; }
}
