/* public/css/lesson-plan.css
 * Lesson-plan-specific styles. Top-level layout reuses teacher.css; this
 * file provides grid + heatmap + timeline primitives the inline styles
 * in views/teacher/lesson-plan*.ejs depend on.
 */

.lp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.lp-week-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: grab;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.lp-week-card:hover {
  box-shadow: 0 4px 14px rgba(99,102,241,0.12);
}
.lp-week-card:active { cursor: grabbing; }

.lp-week-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lp-drag-handle {
  color: #94a3b8;
  font-size: 16px;
  cursor: grab;
  user-select: none;
}

.lp-week-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex: 1;
}

.lp-week-num {
  font-weight: 700;
  color: #1e293b;
  font-size: 13px;
}

.lp-week-break {
  font-size: 11px;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 6px;
  border-radius: 4px;
}

.lp-week-mission {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.lp-mission-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.lp-week-xp {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: #6366f1;
  background: #eef2ff;
  padding: 2px 7px;
  border-radius: 4px;
}

.lp-week-empty {
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
}

.lp-week-break-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}

.lp-objectives-form textarea {
  font-family: inherit;
  font-size: 12px;
}

.lp-coverage-banner {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  padding: 14px 18px;
}

.lp-coverage-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 14px;
  margin-right: 4px;
  margin-bottom: 4px;
}
.lp-coverage-chip.covered { background: #dcfce7; color: #15803d; }
.lp-coverage-chip.missing { background: #fee2e2; color: #b91c1c; }

/* ── Heatmap (per-student × state-standard codes) ───────────────────────── */

.lp-heatmap-wrapper {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.lp-heatmap {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}

.lp-heatmap th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 6px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.lp-heatmap td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.lp-heatmap-student {
  min-width: 180px;
  text-align: left;
  white-space: nowrap;
}

.lp-heatmap-col {
  min-width: 60px;
  text-align: center;
}

.lp-heatmap-cell {
  text-align: center;
  font-weight: 600;
  border-radius: 4px;
  min-width: 48px;
}

.lp-heatmap-row:hover .lp-heatmap-cell {
  outline: 2px solid #6366f1;
  outline-offset: -2px;
}

/* ── Per-student timeline (mission dots) ─────────────────────────────────── */

.lp-roster-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 12px;
}

.lp-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 4px;
}

.lp-timeline-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.lp-timeline-dot.completed {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.lp-timeline-dot.upcoming {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.lp-timeline-dot.skipped {
  background: #fef2f2;
  color: #fca5a5;
  border: 1px solid #fecaca;
  font-size: 16px;
}

.lp-timeline-dot.empty {
  background: transparent;
  color: #cbd5e1;
  border: 1px dashed #cbd5e1;
}

/* ── Printable weekly view (substitute-friendly) ─────────────────────────── */

.lp-print-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1e293b;
  background: #fff;
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 40px 80px;
  line-height: 1.5;
}

.lp-print-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 3px solid #6366f1;
  margin-bottom: 24px;
}

.lp-print-class {
  font-size: 22px;
  font-weight: 800;
  color: #1e293b;
}

.lp-print-week-line {
  font-size: 13px;
  color: #475569;
  margin-top: 4px;
}

.lp-print-brand {
  font-size: 15px;
  font-weight: 700;
  color: #6366f1;
}

.lp-print-section {
  margin-bottom: 24px;
  page-break-inside: avoid;
}

.lp-print-section h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6366f1;
  margin: 0 0 10px;
}

.lp-print-mission {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 14px 18px;
}

.lp-print-mission-icon {
  font-size: 28px;
}

.lp-print-mission-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}

.lp-print-xp {
  font-size: 12px;
  font-weight: 700;
  color: #6366f1;
}

.lp-print-objectives {
  font-size: 14px;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  line-height: 1.7;
  margin: 0;
}

.lp-print-standards {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.lp-print-standards li {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
}

.lp-print-roster {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.lp-print-roster-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  color: #1e293b;
}

.lp-print-roster-meta {
  color: #64748b;
  font-size: 11px;
}

.lp-print-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}

@media print {
  .lp-print-btn { display: none; }
  .lp-print-page { padding: 24px 32px; max-width: none; }
  .lp-print-section { page-break-inside: avoid; }
  .lp-print-header { border-bottom-color: #1e293b; }
}
