/* ============================================================
   AI Educator Assessment Quiz - Styles
   Mobile-first, cool slate/teal palette
   ============================================================ */

/* ── Reset & Base ──────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-text: #1e293b;
  --color-text-secondary: #475569;
  --color-text-light: #94a3b8;
  --color-accent: #0d9488;
  --color-accent-hover: #0f766e;
  --color-accent-light: rgba(13, 148, 136, 0.1);
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  --color-likert-bg: #f1f5f9;
  --color-likert-hover: #e2e8f0;
  --color-score-exploring: #ef4444;
  --color-score-developing: #f59e0b;
  --color-score-proficient: #0d9488;
  --color-score-leading: #059669;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --max-width: 680px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-stack);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Layout ────────────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* ── Typography ────────────────────────────────────────────── */

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Landing Screen ────────────────────────────────────────── */

#landing {
  text-align: center;
  padding-top: 3rem;
}

#landing h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

#landing .subtitle {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.author-note {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border-light);
}

/* ── Buttons ───────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s, transform 0.1s;
  font-family: var(--font-stack);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary:disabled:hover {
  background-color: var(--color-accent);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-likert-bg);
}

.btn-outline-accent {
  background-color: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.btn-outline-accent:hover {
  background-color: var(--color-accent-light);
}

/* ── Progress Bar ──────────────────────────────────────────── */

.progress-container {
  margin-bottom: 2rem;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background-color: var(--color-border-light);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--color-accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 0.4rem;
  text-align: right;
}

/* ── Quiz Screen ───────────────────────────────────────────── */

.dimension-header {
  margin-bottom: 1.75rem;
}

.dimension-header h2 {
  color: var(--color-accent);
}

.dimension-header p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ── Question ──────────────────────────────────────────────── */

.question {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.question-text {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ── Likert Scale ──────────────────────────────────────────── */

.likert-scale {
  display: flex;
  gap: 0.4rem;
  flex-wrap: nowrap;
}

.likert-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.likert-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.likert-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  padding: 0.5rem 0.25rem;
  border-radius: var(--radius);
  transition: background-color 0.15s;
  width: 100%;
  text-align: center;
}

.likert-option label:hover {
  background-color: var(--color-likert-hover);
}

.likert-option input[type="radio"]:checked + label {
  background-color: var(--color-accent-light);
}

.likert-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background-color: var(--color-likert-bg);
  transition: border-color 0.15s, background-color 0.15s;
  flex-shrink: 0;
}

.likert-option input[type="radio"]:checked + label .likert-circle {
  border-color: var(--color-accent);
  background-color: var(--color-accent);
}

.likert-label {
  font-size: 0.65rem;
  color: var(--color-text-light);
  line-height: 1.2;
}

/* ── Quiz Navigation ───────────────────────────────────────── */

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  gap: 1rem;
}

.quiz-nav .btn {
  min-width: 120px;
}

.quiz-nav-spacer {
  flex: 1;
}

/* ── Results Screen ────────────────────────────────────────── */

.results-header {
  text-align: center;
  margin-bottom: 2rem;
}

.overall-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 2rem;
  margin-bottom: 1rem;
}

.overall-score.band-exploring {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--color-score-exploring);
}
.overall-score.band-developing {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-score-developing);
}
.overall-score.band-proficient {
  background-color: rgba(13, 148, 136, 0.1);
  color: var(--color-score-proficient);
}
.overall-score.band-leading {
  background-color: rgba(5, 150, 105, 0.1);
  color: var(--color-score-leading);
}

.overall-interpretation {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  max-width: 560px;
  margin: 0 auto 1.5rem;
}

/* ── Radar Chart ───────────────────────────────────────────── */

.chart-container {
  max-width: 560px;
  margin: 0 auto 2.5rem;
  position: relative;
}

.chart-container canvas {
  width: 100% !important;
  height: auto !important;
}

/* ── Dimension Results ─────────────────────────────────────── */

.dimension-results {
  margin-bottom: 2.5rem;
}

.dimension-result {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.dimension-result-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
  gap: 0.75rem;
}

.dimension-result-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.dimension-result-score {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.dimension-score-bar {
  height: 6px;
  background-color: var(--color-border-light);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.dimension-score-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.dimension-result-text {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ── Recommendations ───────────────────────────────────────── */

.recommendations-section {
  margin-bottom: 2.5rem;
}

.recommendations-section h2 {
  margin-bottom: 1.25rem;
}

.recommendation-group {
  margin-bottom: 1.5rem;
}

.recommendation-group h3 {
  font-size: 0.95rem;
  color: var(--color-accent);
  margin-bottom: 0.6rem;
}

.recommendation-list {
  list-style: none;
}

.recommendation-item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.recommendation-item:last-child {
  border-bottom: none;
}

.recommendation-type {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-light);
  background-color: var(--color-likert-bg);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.recommendation-item a {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* ── Email Capture ─────────────────────────────────────────── */

.email-capture {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.email-capture h2 {
  margin-bottom: 0.5rem;
}

.email-capture p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.email-form {
  display: flex;
  gap: 0.6rem;
  max-width: 440px;
  margin: 0 auto 0.75rem;
}

.email-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-stack);
  background-color: var(--color-bg);
  transition: border-color 0.15s;
}

.email-input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.email-note {
  font-size: 0.78rem;
  color: var(--color-text-light);
  margin-bottom: 0;
}

.email-error {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: none;
}

.email-error.visible {
  display: block;
}

/* ── PDF Download ──────────────────────────────────────────── */

.pdf-download {
  text-align: center;
  margin-bottom: 2rem;
}

/* ── Loading spinner ───────────────────────────────────────── */

.spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 0.5rem;
}

.btn .spinner {
  display: none;
}

.btn.loading .spinner {
  display: inline-block;
}

.btn.loading .btn-text {
  opacity: 0.7;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 600px) {
  .container {
    padding: 1.25rem 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  #landing h1 {
    font-size: 1.65rem;
  }

  .likert-label {
    font-size: 0.58rem;
  }

  .likert-circle {
    width: 28px;
    height: 28px;
  }

  .likert-scale {
    gap: 0.25rem;
  }

  .likert-option label {
    padding: 0.4rem 0.15rem;
  }

  .email-form {
    flex-direction: column;
  }

  .email-form .btn {
    width: 100%;
  }

  .quiz-nav .btn {
    min-width: 100px;
    padding: 0.7rem 1.25rem;
    font-size: 0.9rem;
  }

  .question {
    padding: 1rem;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .container {
    padding: 2rem 1.5rem;
  }
}

/* ── Print ─────────────────────────────────────────────────── */

@media print {
  .btn,
  .email-capture,
  .quiz-nav,
  .progress-container,
  .pdf-download {
    display: none !important;
  }

  .screen {
    display: block !important;
  }

  body {
    background: #fff;
  }
}
