@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; /* Firefox - just in case */
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.screen::-webkit-scrollbar {
  display: none; /* Chrome/Edge/Safari - invisible scrollbar */
}

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

.steps {
  color: var(--muted);
  padding: 0 20px 0 0;
  margin: 24px 0 32px;
  display: grid;
  gap: 12px;
}

/* Button base styles inherited from shared.css */

.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 {
  margin-bottom: 20px;
}

.question__pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 16px;
}

.statement {
  background: #f5f7ff;
  border-radius: 18px;
  padding: 16px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  min-height: 96px;
  display: flex;
  align-items: center;
}

.statement--right {
  border: 1px solid rgba(76, 102, 255, 0.2);
}

.statement--left {
  border: 1px solid rgba(80, 112, 160, 0.2);
}

.question__hint {
  color: var(--muted);
  font-size: 14px;
}

.scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.scale__item {
  background: #f8f9fd;
  border-radius: 16px;
  border: 1px solid transparent;
  padding: 14px 0;
  text-align: center;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.scale__item input {
  display: none;
}

.scale__item span {
  font-size: 18px;
}

.scale__item input:checked + span {
  color: white;
}

.scale__item input:checked + span::after {
  content: "";
}

.scale__item input:checked ~ span {
  color: white;
}

.scale__item input:checked {
  display: none;
}

.scale__item:has(input:checked) {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: white;
  box-shadow: 0 12px 20px rgba(76, 102, 255, 0.25);
}

.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin: 16px 0 24px;
}

.analysis-summary {
  background: #f7f9ff;
  border-radius: 16px;
  padding: 18px;
  color: var(--muted);
  margin: 24px 0;
  display: grid;
  gap: 12px;
  border: 1px solid var(--border);
}

.analysis-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
}

.analysis-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  background: #ffffff;
}

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

.analysis-card__title {
  font-weight: 700;
}

.analysis-card__score {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
}

.analysis-card__label {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}

.analysis-card__text {
  margin: 0;
  line-height: 1.6;
  color: var(--text);
}

.analysis-card--reactive {
  border-color: rgba(255, 127, 80, 0.4);
  background: #fff8f2;
}

.analysis-card--proactive {
  border-color: rgba(76, 102, 255, 0.35);
  background: #f6f8ff;
}

.analysis-card--mixed {
  border-color: rgba(160, 172, 189, 0.5);
  background: #fbfcff;
}

.insights {
  display: grid;
  gap: 16px;
  margin: 20px 0 28px;
}

.insights__block {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  background: #ffffff;
}

.insights__block h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.insights__score {
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.insights__block ul {
  margin: 0;
  padding: 0 20px 0 0;
  display: grid;
  gap: 8px;
  color: var(--text);
}

.insights__block p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.insights__block--summary {
  background: #f7f9ff;
}

.insights-summary ul {
  margin: 0;
  padding: 0 20px 0 0;
  display: grid;
  gap: 8px;
}

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

.result-card__title {
  font-weight: 600;
}

.result-card__score {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
}

/* Small screens (phones and small tablets) */
@media (max-width: 640px) {
  .app {
    padding: 24px 16px 40px;
  }

  .app__header {
    margin-bottom: 20px;
  }

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

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

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

  .progress {
    margin-bottom: 12px;
  }

  .question {
    margin-bottom: 12px;
  }

  .question__pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .statement {
    font-size: 13px;
    padding: 10px;
    min-height: auto;
    border-radius: 12px;
  }

  .question__hint {
    font-size: 11px;
  }

  .scale {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 12px;
  }

  .scale__item {
    padding: 8px 0;
    border-radius: 12px;
  }

  .scale__item span {
    font-size: 16px;
  }
}

/* Very small screens (small phones, low-res) */
@media (max-width: 380px) {
  .app {
    padding: 16px 12px 32px;
  }

  .card {
    padding: 16px;
    min-height: calc(100dvh - 100px);
    border-radius: 16px;
  }

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

  .statement {
    font-size: 12px;
    padding: 8px;
  }

  .scale__item {
    padding: 6px 0;
  }

  .scale__item span {
    font-size: 14px;
  }
}

/* Low height screens (landscape phones, small laptops) */
@media (max-height: 700px) {
  .app {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .app__header {
    margin-bottom: 16px;
  }

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

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

  .progress {
    margin-bottom: 12px;
  }

  .question {
    margin-bottom: 12px;
  }

  .scale {
    margin-bottom: 12px;
  }
}

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

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