/* addmenu.css -- the eight doors, as Chris approved them on 28 Aug.
 *
 * Numbers are the shipped ones: a 724px box with 18px padding and a 16px
 * radius, cards on a 164px minimum with a 10px gap, 1.5px borders at 14px
 * radius with 10px padding and an 8px internal gap, a 110px well on the
 * blueprint ground, titles at 11.5/800 and captions at 9.5/600.
 *
 * NO BACKDROP RULE EXISTS HERE, and the absence is the design rather than an
 * omission. Nothing dims, nothing behind is disabled, and the case stays
 * visible -- see the paragraph in addmenu.js about why this is a menu and not a
 * modal. If a backdrop ever appears in this file, that decision was reversed by
 * somebody who had not read it.
 */

#cs-addmenu {
    position: absolute;
    left: 90px;
    top: 16px;
    z-index: 20;
    width: 724px;
    max-width: calc(100% - 102px);

    /* IT CAN NEVER RUN OFF THE BOTTOM OF THE WINDOW.
       Found on the first live walk: at a 1320x657 viewport the menu was 613px
       tall inside a document that is exactly the height of the window and
       cannot scroll, so the last row -- Shapes and Upload File -- was cut off
       with no way to reach it. Shapes is currently the only door that does
       anything.
       A cap plus an internal scroller means the menu shrinks to what there is
       and takes its own scrollbar rather than putting rows somewhere nobody can
       get to. stable so the grid does not rewrap the moment it appears. */
    max-height: calc(100% - 32px);
    overflow-y: auto;
    /* NO scrollbar-gutter HERE, and that is deliberate rather than an omission.
       Four columns fit this box by TWO PIXELS: 724 less 36 of padding is 688,
       and four 164px minimums with three 10px gaps is 686. Reserving a gutter
       takes about fifteen of those and the grid drops to three columns -- in
       every window, to smooth a rewrap in the rare one that actually scrolls.
       Caught by the assertion added with this fix, which is the only reason it
       is not in the tree. When the menu does have to scroll, dropping a column
       is the correct thing for it to do. */
    padding: 18px;
    background: var(--cs-white);
    border: 1px solid var(--cs-hairline);
    border-radius: var(--cs-r-menu);
    box-shadow: 0 18px 50px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .06);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cs-add-title {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: var(--cs-ink);
}

/* FOUR ACROSS WITHOUT A BREAKPOINT. auto-fit on a minimum, so a narrow window
   drops to three and then two on its own -- no media query to keep in step with
   the box width, and no JavaScript.

   THE MINIMUM IS 160 AND IT WAS 164, WHICH LEFT ZERO SLACK -- found by opening
   the live page at Chris's own browser zoom, 29 Aug, where the menu showed
   THREE columns.

     the grid gets   724 - 2 (border) - 36 (padding)  = 686
     four need       4 x 164 + 3 x 10                 = 686

   Exactly nothing spare, so any zoom whose subpixel rounding lands a fraction
   low loses a column. At 67% it measures 685 and wraps. The comment this
   replaces claimed two pixels of room and got there by forgetting the border --
   the reasoning was wrong from the day the menu was built.

   AND NO GATE COULD SEE IT: the fixture runs at devicePixelRatio 1, where the
   same arithmetic comes out at exactly 686 and passes with nothing to spare. A
   check can be perfectly consistent and still answer the wrong question when
   the input that moves is one it does not model -- here, the customer's zoom.

   160 buys 16px of slack and changes NOTHING visible: minmax's floor decides
   when to wrap, not how wide a card is, so with four columns they still realise
   at 164 -- which is the width the longest caption was measured against. The
   assertion in t-stage requires the slack rather than the column count, so
   putting 164 back goes red instead of shipping green at the edge. */
.cs-add-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.cs-add-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--cs-white);
    border: var(--cs-border) solid var(--cs-line);
    border-radius: var(--cs-r-card);
    font-family: inherit;
    text-align: center;
    cursor: pointer;
    transition: transform .2s cubic-bezier(.16, 1, .3, 1),
                border-color .2s cubic-bezier(.16, 1, .3, 1),
                box-shadow .2s cubic-bezier(.16, 1, .3, 1);
}

.cs-add-card:hover {
    transform: translateY(-2px);
    border-color: var(--cs-accent);
    box-shadow: 0 8px 18px rgba(37, 99, 235, .10);
}

/* THE WELL. The one number the eight drawings are all sized against, and local
   to this card the way every picker's well is local to it. */
.cs-add-well {
    width: 100%;
    height: 110px;
    background: var(--cs-blueprint);
    border-radius: var(--cs-r-well);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* TOMBSTONE -- the pending hatch, 29 August 2026, morning to night.
   .cs-add-well[data-cs-art="pending"]::after drew 45-degree scaffolding in
   every well while the drawings were owed, and t-stage counted eight of them so
   nobody could forget. The art has landed, so the rule is deleted rather than
   left inert: a placeholder that can never match again is a thing the next
   reader has to work out. The SELECTOR is not retired -- t-stage now requires
   nothing to match it, which stays a live claim precisely because the attribute
   is still written, by card id, in addmenu.js.

   ══════════════════════════════════════════════════════════════════════════
   THE EIGHT BLUEPRINT DRAWINGS
   ══════════════════════════════════════════════════════════════════════════

   COPIED, NOT REDRAWN. Every rule below is its .v2e-* counterpart from
   v2/v2-shell.css:7744-7828, renamed to this tree's prefix. The old well and
   this one are both 110px on the same #e9eef5 ground inside the same card
   metrics, so nothing is rescaled and a diff between the two files is a diff
   of the drawing itself. art.js says what the drawings are and why the case
   silhouette appears twice.

   TWO COLOURS, DECLARED ONCE AT THE MENU AND READ DOWN. The old file repeats
   #8fa0b5 in ten places and #cbd5e1 in two, because it shares a document with
   a stylesheet it cannot read and inheriting from an unknown ancestor is a
   bet. This engine owns every stylesheet that applies to it, so the drawings
   read a property the way the frame's rows read the geometry: one declaration,
   flowing down, never sideways.

   AND THEY ARE NOT IN tokens.css, by that file's own rule rather than by
   oversight. A token is a decision more than one COMPONENT asks about, and
   these eight drawings are one component. The day the picker grows artwork the
   declaration moves to :root in the same edit that adds the second caller --
   not before, or the next reader goes looking for one that is not there. */
#cs-addmenu {
    --cs-draw:      #8fa0b5;   /* the ink every drawing is made of */
    --cs-draw-soft: #cbd5e1;   /* the ruled lines inside two of them */
}

/* The ink reaches the SVGs as currentColor, so the two pens in art.js name no
   colour at all and there is one place to change it. */
.cs-add-well { color: var(--cs-draw); }

/* ---- the case silhouette: Ready Designs and Backgrounds ------------------ */
.cs-art-case {
    width: 58px;
    height: 92px;
    border-radius: 14px;
    background: var(--cs-white);
    border: 2px solid var(--cs-white);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .12), 0 0 0 1px rgba(15, 23, 42, .08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cs-art-cam {
    position: absolute;
    top: 4px;
    width: 36px;
    height: 14px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .85);
    border: 1px dashed rgba(143, 160, 181, .6);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 0 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.cs-art-lens {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cs-draw);
    opacity: .6;
}

/* Ready Designs: a case with something ON it. */
.cs-art-cbody {
    width: 100%;
    height: 100%;
    background: var(--cs-blueprint);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 18px;
    gap: 5px;
}

.cs-art-cstk {
    width: 22px;
    height: 22px;
    background: var(--cs-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(15, 23, 42, .08);
    border: 1px dashed var(--cs-draw);
}

.cs-art-ctxt {
    font-size: 7.5px;
    font-weight: 800;
    color: var(--cs-draw);
    letter-spacing: .4px;
    line-height: 1;
    text-transform: uppercase;
}

.cs-art-cline {
    width: 24px;
    height: 2px;
    background: var(--cs-draw-soft);
    border-radius: 2px;
}

/* Backgrounds: a case that IS the pattern, edge to edge. */
.cs-art-pat {
    width: 100%;
    height: 100%;
    background-color: var(--cs-blueprint);
    opacity: .5;
    background-image: repeating-linear-gradient(45deg,
        var(--cs-draw) 0, var(--cs-draw) 4px, transparent 0, transparent 9px);
}

/* ---- Photos: a print with the wide bottom border a photograph has -------- */
.cs-art-photo {
    width: 52px;
    height: 72px;
    background: var(--cs-white);
    border-radius: 5px;
    box-shadow: 0 3px 6px rgba(15, 23, 42, .08);
    padding: 3px 3px 10px 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The glyph is white ON the ink rather than ink on the ground, which is what
   makes this read as a photograph instead of an empty slot. */
.cs-art-pfill {
    width: 100%;
    height: 100%;
    background: var(--cs-draw);
    border-radius: 3px;
    color: var(--cs-white);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Custom Text -------------------------------------------------------- */
.cs-art-tcard {
    width: 64px;
    height: 64px;
    background: var(--cs-white);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    box-shadow: 0 3px 6px rgba(15, 23, 42, .08);
}

.cs-art-tglyph {
    font-size: 22px;
    font-weight: 900;
    color: var(--cs-draw);
    letter-spacing: -1px;
    line-height: 1;
}

.cs-art-tline {
    width: 38px;
    height: 3px;
    background: var(--cs-draw-soft);
    border-radius: 2px;
}

/* ---- Stickers: a die-cut badge, which is why the border is dashed -------- */
.cs-art-badge {
    width: 58px;
    height: 58px;
    background: var(--cs-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(15, 23, 42, .08);
    border: 1.5px dashed var(--cs-draw);
}

/* ---- the frame Tattoo Art and Upload File share -------------------------- */
.cs-art-frame {
    width: 60px;
    height: 60px;
    background: var(--cs-white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(15, 23, 42, .08);
    color: var(--cs-draw);
}

/* ---- Shapes: the two primitives, bare and unframed ----------------------- */
.cs-art-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.cs-art-shape {
    background: var(--cs-draw);
    box-shadow: 0 2px 4px rgba(15, 23, 42, .08);
}

.cs-art-shape.sq { width: 22px; height: 22px; border-radius: 4px; }
.cs-art-shape.ci { width: 24px; height: 24px; border-radius: 50%; }

.cs-add-name {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--cs-ink);
    line-height: 1.2;
}

.cs-add-cap {
    font-size: 9.5px;
    font-weight: 600;
    color: var(--cs-muted);
    line-height: 1.3;
}
