:root { --bar:#3498db; --text:#fff; }
body { margin:0; font-family:system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif; }

.csa-wrap{
  width: min(92vw, 900px);
  margin: 10vh auto;
  position: relative;
}

.csa-shape{
  position: relative;
  height: clamp(64px, 12vw, 180px);
  overflow: visible;
}

/* Animated bar (ball + rollout) */
.csa-rail{
  position: absolute;
  top: 0;
  left: 0;                 /* default anchor = left; JS can set center/right */
  height: 100%;
  width: 0;                /* JS: circle width then expands */
  border-radius: 9999px;   /* JS locks to px at runtime */
  visibility: hidden;      /* prevent preflash */
  z-index: 0;
}

/* TEXT container matches the rail’s width & anchor */
.csa-label{
  position: absolute;
  top: 0;
  left: 0;                 /* JS syncs anchor with rail */
  height: 100%;
  width: 0;                /* JS animates to match rail width */
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertical center */
  align-items: stretch;    /* text blocks fill width; text-align controls inline alignment */
  z-index: 1;
  color: var(--text, #fff);
  padding: 0 1rem;
  text-align: inherit;     /* shortcode controls left|center|right */
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;

  /* These are also set inline from PHP to prevent flash if CSS loads late */
  opacity: 0;
  transform: translateY(6px);
}

.csa-title{
  margin: 0;
  font: inherit;
  line-height: 1.2;
}

.csa-sub{
  font-weight: 500;
  line-height: 1.35;

  /* Also set inline from PHP to prevent flash */
  opacity: 0;
  transform: translateY(8px);
}

.csa-shape *{
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
