/* css/setup-engage.css — Simplified engagement setup */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f8fafc; color: #1e293b; }

/* Welcome overlay */
.wm-welcome { position: fixed; inset: 0; background: rgba(15,23,42,0.92); z-index: 100; display: flex; align-items: center; justify-content: center; }
.wm-welcome-card { background: #fff; border-radius: 20px; padding: 36px 32px; max-width: 380px; width: 90%; text-align: center; box-shadow: 0 8px 40px rgba(0,0,0,.2); }
.wm-welcome-logo { height: 48px; margin-bottom: 16px; }
.wm-welcome-card h2 { font-size: 1.4rem; margin-bottom: 8px; color: #1e293b; }
.wm-welcome-card p { color: #64748b; font-size: 0.9rem; line-height: 1.5; margin-bottom: 20px; }
.wm-welcome-card p strong { color: #334155; }
.wm-welcome-options { display: flex; flex-direction: column; gap: 8px; }
.wm-opt {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border: 2px solid #e2e8f0; border-radius: 10px; background: #f8fafc;
  cursor: pointer; text-decoration: none; color: #334155; text-align: left;
  transition: all 0.15s; font-family: inherit;
}
.wm-opt:hover { border-color: #93c5fd; background: #eff6ff; }
.wm-opt.primary { border-color: #3b82f6; background: #3b82f6; color: #fff; }
.wm-opt.primary:hover { background: #2563eb; }
.wm-opt i { font-size: 1.2rem; width: 24px; text-align: center; flex-shrink: 0; }
.wm-opt.primary i { color: #fff; }
.wm-opt:not(.primary) i { color: #3b82f6; }
.wm-opt-title { font-size: 0.92rem; font-weight: 700; display: block; }
.wm-opt-desc { font-size: 0.75rem; display: block; opacity: 0.7; }

.setup-header {
  background: #1e293b; color: #fff; padding: 14px 20px;
  display: flex; align-items: center; gap: 12px;
}
.setup-header h1 { font-size: 1.1rem; font-weight: 600; }
.back-link { color: #94a3b8; text-decoration: none; font-size: 1rem; }

.setup-main { max-width: 600px; margin: 0 auto; padding: 24px 16px; }

.setup-section {
  background: #fff; border-radius: 10px; padding: 20px;
  border: 1px solid #e2e8f0; margin-bottom: 16px;
}

.section-label { font-size: 1rem; font-weight: 700; color: #1e293b; display: block; margin-bottom: 8px; }
.hint { font-size: 0.8rem; color: #94a3b8; margin-top: 6px; }

.big-input {
  width: 100%; border: 2px solid #e2e8f0; border-radius: 8px;
  padding: 12px 14px; font-size: 1.1rem; font-weight: 600;
  outline: none; transition: border-color 0.15s;
}
/* Template grid */
.template-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
@media (max-width: 640px) { .template-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 641px) and (max-width: 800px) { .template-grid { grid-template-columns: repeat(3, 1fr); } }

.template-card {
  background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 10px;
  padding: 12px 10px; text-align: center; cursor: pointer;
  transition: all 0.15s; display: flex; flex-direction: column;
  align-items: center; gap: 4px;
}
.template-card:hover { border-color: #94a3b8; background: #f1f5f9; }
.template-card.active { border-color: #3b82f6; background: #eff6ff; }
.template-icon { font-size: 1.3rem; color: #64748b; }
.template-card.active .template-icon { color: #3b82f6; }
.template-name { font-size: 0.85rem; font-weight: 600; color: #1e293b; }
.template-desc { font-size: 0.7rem; color: #94a3b8; line-height: 1.3; }

.big-input:focus { border-color: #3b82f6; }

/* Location */
.location-row { display: flex; gap: 8px; margin-bottom: 8px; }
.location-input {
  flex: 1; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 8px 12px; font-size: 0.9rem;
}
.btn-gps {
  width: 38px; height: 38px; border: 1px solid #e2e8f0; border-radius: 8px;
  background: #f8fafc; cursor: pointer; font-size: 1rem; color: #3b82f6;
  display: flex; align-items: center; justify-content: center;
}
.btn-gps:hover { background: #e2e8f0; }
.setup-map { height: 250px; border-radius: 8px; border: 1px solid #e2e8f0; }
.big-input::placeholder { color: #94a3b8; font-weight: 400; }

/* Category cards */
.cat-card {
  margin-bottom: 12px; border: 1px solid #e2e8f0; border-radius: 10px;
  background: #fff; overflow: hidden;
}
.cat-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: #f8fafc; border-bottom: 1px solid #e2e8f0;
}
.cat-color { width: 32px; height: 32px; border: none; border-radius: 6px; cursor: pointer; padding: 0; flex-shrink: 0; }
.cat-name { flex: 1; border: 1px solid #e2e8f0; border-radius: 6px; padding: 8px 10px; font-size: 0.9rem; font-weight: 600; }
.cat-geom { width: 80px; border: 1px solid #e2e8f0; border-radius: 6px; padding: 6px 8px; font-size: 0.82rem; background: #fff; }
.cat-remove { background: none; border: none; color: #cbd5e1; cursor: pointer; font-size: 1rem; padding: 4px; }
.cat-remove:hover { color: #ef4444; }

.cat-questions { padding: 10px 12px; }
.cat-q-label { font-size: 0.78rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.03em; display: block; margin-bottom: 6px; }

.btn-add-q {
  background: none; border: 1px dashed #cbd5e1; border-radius: 6px;
  padding: 6px 10px; width: 100%; font-size: 0.8rem; color: #94a3b8;
  cursor: pointer; margin-top: 4px;
}
.btn-add-q:hover { background: #f8fafc; color: #64748b; }
.btn-add-q i { margin-right: 4px; }

/* Questions */
.q-row {
  margin-bottom: 8px; padding: 8px 10px;
  background: #f8fafc; border-radius: 8px; border: 1px solid #f1f5f9;
}
.q-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.q-type {
  width: 155px; border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 6px 8px; font-size: 0.82rem; background: #fff;
}
.q-label { flex: 1; border: 1px solid #e2e8f0; border-radius: 6px; padding: 8px 10px; font-size: 0.9rem; }
.q-remove { background: none; border: none; color: #cbd5e1; cursor: pointer; font-size: 1rem; padding: 4px; }
.q-remove:hover { color: #ef4444; }
.q-options { margin-top: 6px; }
.q-options input {
  width: 100%; border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 6px 10px; font-size: 0.82rem; color: #64748b;
}
.q-options .hint { margin-top: 2px; }
.q-other-label { display: flex; align-items: center; gap: 4px; font-size: 0.8rem; color: #64748b; margin-top: 4px; cursor: pointer; }
.q-other-label input { accent-color: #3b82f6; }
.q-likert-config, .q-slider-config { margin-top: 6px; }
.q-likert-config input, .q-slider-config input {
  border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 6px 10px; font-size: 0.82rem; color: #64748b;
}
.q-likert-config input { width: 100%; }
.q-likert-config .hint, .q-slider-config .hint { margin-top: 2px; }

/* Options */
.options-grid { display: flex; flex-direction: column; gap: 8px; }
.option-row label { font-size: 0.88rem; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.option-row label input[type="checkbox"] { accent-color: #3b82f6; }
.option-row label i { color: #64748b; width: 16px; text-align: center; }
.option-row .hint { margin-left: 24px; margin-top: 2px; }
.option-input {
  margin-left: 24px; margin-top: 4px; width: calc(100% - 24px);
  border: 1px solid #e2e8f0; border-radius: 6px; padding: 6px 10px;
  font-size: 0.85rem;
}

/* Buttons */
.btn-add {
  background: #f1f5f9; border: 1px dashed #cbd5e1; border-radius: 8px;
  padding: 10px; width: 100%; font-size: 0.85rem; color: #64748b;
  cursor: pointer; margin-top: 4px;
}
.btn-add:hover { background: #e2e8f0; color: #334155; }
.btn-add i { margin-right: 6px; }

.setup-actions { margin-bottom: 16px; }
.btn-create {
  width: 100%; padding: 14px; border: none; border-radius: 10px;
  background: #3b82f6; color: #fff; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: background 0.15s;
}
.btn-create:hover { background: #2563eb; }
.btn-create:disabled { background: #94a3b8; cursor: default; }
.btn-create i { margin-right: 8px; }

/* Result */
.result-section h3 { margin-bottom: 12px; font-size: 1.1rem; }
.result-links { display: flex; flex-direction: column; gap: 10px; }
.result-link-row label { font-size: 0.8rem; font-weight: 600; color: #64748b; display: block; margin-bottom: 3px; }
.input-group { display: flex; gap: 4px; }
.link-input {
  flex: 1; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 8px 10px; font-size: 0.8rem; font-family: monospace; color: #334155;
}
.btn-copy, .btn-open {
  background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 6px 10px; cursor: pointer; color: #475569; font-size: 0.85rem;
  display: flex; align-items: center; text-decoration: none;
}
.btn-copy:hover, .btn-open:hover { background: #e2e8f0; }
