.marker-stage {
  align-items: flex-start;
}

.marker-demo {
  width: min(100%, 24rem);
  display: grid;
  gap: 36px;
}

.marker-group {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.marker-group-compact {
  gap: 12px;
}

.marker-demo-label {
  color: var(--foreground);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.marker {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted-foreground);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.25rem;
  text-align: left;
  text-decoration: none;
}

.marker-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
}

.marker-icon svg {
  width: 1rem;
  height: 1rem;
}

.marker-content {
  min-width: 0;
  overflow-wrap: break-word;
}

.marker-separator::before,
.marker-separator::after {
  content: "";
  height: 1px;
  min-width: 0;
  flex: 1 1 0;
  background: var(--border);
}

.marker-separator::before {
  margin-right: 0.25rem;
}

.marker-separator::after {
  margin-left: 0.25rem;
}

.marker-separator .marker-content {
  flex: 0 0 auto;
  text-align: center;
}

.marker-border {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.marker-action {
  cursor: pointer;
  transition: color 150ms ease;
}

.marker-action:hover {
  color: var(--foreground);
}

.marker-action:focus-visible {
  border-radius: 2px;
}

a.marker-action {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.marker-action:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.marker-stacked {
  flex-direction: column;
}

.marker-spinner {
  animation: marker-spin 1s linear infinite;
}

.marker-shimmer {
  --marker-shimmer-width: 7rem;
  color: transparent;
  background-image: linear-gradient(
    110deg,
    var(--muted-foreground) calc(50% - var(--marker-shimmer-width)),
    color-mix(in srgb, var(--foreground) 72%, transparent) calc(50% - var(--marker-shimmer-width) / 2),
    var(--foreground) 50%,
    color-mix(in srgb, var(--foreground) 72%, transparent) calc(50% + var(--marker-shimmer-width) / 2),
    var(--muted-foreground) calc(50% + var(--marker-shimmer-width))
  );
  background-repeat: no-repeat;
  background-size: calc(200% + var(--marker-shimmer-width) * 2) 100%;
  background-clip: text;
  -webkit-background-clip: text;
  animation: marker-shimmer 2s linear infinite;
}

@keyframes marker-spin {
  to { transform: rotate(360deg); }
}

@keyframes marker-shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

@media (max-width: 540px) {
  .marker-demo {
    gap: 32px;
  }

  .marker-group {
    gap: 18px;
  }

  .marker-group-compact {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marker-spinner,
  .marker-shimmer {
    animation: none;
  }

  .marker-shimmer {
    color: var(--muted-foreground);
    background: none;
  }
}
