/* OKhuman LTI Tool — Styles */

/* Base */
body {
  font-family: system-ui, -apple-system, sans-serif;
  max-width: 750px;
  margin: 40px auto;
  padding: 0 20px;
  color: #171717;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: #a3a3a3;
  margin-bottom: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.header img {
  display: block;
}

/* Info box */
.info-box {
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 1rem;
}
.info-box h2 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem 0;
  color: #171717;
}
.info-box p {
  margin: 0.3rem 0;
  font-size: 0.9rem;
  color: #525252;
}
.desc {
  color: #525252;
  margin: 0.5rem 0;
}

/* Editor card */
.editor-card {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin-bottom: 1rem;
}

/* Section heading */
.section-heading {
  font-size: 0.95rem;
  font-weight: 500;
  color: #525252;
  margin: 1.2rem 0 0.5rem 0;
}

/* Textarea */
textarea {
  width: 100%;
  padding: 20px;
  border: none;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  line-height: 1.75;
  color: #171717;
  resize: none;
  box-sizing: border-box;
  outline: none;
}
textarea::placeholder {
  color: #a3a3a3;
}

/* Action bar (below textarea) */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e5e5e5;
  background: #f5f5f5;
  padding: 8px 16px;
}
.action-bar .status {
  font-size: 0.7rem;
  color: #a3a3a3;
  line-height: 1.3;
}

/* Save/Submit button */
.btn-primary {
  background: #f97316;
  color: white;
  border: none;
  padding: 6px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s;
}
.btn-primary:hover:not(:disabled) {
  background: #ea580c;
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Drop-code form (deep-link attach + Asset Processor "Modify") */
.dc-input {
  margin: 0.5rem 0.6rem 0.5rem 0;
  padding: 6px 10px;
  width: 16rem;
  max-width: 100%;
  font-size: 0.9rem;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
}
.dc-help {
  font-size: 0.8rem;
  color: #737373;
  margin-top: 0.75rem;
}
.dc-help a {
  color: #f97316;
}
.dc-linked a {
  color: #f97316;
  font-weight: 500;
}
/* Account-link section (Appendix G): ceremony CTA / connected / warning */
.dc-link-cta,
.dc-link-status,
.dc-link-warn {
  font-size: 0.8rem;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e5e5;
}
.dc-link-cta {
  color: #737373;
}
.dc-link-cta a,
.dc-link-warn a {
  color: #f97316;
}
/* Anchor rendered as the primary button (account-link ceremony CTA — must
   stay an <a target="_blank"> so okhuman.com opens first-party). Wins over
   the .dc-link-cta a color rule above by source order. */
a.btn-primary {
  display: inline-block;
  color: white;
  text-decoration: none;
}
.dc-link-status {
  color: #15803d;
}
.dc-link-warn {
  color: #92400e;
}
/* Account-link banner: Canvas ⇄ OKhuman bridge (lti_account_link._link_banner).
   Default styling is the disconnected state (dashed grey line, hollow badge);
   .lb-connected switches the connector to solid green with a filled badge. */
.link-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 340px;
  margin: 0.5rem auto 1.25rem;
}
.lb-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.lb-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.lb-logo {
  width: 27px;
  height: 27px;
  display: block;
}
/* The Canvas dot ring only reaches ~86% of its viewBox; 37px puts its visible
   circle at the extents of the white OK figure in the orange tile opposite. */
.lb-logo-canvas {
  width: 37px;
  height: 37px;
}
/* OKhuman's tile face is the favicon itself — orange to the border. */
.lb-tile-okhuman {
  background: #FF6900;
  border-color: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.lb-tile-okhuman .lb-logo {
  width: 100%;
  height: 100%;
}
.lb-name {
  font-size: 0.7rem;
  color: #737373;
}
.lb-connector {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  margin-top: 11px; /* (46px tile − 24px badge) / 2: centre on the tiles */
}
.lb-line {
  flex: 1;
  border-top: 2px dashed #d4d4d4;
}
.lb-badge {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  border: 1.5px solid #d4d4d4;
  box-sizing: border-box;
  color: #a3a3a3;
  font-size: 0.85rem;
  font-weight: 600;
}
.lb-badge svg {
  width: 13px;
  height: 13px;
  display: block;
}
.lb-connected .lb-line {
  border-top-style: solid;
  border-top-color: #15803d;
}
.lb-connected .lb-badge {
  background: #15803d;
  border-color: #15803d;
  color: white;
}

/* One-click create (Modify form, linked educator, nothing mapped yet) */
.dc-create {
  margin-top: 0.75rem;
}

/* Course dashboard landing page (/lti/dashboard) */
.dash-list {
  list-style: none;
  margin: 0.75rem 0 0.25rem 0;
  padding: 0;
}
.dash-list li {
  padding: 8px 0;
  border-bottom: 1px solid #e5e5e5;
}
.dash-list li:last-child {
  border-bottom: none;
}
.dash-list a {
  color: #f97316;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}
.dash-list a:hover {
  text-decoration: underline;
}

/* Result page */
.result {
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 1.05rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.result.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.result.fail {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
.result.warn {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}
.result .icon {
  font-size: 1.5rem;
}
.grade {
  color: #155724;
  font-weight: 600;
}
.error {
  color: #721c24;
}

/* Instructor page */
.info-box ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}
.info-box li {
  font-size: 0.9rem;
  color: #525252;
  margin: 0.3rem 0;
}

/* Identity / details tables */
.identity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.identity-table th,
.identity-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid #e5e5e5;
  vertical-align: top;
  color: #525252;
}
.identity-table th {
  white-space: nowrap;
  color: #171717;
  font-weight: 500;
  width: 40%;
}
.identity-table code {
  font-size: 0.8rem;
  word-break: break-all;
}

/* Setup checklist */
.checklist {
  list-style: none;
  margin: 0.5rem 0 0 0;
  padding: 0;
}
.check-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e5e5e5;
}
.check-item:last-child {
  border-bottom: none;
}
.check-icon {
  flex: none;
  width: 1.4rem;
  font-size: 1.1rem;
  line-height: 1.4;
  text-align: center;
}
.check-done .check-icon { color: #1a7f37; }
.check-wait .check-icon { color: #9a6700; }
.check-blocked .check-icon { color: #b3261e; }
.check-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: #171717;
}
.check-sub {
  font-size: 0.85rem;
  color: #525252;
  margin: 0.15rem 0;
}
.check-owner {
  font-size: 0.78rem;
  color: #a3a3a3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
