@import url("../../lib/shared.css");

/* ═══════════════════════════════════════════════════════════════════════════
   שאלון סגנונות תקשורת - Local Styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* Back to Hub Link */
.back-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 16px;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--primary);
}

.app__logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 12px;
}

.app {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.app__header {
  text-align: center;
  margin-bottom: 32px;
}

.app__subtitle {
  color: var(--muted);
  margin: 0;
}

.card {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 32px;
  min-height: calc(100dvh - 220px);
  position: relative;
  overflow: hidden;
}

.screen {
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  position: absolute;
  inset: 0;
  padding: 32px 32px 48px;
  overflow-y: auto;
  scrollbar-width: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen--active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.screen--scroll {
  overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Intro Screen
   ═══════════════════════════════════════════════════════════════════════════ */

.intro__text {
  color: var(--text);
  line-height: 1.7;
  margin: 24px 0 16px;
}

.intro__note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  background: #f7f9ff;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 32px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Progress Bar
   ═══════════════════════════════════════════════════════════════════════════ */

.progress {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.progress__bar {
  width: 100%;
  height: 10px;
  background: #edf0f7;
  border-radius: 999px;
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), #8b9bff);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Question Screen
   ═══════════════════════════════════════════════════════════════════════════ */

#question-screen {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.question {
  margin-bottom: 20px;
}

.question__text {
  background: #f5f7ff;
  border-radius: 18px;
  padding: 24px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
  border: 1px solid rgba(76, 102, 255, 0.15);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Yes/No Answer Buttons
   ═══════════════════════════════════════════════════════════════════════════ */

.answer-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.answer-btn {
  padding: 20px;
  border-radius: 16px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.answer-btn--yes {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #c8e6c9;
}

.answer-btn--yes:hover {
  background: #c8e6c9;
}

.answer-btn--yes.selected {
  background: #4CAF50;
  color: white;
  border-color: #388e3c;
  box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
}

.answer-btn--no {
  background: #ffebee;
  color: #c62828;
  border-color: #ffcdd2;
}

.answer-btn--no:hover {
  background: #ffcdd2;
}

.answer-btn--no.selected {
  background: #f44336;
  color: white;
  border-color: #d32f2f;
  box-shadow: 0 8px 20px rgba(244, 67, 54, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Bar Chart
   ═══════════════════════════════════════════════════════════════════════════ */

.chart-container {
  margin: 32px 0;
  padding: 24px;
  background: #f7f9ff;
  border-radius: 20px;
}

.chart {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  height: 200px;
  align-items: end;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.chart__bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.chart__fill {
  width: 100%;
  max-width: 60px;
  border-radius: 8px 8px 0 0;
  transition: height 0.6s ease, background-color 0.3s ease;
  min-height: 4px;
}

#bar-supportive .chart__fill { background: #4CAF50; }
#bar-analytical .chart__fill { background: #2196F3; }
#bar-expressive .chart__fill { background: #FF9800; }
#bar-driver .chart__fill { background: #F44336; }

.chart__score {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.chart__labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 12px;
  text-align: center;
  font-weight: 600;
  color: var(--muted);
}

.chart__axis {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  padding: 0 8px;
}

.blend-note {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-top: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Dominant Types (Full Analysis)
   ═══════════════════════════════════════════════════════════════════════════ */

.dominant-types {
  display: grid;
  gap: 20px;
  margin: 24px 0;
}

.type-card {
  border-radius: 20px;
  padding: 24px;
  border: 2px solid;
}

.type-card--rank-1 {
  background: linear-gradient(135deg, #f8faff 0%, #eef2ff 100%);
}

.type-card--rank-2 {
  background: #f9fafb;
}

.type-card__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  margin-left: 12px;
}

.type-card--rank-1 .type-card__rank {
  background: var(--primary);
  color: white;
}

.type-card--rank-2 .type-card__rank {
  background: var(--muted);
  color: white;
}

.type-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.type-card__header-main {
  display: flex;
  align-items: center;
}

.type-card__title {
  font-size: 22px;
  font-weight: 700;
}

.type-card__score {
  font-size: 24px;
  font-weight: 700;
}

.type-card__summary {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 20px;
}

.type-card h4 {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 12px;
  font-weight: 600;
}

.type-card__traits {
  margin: 0;
  padding: 0 20px 0 0;
  display: grid;
  gap: 8px;
  line-height: 1.6;
  font-size: 15px;
}

.type-card__traits li {
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Minor Types (FYI Section)
   ═══════════════════════════════════════════════════════════════════════════ */

.minor-types-section {
  margin: 32px 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.minor-types__title {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 16px;
  font-weight: 600;
}

.minor-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.minor-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #f7f8fa;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.minor-card__title {
  font-weight: 600;
  color: var(--muted);
}

.minor-card__score {
  font-weight: 700;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .app {
    padding: 24px 16px 40px;
  }

  .app__logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .card {
    padding: 20px;
    min-height: calc(100dvh - 120px);
  }

  .screen {
    padding: 20px 20px 24px;
  }

  .progress {
    margin-bottom: 12px;
  }

  .question {
    margin-bottom: 12px;
  }

  .question__text {
    font-size: 15px;
    padding: 14px;
  }

  .answer-buttons {
    gap: 10px;
  }

  .answer-btn {
    padding: 14px;
    font-size: 16px;
  }

  .chart {
    height: 140px;
    gap: 10px;
  }

  .chart__fill {
    max-width: 44px;
  }

  .chart__score {
    font-size: 16px;
  }

  .chart__labels {
    font-size: 11px;
    gap: 10px;
  }

  .type-card {
    padding: 14px;
  }

  .type-card__title {
    font-size: 16px;
  }

  .type-card__score {
    font-size: 18px;
  }

  .minor-types {
    grid-template-columns: 1fr;
  }

  .type-card__traits {
    font-size: 13px;
  }
}

/* Low height screens */
@media (max-height: 700px) {
  .app {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .card {
    min-height: calc(100dvh - 100px);
  }

  .screen {
    padding-top: 16px;
    padding-bottom: 16px;
  }
}
