/* ============================================================
   NOTOSAURUS - STYLE (supplements common.css + Tailwind)
   ============================================================ */

/* Header dino sticker: placed by hand, slightly crooked */
.header-logo {
    --sticker-tilt: -2deg;
    transform: rotate(var(--sticker-tilt));
}

/* The phone header: the notepad dino has no drawn sticker file, so his sticker is cut in CSS,
   a white border laid around his shape, about the width the drawn stickers wear at this size.
   The lift shadow on hover is added on top, so the border never drops away. */
.header-logo-cut {
    --sticker-cut: drop-shadow(5px 0 0 #fafafa) drop-shadow(-5px 0 0 #fafafa)
                   drop-shadow(0 5px 0 #fafafa) drop-shadow(0 -5px 0 #fafafa);
    filter: var(--sticker-cut);
    will-change: filter;   /* painted on its own layer: without this, the browser can skip the border until the first repaint (a hover, a scroll), so it looked as if the border appeared only on hover */
}

@media (hover: hover) {
    .header-logo-cut:hover {
        filter: var(--sticker-cut) drop-shadow(var(--shadow-paper-lift));
    }
}

/* Provider dropdown behavior */
#provider-dropdown {
    position: relative;
}

/* Status stickers: the same paper, ink, edge and size as the small cream buttons beside them, so a
   row reads as one set; only the plain arrow says they are not pressed. A dino sticker color once
   the step reports something. They report in short sentences, in the readable body font. */
.status-sticker {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 13px;
    line-height: 1.25;
    padding: 0.375rem 0.75rem;
    min-height: 2rem;            /* exactly the small buttons' height */
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-md);   /* the same corner as the buttons beside it */
    background: var(--paper-cream);
    color: var(--ink-text);
    border: 1px solid rgba(69, 26, 3, 0.25);   /* the cream buttons' edge */
    box-shadow: var(--shadow-sheet);
}

.status-sticker.hidden {
    display: none;
}

.status-sticker.is-active.sticker-coat {
    background: var(--dino-coat);
    color: var(--on-green);
}

.status-sticker.is-active.sticker-amber {
    background: var(--dino-amber);
    color: var(--ink-900);   /* deepest ink: the text ink is too light on amber */
}

/* ============================================================
   THE TWO JOBS: Voice and Apply Voice, as two tabs on one sheet (the tabs are common.css's
   .input-tabs). Each job opens with one line saying what it is for, in the body font, with
   room under it for the label tabs of the boxes below.
   ============================================================ */

.tab-lead {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--ink-text);
    /* The label tabs of the boxes below stand 30px proud of them, so a plain 1rem leaves only
       6px of air under this line. The room is measured to what you see, not to the boxes. */
    margin: 0 0 var(--space-8);
}

/* ============================================================
   FLOW ARROWS
   Sticker labels stuck on the sheet between the boxes, showing the path
   Your Writing → Your Voice on the Voice tab, and Your Notes → In Your Voice on the Apply
   Voice tab.
   They stay in their spot: the text ink with a paper-cream die-cut edge,
   lit from the lamp (the edge glints top left, the shadow falls down right).
   With a mouse they fidget when touched, and the arrow to the next step
   fidgets once when a step finishes. Only where the boxes sit side by side;
   stacked on narrower screens the path is plain top to bottom.
   ============================================================ */

.flow-arrow {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 30;
    width: 26px;
    height: 26px;
    /* Stuck on a touch crooked, the way a small sticker lands; each one lands differently,
       since a hand never places two exactly alike. Angles stay small so the arrow still
       plainly points the way. */
    transform: translate(-50%, -50%) rotate(-8deg);
    filter: drop-shadow(var(--shadow-sheet));   /* stuck flat on the folder, like the sticker dinos */
    overflow: visible;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
}

/* Die cut like the dinos: the cream edge is a real outline drawn behind the shape. Drawn in the
   text ink, since green on this desk means "press me" and the arrows only show the way. */
.flow-arrow path {
    fill: var(--ink-text);
    stroke: var(--paper-cream);
    stroke-width: 11;   /* drawn at 48; a hair thicker so the small sticker keeps its edge */
}

@media (max-width: 1023.98px) {
    .flow-arrow {
        display: none;
    }
}

/* The arrows are pressed on last, once the desk is laid out: held a touch big above the paper in
   the lifted shadow, then pressed flat, like the dino sticker. Scale and translate rather than
   transform, so each arrow keeps its place and its crooked tilt; it lets go when it is done
   (backwards, not both), so the fidgets can move it. */
@keyframes arrow-press {
    0%   { scale: 1.2;  translate: -1px -3px; filter: drop-shadow(var(--shadow-paper-lift)); }
    55%  { scale: 0.95; translate: 0 0;       filter: drop-shadow(var(--shadow-sheet)); }
    100% { scale: 1;    translate: 0 0;       filter: drop-shadow(var(--shadow-sheet)); }
}

@media (prefers-reduced-motion: no-preference) {
    .flow-arrow {
        animation: arrow-press 0.35s var(--ease-standard) 0.4s backwards;
    }
}

/* Fidgets: a little hop, a wiggle, and a lean the way the arrow points; it always settles back */
@keyframes flow-fidget-across {
    0%   { translate: 0 0;      rotate: 0deg; }
    25%  { translate: 2px -3px; rotate: -8deg; }
    50%  { translate: 6px -1px; rotate: 6deg; }
    75%  { translate: 3px 0;    rotate: -3deg; }
    100% { translate: 0 0;      rotate: 0deg; }
}

/* The page-open motion stays first in every list, so a fidget never replays the arrow sticking on */
@media (prefers-reduced-motion: no-preference) {
    .flow-arrow-across.is-nudging {
        animation: arrow-press 0.35s var(--ease-standard) 0.4s backwards,
                   flow-fidget-across 0.7s var(--ease-standard) 2;
    }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .flow-arrow-across:hover {
        animation: arrow-press 0.35s var(--ease-standard) 0.4s backwards,
                   flow-fidget-across 0.7s var(--ease-standard);
    }
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--spinner-track);
    border-top-color: var(--ink-900);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

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

/* (The Clue / Casefile toggle is gone: every tool shows for everyone) */