/* ═══════════════════════════════════════════════
   TEAM PULSE SURVEY – Frontend Styles
   All classes prefixed with .tps- to avoid conflicts
═══════════════════════════════════════════════ */

.tps-wrap {
  --tps-bg:       #0d0f14;
  --tps-surface:  #161a24;
  --tps-surface2: #1e2330;
  --tps-border:   #2a3045;
  --tps-accent:   #4f8ef7;
  --tps-accent2:  #7c5cfc;
  --tps-gold:     #f5b84b;
  --tps-green:    #3ecf8e;
  --tps-red:      #f26c6c;
  --tps-text:     #e8eaf2;
  --tps-muted:    #7b839e;
  --tps-card:     #181d2a;

  font-family: 'Sora', sans-serif;
  background: var(--tps-bg);
  color: var(--tps-text);
  border-radius: 16px;
  overflow: hidden;
  margin: 0 auto;
  max-width: 800px;
}

.tps-wrap *,
.tps-wrap *::before,
.tps-wrap *::after {
  box-sizing: border-box;
}

/* ── HERO ───────────────────────────────────── */
.tps-hero {
  background: linear-gradient(135deg, #0d0f14 0%, #131829 60%, #1a1035 100%);
  border-bottom: 1px solid var(--tps-border);
  padding: 56px 24px 44px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tps-hero::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(79,142,247,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.tps-hero-tag {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--tps-accent);
  background: rgba(79,142,247,0.1);
  border: 1px solid rgba(79,142,247,0.25);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.tps-hero h1 {
  font-size: clamp(24px, 5vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #e8eaf2 30%, #4f8ef7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tps-hero p {
  color: var(--tps-muted);
  font-size: 15px;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

.tps-anon-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 24px;
  font-size: 12px;
  color: var(--tps-green);
  background: rgba(62,207,142,0.08);
  border: 1px solid rgba(62,207,142,0.2);
  padding: 6px 14px;
  border-radius: 20px;
}
.tps-anon-badge::before { content: '🔒'; font-size: 13px; }

.tps-anon-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--tps-muted);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}
.tps-anon-note strong { color: var(--tps-text); }

/* ── PROGRESS BAR ───────────────────────────── */
.tps-progress-wrap {
  background: rgba(13,15,20,0.97);
  border-bottom: 1px solid var(--tps-border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.tps-progress-bar-bg {
  flex: 1;
  height: 4px;
  background: var(--tps-surface2);
  border-radius: 4px;
  overflow: hidden;
}

.tps-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--tps-accent), var(--tps-accent2));
  border-radius: 4px;
  transition: width 0.4s ease;
  width: 0%;
}

.tps-progress-label {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--tps-muted);
  white-space: nowrap;
}

/* ── CONTAINER ──────────────────────────────── */
.tps-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* ── SECTIONS ───────────────────────────────── */
.tps-section { margin-top: 40px; }

.tps-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--tps-border);
}

.tps-section-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.tps-icon-blue   { background: rgba(79,142,247,0.15); }
.tps-icon-purple { background: rgba(124,92,252,0.15); }
.tps-icon-gold   { background: rgba(245,184,75,0.15); }
.tps-icon-green  { background: rgba(62,207,142,0.15); }
.tps-icon-red    { background: rgba(242,108,108,0.15); }

.tps-section-title-wrap h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--tps-text);
  margin: 0;
}

.tps-section-title-wrap span {
  font-size: 12px;
  color: var(--tps-muted);
  font-family: 'DM Mono', monospace;
}

/* ── QUESTION CARDS ─────────────────────────── */
.tps-question-card {
  background: var(--tps-card);
  border: 1px solid var(--tps-border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}

.tps-question-card.tps-answered { border-color: rgba(79,142,247,0.35); }
.tps-question-card.tps-error    { border-color: var(--tps-red); box-shadow: 0 0 0 3px rgba(242,108,108,0.15); }
.tps-coach-card { border-color: rgba(245,184,75,0.35) !important; background: rgba(245,184,75,0.04) !important; }

.tps-q-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--tps-text);
  margin-bottom: 16px;
  line-height: 1.5;
}

.tps-q-sub {
  font-weight: 400;
  color: var(--tps-muted);
  font-size: 12px;
}

.tps-req { color: var(--tps-accent); margin-left: 3px; }
.tps-optional { font-weight: 400; color: var(--tps-muted); font-size: 12px; }

/* ── SCALE BUTTONS ──────────────────────────── */
.tps-scale-wrap { display: flex; flex-direction: column; gap: 10px; }

.tps-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--tps-muted);
  font-family: 'DM Mono', monospace;
}

.tps-scale-options { display: flex; gap: 8px; }

.tps-scale-btn {
  flex: 1;
  aspect-ratio: 1;
  max-width: 52px;
  border: 1.5px solid var(--tps-border);
  background: var(--tps-surface);
  color: var(--tps-muted);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Mono', monospace;
}

.tps-scale-btn:hover { border-color: var(--tps-accent); color: var(--tps-accent); }
.tps-scale-btn.tps-selected { background: var(--tps-accent); border-color: var(--tps-accent); color: #fff; }

/* ── OPTION BUTTONS (radio / multi) ────────── */
.tps-options-list { display: flex; flex-direction: column; gap: 8px; }

.tps-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  background: var(--tps-surface);
  border: 1.5px solid var(--tps-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  color: var(--tps-text);
  font-size: 13.5px;
  font-family: 'Sora', sans-serif;
  width: 100%;
}

.tps-option-btn:hover { border-color: var(--tps-accent); background: rgba(79,142,247,0.05); }
.tps-option-btn.tps-selected { border-color: var(--tps-accent); background: rgba(79,142,247,0.1); color: #fff; }

.tps-option-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--tps-border);
  flex-shrink: 0;
  transition: all 0.15s;
}
.tps-option-btn.tps-selected .tps-option-dot { background: var(--tps-accent); border-color: var(--tps-accent); }

.tps-check-dot {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 2px solid var(--tps-border);
  flex-shrink: 0;
  transition: all 0.15s;
}
.tps-option-btn.tps-selected .tps-check-dot { background: var(--tps-accent); border-color: var(--tps-accent); }

/* ── TEXT INPUTS ────────────────────────────── */
.tps-text-input,
.tps-textarea {
  width: 100%;
  background: var(--tps-surface);
  border: 1.5px solid var(--tps-border);
  border-radius: 10px;
  color: var(--tps-text);
  font-family: 'Sora', sans-serif;
  font-size: 13.5px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.6;
}
.tps-textarea { resize: vertical; min-height: 88px; }
.tps-text-input:focus, .tps-textarea:focus { border-color: var(--tps-accent); }
.tps-coach-input:focus { border-color: var(--tps-gold) !important; }
.tps-text-input::placeholder, .tps-textarea::placeholder { color: var(--tps-muted); }

.tps-input-note {
  margin-top: 8px;
  font-size: 11px;
  color: var(--tps-muted);
  font-family: 'DM Mono', monospace;
}

/* ── SUBMIT ─────────────────────────────────── */
.tps-submit-section { margin-top: 48px; text-align: center; }

.tps-submit-btn {
  background: linear-gradient(135deg, var(--tps-accent), var(--tps-accent2));
  color: #fff;
  border: none;
  padding: 16px 48px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Sora', sans-serif;
  transition: opacity 0.2s, transform 0.1s;
  letter-spacing: 0.3px;
}
.tps-submit-btn:hover   { opacity: 0.9; transform: translateY(-1px); }
.tps-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.tps-submit-btn.tps-loading { opacity: 0.6; cursor: not-allowed; }

.tps-submit-note { margin-top: 12px; font-size: 12px; color: var(--tps-muted); }

.tps-error-msg {
  background: rgba(242,108,108,0.1);
  border: 1px solid rgba(242,108,108,0.35);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--tps-red);
  margin-bottom: 16px;
  text-align: left;
}

/* ── THANK YOU ──────────────────────────────── */
.tps-thankyou {
  text-align: center;
  padding: 80px 24px;
}
.tps-thankyou-icon { font-size: 56px; margin-bottom: 20px; }
.tps-thankyou h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #e8eaf2, var(--tps-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tps-thankyou p { color: var(--tps-muted); font-size: 15px; max-width: 420px; margin: 0 auto; }

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 540px) {
  .tps-scale-options { gap: 5px; }
  .tps-scale-btn { font-size: 12px; border-radius: 8px; }
  .tps-hero { padding: 40px 20px 32px; }
  .tps-question-card { padding: 18px 16px; }
}
