/*
  Badge 08 — Progress Badge — standalone HTML/CSS/JS implementation.
  No build step, no framework, no external dependency: copy index.html,
  this file, and script.js into any project as-is.
*/

.progress-badge {
  position: relative;
  display: inline-flex;
  height: 1.5rem;
  align-items: center;
  overflow: hidden;
  border-radius: 9999px;
  border: 1px solid oklch(0.87 0 0);
  padding: 0 0.625rem;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: oklch(0.145 0 0);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.progress-badge--complete {
  border-color: oklch(0.6 0.16 155 / 0.16);
}

.progress-badge__fill {
  position: absolute;
  inset: 0 auto 0 0;
  background-color: oklch(0.145 0 0 / 0.1);
  transition: width 220ms ease;
}

.progress-badge--complete .progress-badge__fill {
  background-color: oklch(0.6 0.16 155 / 0.16);
}

.progress-badge__face {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.progress-badge__check {
  display: none;
  width: 0.75rem;
  height: 0.75rem;
}

.progress-badge--complete .progress-badge__check {
  display: inline-flex;
}

@media (prefers-reduced-motion: reduce) {
  .progress-badge__fill {
    transition: none;
  }
}

/*
  Page layout — the canvas this resource is presented on. Adjust or drop it
  when placing the resource inside your own layout.
*/

body {
  margin: 0;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(to bottom, #fafafa, #f4f4f5);
}
.badge08-layout {
  display: flex;
  min-height: 20rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 1.5rem;
}
.badge08-layout__panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
  padding: 2rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 16px 40px -16px rgba(0, 0, 0, 0.14);
}
.badge08-layout__cycle {
  border-radius: 9999px;
  border: 0;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  color: #737373;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.badge08-layout__cycle:hover {
  color: #0f172a;
}
