/* Send to Mac. WidgetScreen only runs on a Mac, so on a phone or tablet every
   Download button offers to send the site to the visitor's Mac instead, and
   assets/send-to-mac.js opens the share sheet for it. Each button carries both
   labels (and both icons); touch-first screens show the second. The script
   tests the same media query, so a label never disagrees with what a tap does. */

@media not all and (hover: none) and (pointer: coarse) {
    .for-handheld { display: none; }
}
@media (hover: none) and (pointer: coarse) {
    .for-mac { display: none; }
}

/* What to do next, in a glass note along the bottom of the screen: the same
   chrome as the homepage's install note, with its own colours so it sits on
   every page's ground. */
.send-note {
    --note-glass: oklch(0.985 0.006 250 / .78);
    --note-edge: oklch(1 0 0 / .7);
    --note-line: oklch(0.2 0.012 255 / .1);
    --note-shadow: oklch(0.2 0.03 255 / .26);
    --note-text: oklch(0.22 0.04 258);
    --note-soft: oklch(0.45 0.03 258);
    --note-faint: oklch(0.51 0.025 258);
    --note-link: oklch(0.52 0.15 33);
    position: fixed;
    z-index: 40;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: min(560px, calc(100% - 32px));
    padding: 14px 10px 14px 20px;
    border-radius: 20px;
    color: var(--note-soft);
    background: var(--note-glass);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    box-shadow: inset 0 1px 0 var(--note-edge), 0 0 0 1px var(--note-line), 0 18px 40px -16px var(--note-shadow);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif;
    translate: -50% 0;
    transition: opacity 400ms cubic-bezier(.16, 1, .3, 1), translate 500ms cubic-bezier(.16, 1, .3, 1);
}
@media (prefers-color-scheme: dark) {
    .send-note {
        --note-glass: oklch(0.24 0.025 258 / .8);
        --note-edge: oklch(1 0 0 / .1);
        --note-line: oklch(1 0 0 / .1);
        --note-shadow: oklch(0 0 0 / .5);
        --note-text: oklch(0.97 0.006 250);
        --note-soft: oklch(0.82 0.02 255);
        --note-faint: oklch(0.72 0.02 255);
        --note-link: oklch(0.8 0.12 37);
    }
}
.send-note[hidden] { display: none; }
.send-note.is-leaving { opacity: 0; translate: -50% 16px; }
.send-note p { margin: 0; font-size: .875rem; line-height: 1.45; }
.send-note strong { color: var(--note-text); font-weight: 650; }
.send-note a { color: var(--note-link); font-weight: 600; text-decoration: none; white-space: nowrap; }
.send-note button { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; margin: -6px 0; padding: 0; border: 0; border-radius: 50%; color: var(--note-faint); background: transparent; cursor: pointer; }
.send-note button:hover { color: var(--note-text); background: var(--note-line); }
.send-note svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }

@media (prefers-reduced-motion: reduce) {
    .send-note { transition: opacity 200ms ease; }
    .send-note.is-leaving { translate: -50% 0; }
}
