/* ==========================================================================
   Spots (layouts/shared/spot, App\Support\Spots): the small drawings of the
   site. A spot is a tile in the tone of its place with one drawing of the
   sprite (public/img/spots-1.svg) on it. The drawing is shown through <use>
   from another file, so no rule of a sheet reaches its shapes: it reads its
   paint from the custom properties set here, and a tone is nothing but
   another set of them.

       --sp        the tone            --sp-edge   the hairline of a white sheet
       --sp-deep   its dark            --sp-faint  a line of words
       --sp-soft   its light           --sp-ok     the tick of a badge
       --sp-wash   the tile            --sp-gold   the coin, the star, the sun

   The tile is 60px; a place sizes it with --spot-size or with spot--sm (48),
   spot--lg (76) and spot--xl (92). spot--bare shows the drawing without a
   tile, spot--dark stands on a deep plate and draws in gold. One sheet for every page that
   shows a spot, printed once. Nothing moves here: a place that lifts its
   card may tilt its spot, and rests it for a reader who asked for less
   motion.
   ========================================================================== */

.spot {
    --sp: #2563eb;
    --sp-deep: #1d4ed8;
    --sp-soft: #bfdbfe;
    --sp-wash: #eff6ff;
    --sp-edge: rgba(37, 99, 235, 0.3);
    --sp-faint: rgba(15, 23, 42, 0.14);
    --sp-ok: #059669;
    --sp-gold: #f59e0b;
    --spot-size: 60px;

    position: relative;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    box-sizing: border-box;
    width: var(--spot-size);
    height: var(--spot-size);
    border-radius: calc(var(--spot-size) * 0.3);
    background: linear-gradient(150deg, #ffffff 0%, var(--sp-wash) 100%);
    box-shadow: inset 0 0 0 1px var(--sp-edge), 0 14px 22px -18px var(--sp);
    line-height: 0;
    vertical-align: middle;
}

.spot svg {
    display: block;
    width: 74%;
    height: 74%;
    overflow: visible;
}

.spot--sm { --spot-size: 48px; }
.spot--lg { --spot-size: 76px; }
.spot--xl { --spot-size: 92px; }

/* the drawing alone, where its place is already a tile */
.spot--bare {
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.spot--bare svg {
    width: 100%;
    height: 100%;
}

/* --------------------------------------------------------------------------
   The tones
   -------------------------------------------------------------------------- */
.spot--sky {
    --sp: #0284c7;
    --sp-deep: #0369a1;
    --sp-soft: #bae6fd;
    --sp-wash: #f0f9ff;
    --sp-edge: rgba(2, 132, 199, 0.32);
}

.spot--violet {
    --sp: #7c3aed;
    --sp-deep: #6d28d9;
    --sp-soft: #ddd6fe;
    --sp-wash: #f5f3ff;
    --sp-edge: rgba(124, 58, 237, 0.3);
}

.spot--rose {
    --sp: #e11d48;
    --sp-deep: #be123c;
    --sp-soft: #fecdd3;
    --sp-wash: #fff1f2;
    --sp-edge: rgba(225, 29, 72, 0.28);
}

.spot--teal {
    --sp: #0d9488;
    --sp-deep: #0f766e;
    --sp-soft: #99f6e4;
    --sp-wash: #f0fdfa;
    --sp-edge: rgba(13, 148, 136, 0.32);
    --sp-ok: #2563eb;
}

.spot--orange {
    --sp: #ea580c;
    --sp-deep: #c2410c;
    --sp-soft: #fed7aa;
    --sp-wash: #fff7ed;
    --sp-edge: rgba(234, 88, 12, 0.3);
}

.spot--indigo {
    --sp: #4f46e5;
    --sp-deep: #4338ca;
    --sp-soft: #c7d2fe;
    --sp-wash: #eef2ff;
    --sp-edge: rgba(79, 70, 229, 0.3);
}

.spot--emerald {
    --sp: #059669;
    --sp-deep: #047857;
    --sp-soft: #a7f3d0;
    --sp-wash: #ecfdf5;
    --sp-edge: rgba(5, 150, 105, 0.32);
    --sp-ok: #2563eb;
}

.spot--amber {
    --sp: #d97706;
    --sp-deep: #b45309;
    --sp-soft: #fde68a;
    --sp-wash: #fffbeb;
    --sp-edge: rgba(217, 119, 6, 0.34);
    --sp-gold: #fbbf24;
}

.spot--navy {
    --sp: #1e3a8a;
    --sp-deep: #172554;
    --sp-soft: #bfdbfe;
    --sp-wash: #eff6ff;
    --sp-edge: rgba(30, 58, 138, 0.3);
}

.spot--cyan {
    --sp: #0891b2;
    --sp-deep: #0e7490;
    --sp-soft: #a5f3fc;
    --sp-wash: #ecfeff;
    --sp-edge: rgba(8, 145, 178, 0.32);
}

/* On a deep plate (navy, emerald) the tile is glass and the drawing is gold, whatever tone it was given:
   a tone made for a white card would sink into the plate. The white sheets of a drawing stay white. */
.spot--dark {
    --sp: #fbbf24;
    --sp-deep: #fde68a;
    --sp-soft: rgba(253, 230, 138, 0.4);
    --sp-edge: rgba(255, 255, 255, 0.55);
    --sp-faint: rgba(15, 23, 42, 0.2);
    --sp-ok: #34d399;
    --sp-gold: #fbbf24;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}
