/* ==========================================================================
   Neft Teacher — Projects ANSWER-KEY LINK layer (shared)
   Styling for the teacher-only link from a project wizard page to its own
   unit's answer key. Companion to projects-answerkey-link.js.

   The gate is in the JS, not here: students never receive this markup at all,
   so nothing in this file is load-bearing for privacy. Everything is scoped
   under body.pro-projects so it cannot leak into any other page, and the whole
   bar is removed from print output (an answer-key pointer has no business on a
   student handout).
   Injected by tools/inject-projects-answerkey-link.mjs.
   ========================================================================== */
body.pro-projects .ntak-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  max-width: 1100px;
  margin: 14px auto 0;
  padding: 12px 16px;
  border: 2px dashed rgba(126, 34, 206, 0.45);
  border-radius: 14px;
  background: rgba(126, 34, 206, 0.07);
  color: #5b21b6;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.45;
}

body.pro-projects .ntak-bar .ntak-badge {
  flex: 0 0 auto;
  font-size: 20px;
}

body.pro-projects .ntak-bar .ntak-text {
  flex: 1 1 220px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

body.pro-projects .ntak-bar .ntak-link {
  flex: 0 0 auto;
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  background: #7e22ce;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  transition:
    background-color 0.18s ease,
    transform 0.18s ease;
}

body.pro-projects .ntak-bar .ntak-link:hover,
body.pro-projects .ntak-bar .ntak-link:focus-visible {
  background: #6b21a8;
  transform: translateY(-1px);
}

body.pro-projects .ntak-bar .ntak-link:focus-visible {
  outline: 3px solid rgba(126, 34, 206, 0.45);
  outline-offset: 3px;
}

/* Answer key present but behind the teacher-area sign-in (HTTP 401/403). */
body.pro-projects .ntak-bar[data-ntak-state="locked"] {
  border-color: rgba(180, 83, 9, 0.5);
  background: rgba(217, 119, 6, 0.09);
  color: #92400e;
}
body.pro-projects .ntak-bar[data-ntak-state="locked"] .ntak-link {
  background: #b45309;
}
body.pro-projects .ntak-bar[data-ntak-state="locked"] .ntak-link:hover,
body.pro-projects .ntak-bar[data-ntak-state="locked"] .ntak-link:focus-visible {
  background: #92400e;
}

/* No key published for this unit — the link is inert, so it must not look
   clickable. */
body.pro-projects .ntak-bar[data-ntak-state="missing"] {
  border-color: rgba(100, 116, 139, 0.45);
  background: rgba(100, 116, 139, 0.08);
  color: #475569;
}
body.pro-projects .ntak-bar[data-ntak-state="missing"] .ntak-link {
  background: #94a3b8;
  cursor: not-allowed;
  pointer-events: none;
}

body.pro-projects .ntak-bar .ntak-note {
  flex: 1 1 100%;
  margin: 2px 0 0;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.5;
  opacity: 0.95;
}

@media (max-width: 640px) {
  body.pro-projects .ntak-bar {
    margin-left: 12px;
    margin-right: 12px;
    font-size: 14px;
  }
  body.pro-projects .ntak-bar .ntak-link {
    flex: 1 1 100%;
    text-align: center;
  }
}

@media print {
  body.pro-projects .ntak-bar {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.pro-projects .ntak-bar .ntak-link {
    transition: none;
  }
  body.pro-projects .ntak-bar .ntak-link:hover,
  body.pro-projects .ntak-bar .ntak-link:focus-visible {
    transform: none;
  }
}

@media (prefers-color-scheme: dark) {
  body.pro-projects .ntak-bar {
    background: rgba(126, 34, 206, 0.16);
    color: #d8b4fe;
    border-color: rgba(168, 85, 247, 0.5);
  }
  body.pro-projects .ntak-bar[data-ntak-state="locked"] {
    background: rgba(217, 119, 6, 0.16);
    color: #fcd34d;
    border-color: rgba(217, 119, 6, 0.5);
  }
  body.pro-projects .ntak-bar[data-ntak-state="missing"] {
    background: rgba(100, 116, 139, 0.16);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.45);
  }
}
