/* Page metadata banner - rendered after the H1 of any page listed in
   metadata.yml. Communicates time, difficulty, hardware, and prereqs up
   front so a learner knows what they are committing to before they dive in. */

.page-meta {
  margin: 1.25rem 0 1.75rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--md-accent-fg-color, #4051b5);
  background: var(--md-code-bg-color, rgba(0, 0, 0, 0.04));
  border-radius: 0.25rem;
  font-size: 0.85rem;
  line-height: 1.55;
}

.page-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin: 0 0 0.6rem;
}

.page-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--md-default-bg-color, #fff);
  border: 1px solid var(--md-default-fg-color--lightest, rgba(0, 0, 0, 0.12));
  color: var(--md-default-fg-color, #000);
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}

/* "Needs" row - rendered as a wrapping label + text line below the pills
   instead of as a pill, because the hardware string is often long and would
   blow past the container width as a single non-wrapping pill. */
.page-meta-needs {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.page-meta-needs-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  opacity: 0.7;
  margin-right: 0.3rem;
}

.page-meta-needs-value {
  word-break: break-word;
}

.page-meta-pill-label {
  font-weight: 600;
  margin-right: 0.3rem;
  opacity: 0.65;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Difficulty pill - colored by level */
.page-meta-difficulty-quick {
  background: #e8f5e9;
  border-color: #66bb6a;
  color: #175218; /* darkened from #1b5e20 to clear WCAG AA (4.99:1) */
}
.page-meta-difficulty-deep {
  background: #e3f2fd;
  border-color: #42a5f5;
  color: #0d47a1;
}
.page-meta-difficulty-capstone {
  background: #fff3e0;
  border-color: #ff9800;
  color: #c44400; /* darkened from #e65100 to clear WCAG AA (5.07:1) */
}

[data-md-color-scheme="slate"] .page-meta-difficulty-quick {
  background: rgba(102, 187, 106, 0.18);
  color: #a5d6a7;
}
[data-md-color-scheme="slate"] .page-meta-difficulty-deep {
  background: rgba(66, 165, 245, 0.18);
  color: #90caf9;
}
[data-md-color-scheme="slate"] .page-meta-difficulty-capstone {
  background: rgba(255, 152, 0, 0.18);
  color: #ffcc80;
}

.page-meta-prereqs {
  margin: 0.45rem 0 0;
}

.page-meta-prereqs-label {
  font-weight: 600;
  margin-right: 0.3rem;
}

.page-meta-prereqs ul {
  margin: 0.25rem 0 0;
  padding-left: 1.3rem;
}

.page-meta-prereqs li {
  margin: 0.1rem 0;
}

.page-meta-sandbox {
  margin-top: 0.7rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.page-meta-sandbox-hint {
  font-size: 0.78rem;
  opacity: 0.75;
}

/* Landing-page hero CTA - one prominent recommended starting point. */
.hero-cta {
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--md-accent-fg-color, #4051b5);
  border-radius: 0.4rem;
  background: linear-gradient(
    135deg,
    rgba(64, 81, 181, 0.06),
    rgba(64, 81, 181, 0.02)
  );
}

.hero-cta p:first-child {
  margin-top: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.hero-cta p:last-of-type {
  margin-bottom: 0.85rem;
}

[data-md-color-scheme="slate"] .hero-cta {
  background: linear-gradient(
    135deg,
    rgba(144, 202, 249, 0.1),
    rgba(144, 202, 249, 0.04)
  );
}

/* Path progress bar - rendered on every paths/<slug>/index page by progress.js
   after counting localStorage entries under that path. */
.path-progress {
  margin: 1rem 0 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--md-code-bg-color, rgba(0, 0, 0, 0.04));
  border-radius: 0.25rem;
  font-size: 0.85rem;
}

.path-progress-empty {
  display: none;
}

.path-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
}

.path-progress-label {
  font-weight: 600;
}

.path-progress-count {
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.path-progress-bar {
  width: 100%;
  height: 0.5rem;
  background: var(--md-default-fg-color--lightest, rgba(0, 0, 0, 0.1));
  border-radius: 999px;
  overflow: hidden;
}

.path-progress-bar-fill {
  height: 100%;
  background: var(--md-accent-fg-color, #4051b5);
  transition: width 0.25s ease-out;
}

/* "Submit your build" block, rendered at the end of every page that
   has a deliverables: list in metadata.yml. */
.page-deliverables {
  margin: 2.5rem 0 1rem;
  padding: 1.25rem 1.4rem;
  border-top: 2px solid var(--md-accent-fg-color, #4051b5);
  background: var(--md-code-bg-color, rgba(0, 0, 0, 0.04));
  border-radius: 0 0 0.4rem 0.4rem;
}

.page-deliverables h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.page-deliverables-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.3rem;
}

.page-deliverables-list li {
  margin: 0.25rem 0;
}
