/* 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, sampled from the Figma swatches rather than eyeballed. Default is white
       behind the gradient border. Scanning runs white into the wash, so the shimmer below has
       something to lighten — the first cut was #fbfcff→#fdfbff, white in all but name, and a white
       sweep over it reads as no animation at all. Incomplete runs the wash the other way: the
       "requires attention" count sits on the right, and the design puts it on white so the red reads. */
    --beacon-ocr-surface-default: linear-gradient(#fff, #fff);
    --beacon-ocr-surface-scanning: linear-gradient(90deg, #fff 0%, #eef4fe 50%, #f2e9fa 100%);
    --beacon-ocr-surface-complete: linear-gradient(90deg, #edf3fd, #f1e8f9);
    --beacon-ocr-surface-incomplete: linear-gradient(90deg, #eef3fe 0%, #f2e9fa 37%, #fff 75%);

    /* 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;

    /* Every line of banner copy is the Beacon navy — the same colour the sparkle's two small marks are
       already drawn in. The two banners had each drifted to their own near-black, a grey-blue and a
       link blue, neither of which is what the design asks for. */
    --beacon-ocr-text: #000b27;
}

/* The box the four OCR banner states share, so they cannot drift apart again — they did once, into two
   components with two copies of the same measurements. Figma redlines it as 16px padding and 4px
   between the sparkle and its text, which with the 24px mark makes the banner 56px tall without a
   height ever being set; the 92px one it replaces came from padding guessed before the redlines. */
.beacon-ocr-banner {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px;
    margin-bottom: 16px;
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: var(--beacon-ocr-text);
}

/* The row inside that box. It lives here for the same reason the box does: both banners had their own
   copy of these four declarations, differing only in how the row is justified, and the spinner's copy
   had the centring baked in where the other made it a modifier. Centred is the common case; only a
   banner reporting a count on each side spreads them. */
.beacon-ocr-banner__row {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.beacon-ocr-banner__row--spread {
    justify-content: space-between;
}

/* 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;
    }
}
