/* ============================================
   Felsökaren v2 – page-specific styles
   (tvåstegsmodell)
   ============================================ */

/* === Tool Hero === */

/* Remove container top padding so hero gradient sits flush against nav */
.container {
  padding-top: 0;
}

.tool-hero {
  margin-bottom: var(--space-6);
}

.tool-hero-bg {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-signature);
  border-bottom: 1px solid rgba(0, 160, 155, 0.15);
}

.tool-hero-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-4) var(--space-6);
}

.tool-hero-title {
  font-size: 28px;
  font-weight: var(--font-weight-bold);
  color: #fff;
  margin-bottom: var(--space-3);
}

.tool-hero-tagline {
  color: rgba(255, 255, 255, 0.92);
  font-size: var(--font-size-body);
  line-height: var(--line-height-relaxed);
}

@media (max-width: 600px) {
  .tool-hero-inner {
    padding: var(--space-6) var(--space-3) var(--space-4);
  }
  .tool-hero-title {
    font-size: 1.3rem;
  }
}

/* === LIP Typography === */

p {
  font-size: var(--font-size-small);
  line-height: var(--line-height-relaxed);
  opacity: 0.7;
}

.tool-hero p {
  opacity: 1;
}

h2 {
  font-size: 24px;
}

.tool-hero-inner h2 {
  font-size: 28px;
}

.step-collapse-body h2 {
  font-size: 18px;
  margin-bottom: var(--space-3);
}

.section-body {
  font-size: 14px;
}

.step-collapse-title {
  font-size: 22px;
}

/* === Step Collapse overrides === */

.step-collapse {
  margin-bottom: var(--space-3);
}

.step-collapse-header {
  background: #f9f9f970;
  padding: var(--space-3) var(--space-4);
}

.step-collapse-body {
  background: #f9f9f970;
  padding: 0 var(--space-4) var(--space-4);
}

.step-continue {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-3);
  margin-top: var(--space-3);
}

.loading-section {
  padding: var(--space-4) 0;
}

.btn-reset-inline {
  font-size: var(--font-size-small);
  padding: var(--space-1) var(--space-3);
  opacity: 0.7;
  transition: opacity 0.15s;
}

.btn-reset-inline:hover {
  opacity: 1;
}

.step-collapse.completed .step-continue,
.step-collapse.collapsed .step-continue {
  display: none;
}

/* === Pill questions === */

.felsok-fraga {
  margin-bottom: var(--space-5);
}

.felsok-fraga h3 {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-2);
  color: var(--color-text-heading);
}

/* === Case question (Step 2) === */

.case-intro {
  margin-bottom: var(--space-4);
}

.case-question {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-heading);
  line-height: var(--line-height-relaxed);
  opacity: 1;
}

#caseText {
  width: 100%;
  box-sizing: border-box;
  padding: var(--space-3);
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  resize: vertical;
  transition: border-color 0.15s;
  line-height: var(--line-height-relaxed);
}

#caseText:focus {
  border-color: var(--color-secondary-teal);
  outline: none;
}

/* === Coach box === */

.coach-box {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  margin-top: var(--space-3);
  border-radius: var(--radius-input);
  font-size: 13px;
  line-height: var(--line-height-relaxed);
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.coach-box.hidden {
  display: none;
}

.coach-text {
  color: var(--color-text-secondary);
}

.coach-warning {
  background: #fff8e1;
  border-left-color: #f9a825;
}

.coach-warning .coach-text {
  color: #8d6e00;
}

.coach-nudge {
  background: #f0f4f8;
  border-left-color: #5c7a99;
}

.coach-nudge .coach-text {
  color: #4a6175;
}

.coach-ok {
  background: #f0f7f0;
  border-left-color: #7cb342;
}

.coach-ok .coach-text {
  color: #557a2e;
}

.coach-good {
  background: #e8f5e9;
  border-left-color: #43a047;
}

.coach-good .coach-text {
  color: #2e7031;
}

/* === Depth indicator === */

.depth-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding: var(--space-1) 0;
}

.depth-bar {
  flex: 1;
  height: 4px;
  background: var(--color-bg-input);
  border-radius: 2px;
  overflow: hidden;
}

.depth-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease, background-color 0.4s ease;
  width: 0%;
}

.depth-level-0 {
  background-color: #ccc;
}

.depth-level-1 {
  background-color: #e57373;
}

.depth-level-2 {
  background-color: #ffb74d;
}

.depth-level-3 {
  background-color: #81c784;
}

.depth-label {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
  min-width: 120px;
  text-align: right;
}

/* === Step summary skipped === */

.step-summary-skipped {
  opacity: 0.5;
  font-style: italic;
}

/* === Diagnos box === */

.diagnos-section {
  margin-bottom: var(--space-2);
}

.diagnos-box {
  background: #1a1a2e;
  color: #fff;
  padding: var(--space-5);
  border-radius: var(--radius-card);
}

.diagnos-full {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 100%);
}

.diagnos-rubrik {
  font-family: 'Lora', serif;
  font-size: 22px !important;
  font-weight: 700;
  color: #fff !important;
  margin-bottom: var(--space-2) !important;
  line-height: 1.3;
}

.diagnos-text {
  font-size: var(--font-size-body);
  line-height: var(--line-height-relaxed);
  opacity: 0.88;
}

/* === Blinda fläckar accent === */

.blinda-section .accent-left {
  border-left-color: #ffb74d;
}

/* === Rekommendationer === */

.rekom-section {
  margin-top: var(--space-4);
}

.rekom-section h2 {
  margin-bottom: var(--space-4);
}

.rekom-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.rekom-card {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-card);
  border-left: 4px solid transparent;
}

.rekom-akut {
  background: #fef3f0;
  border-left-color: #e65100;
}

.rekom-viktig {
  background: #f0f4f8;
  border-left-color: #5c7a99;
}

.rekom-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.rekom-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: var(--font-weight-bold);
  flex-shrink: 0;
}

.rekom-akut .rekom-number {
  background: #e65100;
  color: #fff;
}

.rekom-viktig .rekom-number {
  background: #5c7a99;
  color: #fff;
}

.rekom-prio {
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rekom-akut .rekom-prio {
  color: #e65100;
}

.rekom-viktig .rekom-prio {
  color: #5c7a99;
}

.rekom-text {
  font-size: var(--font-size-body) !important;
  line-height: var(--line-height-relaxed);
  color: var(--color-text-primary);
  opacity: 1 !important;
  margin: 0;
}

/* === Dashboard rekommendationer === */

.dash-rekom-list {
  list-style: decimal;
  padding-left: var(--space-4);
  margin: 0;
}

.dash-rekom-list li {
  margin-bottom: var(--space-2);
  font-size: var(--font-size-body);
  line-height: var(--line-height-relaxed);
}

.dash-prio-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: var(--space-1);
  vertical-align: middle;
}

.dash-prio-akut {
  background: #fbe9e7;
  color: #e65100;
}

/* === Deep dive CTA (step 3 → step 4) === */

.deep-cta {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.deep-cta.hidden {
  display: none;
}

.deep-cta-inner {
  background: linear-gradient(135deg, #f8f6ff 0%, #f0f4ff 100%);
  border: 1px solid #e0d8f0;
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-5);
  text-align: center;
}

.deep-cta-title {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-heading);
  margin-bottom: var(--space-1);
}

.deep-cta-text {
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
  opacity: 1;
}

.deep-cta .btn-primary {
  padding: var(--space-2) var(--space-5);
}

/* === Deep Q&A (Step 4) === */

.deep-question-counter {
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2);
}

.deep-question {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-heading);
  line-height: var(--line-height-relaxed);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
  border-left: 3px solid var(--color-secondary-teal);
  background: var(--color-bg-subtle);
  border-radius: 0 var(--radius-input) var(--radius-input) 0;
}

#deepAnswer {
  width: 100%;
  box-sizing: border-box;
  padding: var(--space-3);
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  resize: vertical;
  transition: border-color 0.15s;
  line-height: var(--line-height-relaxed);
}

#deepAnswer:focus {
  border-color: var(--color-secondary-teal);
  outline: none;
}

.input-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-3);
}

.char-count {
  font-size: 12px;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.char-count-warning {
  color: #e57373;
}

.char-count-ok {
  color: #43a047;
}

.deep-qa-card {
  background: var(--color-bg-subtle);
  border-radius: var(--radius-card);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
  font-size: var(--font-size-small);
  line-height: var(--line-height-relaxed);
}

.deep-qa-card .qa-question {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-1);
}

.deep-qa-card .qa-answer {
  color: var(--color-text-primary);
}

/* Fade-in animation for next question */
.interview-fade-in {
  animation: fadeSlideIn 0.35s ease;
}

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

/* === Responsive === */

@media (max-width: 600px) {
  .depth-indicator {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
  }
  .depth-label {
    text-align: left;
  }
  .rekom-card {
    padding: var(--space-3);
  }
  .deep-cta-inner {
    padding: var(--space-3) var(--space-4);
  }
}
