/* Servicing Provider Eligibility page · css/servicing-provider-eligibility.css
   The question header comes from product-page.css, the answers from
   provider-answer.css, and the sections and the batch card from
   endpoint-page.css.

     Hero         the question header, with the match on the right
     Where it fits  the batch card, moved down from the hero              */

/* The match: the provider's specialty on one side, the class item 104
   needs on the other. Item 104 is a specialist attendance, and a
   specialist pathologist is a specialist. A short pulse runs between them, the item's empty slot
   locks in green with a tick, and the verdict wipes in beneath with its
   reason. One column in a narrow figure, side by side when it has room. */
.match { margin: 0; container-type: inline-size; }
.match-stage { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.match-side { margin: 0; display: grid; justify-items: center; gap: var(--space-8); min-inline-size: 0; }
.match-label { font-size: var(--type-label-m); color: var(--color-stone-60); line-height: 1.5; }
.match-label b { font-family: var(--font-sans); font-weight: 600; color: var(--color-midnight); font-feature-settings: "tnum" 1; }
.match-chip {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; gap: var(--space-8);
  block-size: 2.75rem; padding-inline: var(--space-16); border-radius: 999px;
  background: var(--color-paper); border: 1px solid color-mix(in srgb, var(--color-navy) 18%, transparent);
  font-size: var(--type-body-s); font-weight: 500; color: var(--color-midnight); white-space: nowrap;
}
.match-chip svg { inline-size: 1.1rem; block-size: 1.1rem; color: var(--color-royal); }
.match-chip.is-slot { background: transparent; border-style: dashed; border-color: color-mix(in srgb, var(--color-navy) 32%, transparent); }
/* The lock: a solid green ring over the dashed slot. */
.match-chip.is-slot::before {
  content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit;
  border: 1.5px solid var(--verdict-eligible);
  background: color-mix(in srgb, var(--verdict-eligible) 8%, var(--color-paper));
  animation: match-lock 14s var(--ease-standard) infinite;
}
.match-mark {
  position: absolute; inset-block-start: -0.55rem; inset-inline-end: -0.55rem;
  display: grid; place-items: center; inline-size: 1.4rem; block-size: 1.4rem; border-radius: 50%;
  background: var(--verdict-eligible); color: var(--color-paper);
  box-shadow: 0 0 0 3px var(--color-paper);
  animation: match-mark 14s var(--ease-standard) infinite;
}
.match-mark svg { inline-size: 0.75rem; block-size: 0.75rem; color: currentColor; }

/* The link between the two: a dashed line with one short pulse on it. */
.match-link { position: relative; inline-size: 0; block-size: 3rem; margin-block: var(--space-12);
  border-inline-start: 1.5px dashed color-mix(in srgb, var(--color-royal) 40%, transparent); }
.match-link::after {
  content: ""; position: absolute; inset-inline-start: -2.25px; inset-block-start: 0;
  inline-size: 3px; block-size: 0.9rem; border-radius: 3px; background: var(--color-royal);
  opacity: 0; animation: match-run-y 14s var(--ease-standard) infinite;
}

.match-verdict { margin: var(--space-24) 0 0; display: grid; justify-items: center; gap: var(--space-8); text-align: center;
  animation: match-verdict 14s var(--ease-standard) infinite; }
.match-pill {
  display: inline-flex; align-items: center; gap: var(--space-8);
  padding: 0.3rem 0.8rem; border-radius: 999px;
  font-size: var(--type-label-s); font-weight: 600; letter-spacing: var(--track-eyebrow); text-transform: uppercase;
  color: var(--verdict-eligible); background: color-mix(in srgb, var(--verdict-eligible) 10%, transparent);
}
.match-pill::before { content: ""; inline-size: 8px; block-size: 8px; border-radius: 50%; background: currentColor; }
.match-why { max-inline-size: 26rem; font-size: var(--type-label-m); color: var(--color-stone-60); line-height: 1.5; text-wrap: balance; }
.match figcaption { margin-block-start: var(--space-20); padding-block-start: var(--space-16);
  border-block-start: 1px solid var(--color-stone-20); color: var(--color-stone-60); text-align: center; }

/* Side by side when the figure has room. */
@container (min-width: 30rem) {
  .match-stage { grid-template-columns: minmax(0, 1fr) minmax(2.5rem, 4.5rem) minmax(0, 1fr); align-items: end; }
  .match-link { align-self: end; inline-size: auto; block-size: 0; margin: 0 var(--space-8) calc(1.375rem - 0.75px);
    border-inline-start: 0; border-block-start: 1.5px dashed color-mix(in srgb, var(--color-royal) 40%, transparent); }
  .match-link::after { inset-block-start: -2.25px; inset-inline-start: 0; inline-size: 0.9rem; block-size: 3px;
    animation-name: match-run-x; }
}

/* Fourteen seconds: the pulse runs, the slot locks and the verdict reads
   within four, then the answer holds for nine seconds of reading before all
   of it eases back for the next check. */
@keyframes match-run-y {
  0%, 3.5% { inset-block-start: 0; opacity: 0; }
  5.5% { opacity: 1; }
  14% { inset-block-start: calc(100% - 0.9rem); opacity: 1; }
  16%, 100% { inset-block-start: calc(100% - 0.9rem); opacity: 0; }
}
@keyframes match-run-x {
  0%, 3.5% { inset-inline-start: 0; opacity: 0; }
  5.5% { opacity: 1; }
  14% { inset-inline-start: calc(100% - 0.9rem); opacity: 1; }
  16%, 100% { inset-inline-start: calc(100% - 0.9rem); opacity: 0; }
}
@keyframes match-lock { 0%, 15% { opacity: 0; } 19%, 93% { opacity: 1; } 98%, 100% { opacity: 0; } }
@keyframes match-mark { 0%, 17% { transform: scale(0); } 20.5% { transform: scale(1.12); } 23%, 93% { transform: scale(1); } 97.5%, 100% { transform: scale(0); } }
@keyframes match-verdict { 0%, 21.5% { clip-path: inset(0 100% 0 0); } 28.5%, 93% { clip-path: inset(0 0 0 0); } 98%, 100% { clip-path: inset(0 100% 0 0); } }

@media (prefers-reduced-motion: reduce) {
  /* Still: the match made, the slot locked and the verdict read. */
  .match-chip.is-slot::before, .match-mark, .match-verdict, .match-link::after { animation: none; }
}

/* Where it fits: three lines of a batch, checked before they are lodged. */
.spe-batch { margin: var(--space-48) 0 0; max-inline-size: 34rem; }
.spe-batch .card-caption { margin-block-start: var(--space-12); font-size: var(--type-body-s); color: var(--color-stone-60); font-style: italic; }
