/* Beacon surface tokens.

   The Beacon blue-to-purple gradient had three hard-coded copies before this file existed — the
   dashboard banner, the shared upload panel and, by omission, the OCR banners, which were a flat cyan
   border that matched none of them. Two of those copies carried a "change one and change the other"
   comment, which is the shape of a token layer nobody had written yet.

   It is a plain stylesheet rather than a set of .razor.css files because custom properties declared in
   scoped CSS cannot be shared: Blazor rewrites the selectors per component, so each would get its own
   private copy and the drift would start again. Served to both portals from
   _content/iLobby.ContractorOS.Web.Shared/css/, the way ai-matching-side-panel.css already is.

   AI Agent: Claude Code */

:root {
    /* The brand gradient, and the one definition of it. */
    --beacon-gradient: linear-gradient(90deg, #568ff6, #791bc9);

    /* OCR banner surfaces. Default is white behind the gradient border; the three states that follow a
       scan each sit on their own pale wash, deepening as the scan progresses from working to done. */
    --beacon-ocr-surface-default: linear-gradient(#fff, #fff);
    --beacon-ocr-surface-scanning: linear-gradient(90deg, #fbfcff, #fdfbff);
    --beacon-ocr-surface-complete: linear-gradient(90deg, #f2f6ff, #f7f1fd);
    --beacon-ocr-surface-incomplete: linear-gradient(90deg, #f6f4fd, #faf2fb);

    /* Figma codegen reports 2px, but a gradient clipped to the border box renders softer than a solid
       stroke, so this is what matches the mockup's weight. Carried over from the upload panel, which
       worked it out first. */
    --beacon-border-width: 2.7px;
}

/* A gradient cannot be a border-color, so both the OCR banner states paint one through a double
   background: the surface clipped to the padding box, the gradient clipped to the border box. */
.beacon-ocr-default,
.beacon-ocr-scanning,
.beacon-ocr-complete,
.beacon-ocr-incomplete {
    border: var(--beacon-border-width) solid transparent;
    border-radius: 10px;
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.beacon-ocr-default {
    background-image: var(--beacon-ocr-surface-default), var(--beacon-gradient);
}

.beacon-ocr-scanning {
    background-image: var(--beacon-ocr-surface-scanning), var(--beacon-gradient);
    position: relative;
    overflow: hidden;
}

.beacon-ocr-complete {
    background-image: var(--beacon-ocr-surface-complete), var(--beacon-gradient);
}

.beacon-ocr-incomplete {
    background-image: var(--beacon-ocr-surface-incomplete), var(--beacon-gradient);
}

/* The same highlight that crosses the AI-matching banner while a run is going, so a file being parsed
   here and a matching run there read as one kind of work. Inert, and clipped to the banner. */
.beacon-ocr-scanning::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(
        100deg,
        rgba(255, 255, 255, 0) 35%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0) 65%);
    transform: translateX(-100%);
    animation: beacon-shimmer 2.2s ease-in-out infinite;
}

@keyframes beacon-shimmer {
    to {
        transform: translateX(100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .beacon-ocr-scanning::after {
        display: none;
    }
}
