/* =========================================
   Assessment CSS — Scoped bridge layer
   Loaded only on pulse-check/index.html
   Complements ../style.css without conflict
   ========================================= */

/* ── Variable additions ──
   These are used by the assessment but not defined in style.css */
:root {
  --c-orange-dk: var(--c-orange-dark, #8b5a00);
  --c-blue-lt:   rgba(24, 99, 220, 0.08);
}

/* ── Layout: narrow container for assessment form ──
   style.css uses max-width: 1180px; assessment needs 820px */
.pulse-check-scope .container {
  max-width: 820px;
  padding: 0 24px;
}

/* ── Hero: assessment gradient header ──
   style.css has .hero-video and .page-hero — .hero is assessment-only */
.pulse-check-scope {
  background: linear-gradient(135deg, rgba(24,99,220,0.06) 0%, rgba(201,148,0,0.04) 100%);
}
.pulse-check-scope .hero {
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  padding: calc(var(--nav-h, 72px) + 48px) 0 64px;
}
.pulse-check-scope .hero-logo {
  max-width: 480px;
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 24px;
}
.pulse-check-scope .hero-sub {
  font-size: 1.05rem;
  color: var(--c-muted);
  max-width: 620px;
  margin-bottom: 28px;
}
.pulse-check-scope .hero-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pulse-check-scope .hero-meta li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-muted);
}
.meta-icon { font-size: 1rem; }

/* ── Cards: suppress website hover lift on question cards ── */
.pulse-check-scope .card:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}
.pulse-check-scope .card {
  margin-top: 24px;
  padding: 36px 40px;
}

/* ── Progress bar: sits below fixed nav ──
   Without this, the sticky bar hides under the 72px fixed nav */
.progress-bar-wrap {
  position: sticky;
  top: var(--nav-h, 72px);
  z-index: 999;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: 10px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.progress-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}
.progress-track {
  flex: 1;
  height: 6px;
  background: var(--c-border);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--c-orange);
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}
.progress-label {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-muted);
  white-space: nowrap;
}

/* ── Links: restore orange colour within assessment scope ── */
.pulse-check-scope a {
  color: var(--c-orange);
}

/* ── Form elements ── */
.pulse-check-scope .section-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.pulse-check-scope .section-desc {
  font-size: 0.9rem;
  color: var(--c-muted);
  margin-bottom: 20px;
}
.pulse-check-scope .form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.pulse-check-scope .form-group select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background-color: var(--c-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23404040' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 14px 40px 14px 18px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--c-text);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.pulse-check-scope .form-group select:focus {
  outline: 3px solid var(--c-orange);
  outline-offset: 2px;
  border-color: var(--c-orange);
}

/* ── Tom Select overrides ── */
.pulse-check-scope .ts-wrapper {
  width: 100%;
}
.pulse-check-scope .ts-control {
  background: var(--c-surface) !important;
  border: 1px solid var(--c-border) !important;
  border-radius: var(--radius) !important;
  padding: 12px 40px 12px 18px !important;
  font-family: var(--font-body) !important;
  font-size: 0.95rem !important;
  color: var(--c-text) !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
  cursor: pointer;
  min-height: unset;
}
.pulse-check-scope .ts-control input {
  font-family: var(--font-body) !important;
  font-size: 0.95rem !important;
  color: var(--c-text) !important;
  padding: 0 !important;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
  margin: 0 !important;
  min-width: 60px;
}
.pulse-check-scope .ts-wrapper.focus .ts-control {
  border-color: var(--c-orange) !important;
  outline: 3px solid var(--c-orange);
  outline-offset: 2px;
  box-shadow: none !important;
}
.pulse-check-scope .ts-dropdown {
  background: var(--c-surface) !important;
  border: 1px solid var(--c-border) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
  font-family: var(--font-body) !important;
  font-size: 0.92rem !important;
  color: var(--c-text) !important;
  margin-top: 4px;
}
.pulse-check-scope .ts-dropdown .option {
  padding: 9px 16px !important;
  color: var(--c-text) !important;
}
.pulse-check-scope .ts-dropdown .option.active,
.pulse-check-scope .ts-dropdown .option:hover {
  background: var(--c-surface2) !important;
  color: var(--c-text) !important;
}
.pulse-check-scope .ts-dropdown .optgroup-header {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--c-muted) !important;
  padding: 10px 16px 4px !important;
  background: var(--c-surface) !important;
}
.pulse-check-scope .ts-dropdown-content,
.ts-dropdown-content {
  max-height: 240px;
  overflow-y: auto !important;
}
.optional-fields-box {
  margin-top: 24px;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px 28px;
}
.optional-fields-heading {
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.optional-fields-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
  background: var(--c-border);
  border-radius: 50px;
  padding: 2px 9px;
}
.optional-row-note {
  font-size: 0.82rem;
  color: var(--c-muted);
  font-style: italic;
  margin: 0 0 16px;
}
.req { color: #d32f2f; }
.field-error {
  font-size: 0.78rem;
  color: #d32f2f;
  font-weight: 600;
  min-height: 1em;
}
.pulse-check-scope .form-group input.has-error { border-color: #d32f2f; }

/* ── Instructions example block ── */
.pulse-check-scope .instructions p {
  font-size: 0.95rem;
  color: var(--c-muted);
}
.scale-note {
  font-size: 0.82rem;
  color: var(--c-muted);
  font-style: italic;
}
.example-block {
  margin: 20px 0 16px;
  background: var(--c-surface2);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.example-label {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-orange);
  margin-bottom: 12px;
}
.example-anchors {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 16px;
  gap: 8px;
}
.example-anchor-right { text-align: right; }
.example-positions {
  position: relative;
  margin-bottom: 16px;
}
.example-track-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--c-orange) 0%, #b0b0b0 50%, var(--c-blue) 100%);
  z-index: 0;
}
.example-pips-row {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
}
.example-pip {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.pos-1 { background: var(--c-orange); }
.pos-2 { background: #b58a30; }
.pos-3 { background: #888; }
.pos-4 { background: #3a71c2; }
.pos-5 { background: var(--c-blue); }
.example-descs-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  text-align: center;
}
.example-descs-row p {
  font-size: 0.75rem;
  color: var(--c-muted);
  line-height: 1.4;
  margin: 0;
}
.example-note {
  font-size: 0.8rem;
  color: var(--c-muted);
  font-style: italic;
  margin: 0;
  border-top: 1px solid var(--c-border);
  padding-top: 12px;
}

/* ── Theme groups ── */
.theme-group { margin-top: 32px; }
.theme-group:first-child { margin-top: 24px; }
.theme-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-orange);
  margin-bottom: 4px;
}
.theme-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-border);
}

/* ── Question cards ── */
.question-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-top: 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.question-card:hover {
  border-color: rgba(24,99,220,0.2);
  box-shadow: var(--shadow-sm);
  transform: none;
}
.question-card.answered {
  border-left: 3px solid var(--c-orange);
}
.question-id {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 14px;
}
.slider-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.slider-label {
  font-size: 0.88rem;
  color: var(--c-muted);
  line-height: 1.45;
}
.slider-label.right { text-align: right; }
.slider-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 160px;
  position: relative;
  padding-bottom: 56px;
}
.slider-reset {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  padding: 0;
  font-size: 0.7rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
}
.question-card.answered .slider-reset { opacity: 1; }
.slider-reset:hover { color: #555; }
.slider-value {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--c-orange);
  background: var(--c-blue-lt);
  border: 1px solid rgba(24,99,220,0.15);
  border-radius: 50px;
  padding: 2px 10px;
  min-width: 32px;
  text-align: center;
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}
.pip-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-head);
  font-size: 0.65rem;
  color: #bbb;
  padding: 0 1px;
  user-select: none;
}

/* ── Range input: custom styling ── */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--c-orange) 0%, #b0b0b0 50%, var(--c-blue) 100%);
  outline: none;
  cursor: pointer;
}
input[type="range"]:focus {
  outline: 3px solid var(--c-orange);
  outline-offset: 3px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--thumb-color, #888);
  border: 3px solid #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.25);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover,
input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.15);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--thumb-color, #888);
  border: 3px solid #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.25);
  cursor: pointer;
  transition: background 0.15s ease;
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--c-orange) 0%, #b0b0b0 50%, var(--c-blue) 100%);
}

/* ── Submit & buttons ── */
.submit-wrap {
  margin: 40px 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.submit-wrap[hidden] { display: none; }
.submit-note {
  font-size: 0.82rem;
  color: var(--c-muted);
  margin: 0;
  text-align: center;
}
.pulse-check-scope .btn-primary {
  box-shadow: 0 4px 14px rgba(201,148,0,0.35);
}
.pulse-check-scope .btn-primary:hover {
  background: var(--c-orange-dk);
  box-shadow: 0 8px 20px rgba(201,148,0,0.4);
}
.btn-sm {
  font-size: 0.82rem;
  padding: 9px 20px;
}

/* ── Unanswered warning ── */
.unanswered-warning {
  width: 100%;
  max-width: 560px;
  background: rgba(201,148,0,0.07);
  border: 1px solid rgba(201,148,0,0.35);
  border-left: 4px solid var(--c-orange);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: left;
  animation: fadeUp 0.25s ease both;
}
.unanswered-warning-msg {
  font-size: 0.9rem;
  color: var(--c-text);
  margin-bottom: 14px;
}
.unanswered-warning-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.question-card.highlight-missing {
  border-color: var(--c-orange) !important;
  box-shadow: 0 0 0 3px rgba(201,148,0,0.25) !important;
}

/* ── Confirmation ── */
.confirmation-wrap { margin-top: 48px; }
.confirmation-card { text-align: center; padding: 3rem 2rem; }
.confirmation-icon {
  font-size: 3rem;
  color: #1a7a3f;
  margin-bottom: 1rem;
  display: block;
}
.confirmation-card h2 { margin-bottom: 1rem; }
.confirmation-card p {
  color: #555;
  max-width: 520px;
  margin: 0 auto 0.75rem;
}
.confirmation-junk-note { font-size: 0.875rem; }

/* ── Submission notices ── */
.submission-notice {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  font-weight: 500;
}
.submission-notice--pending {
  background: #f0f4ff;
  color: #1863DC;
  border: 1px solid #b3c8f7;
}
.submission-notice--success {
  background: #f0faf4;
  color: #1a7a3f;
  border: 1px solid #a3d9b5;
}
.submission-notice--error {
  background: #fff4f4;
  color: #b71c1c;
  border: 1px solid #f5b0b0;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .pulse-check-scope .card { padding: 24px 20px; }
  .pulse-check-scope .form-row { grid-template-columns: 1fr; }
  .slider-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .slider-label.right { text-align: left; }
  .slider-track { min-width: unset; }
  .pulse-check-scope .hero { padding: calc(var(--nav-h, 72px) + 24px) 0 40px; }
  .example-descs-row { font-size: 0.7rem; }
}

@media (max-width: 540px) {
  .example-anchors {
    flex-direction: column;
    gap: 4px;
  }
  .example-anchor-right { text-align: left; }
}

/* ── Rotate nudge — mobile portrait only ── */
.rotate-nudge { display: none; }

@media (max-width: 640px) and (orientation: portrait) {
  .rotate-nudge {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--c-blue-lt);
    border: 1px solid rgba(24,99,220,0.18);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-top: 24px;
  }
  .rotate-nudge-icon {
    font-size: 2rem;
    line-height: 1;
    color: var(--c-blue);
    flex-shrink: 0;
  }
  .rotate-nudge p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--c-muted);
    line-height: 1.5;
  }
  .rotate-nudge p strong { color: var(--c-text); }
}
