/* ============================================================================
   App Store / Google Play badges
   Markup: templates/components/app-store-links.html

   Its own file, small and self-contained, because the three surfaces that use
   it do not share a stylesheet: Settings renders inside layout.html, while the
   intake portal and the classic signup page are standalone public pages that
   deliberately load neither components.css nor main.css. Appending this to
   components.css would have meant pulling ~2,600 lines onto a public signup
   page to get two badges.

   Deliberately NOT accent-coloured. These are third-party brand marks; Apple
   and Google both specify the field colour, and tinting them with a tenant's
   accent would break their guidelines on every white-label account. This is a
   documented exception to the accent-token rule, not an oversight.
   ========================================================================== */

/* nowrap, not wrap: the two badges belong on one row. Where the container is
   narrow (the intake rail is 17.5rem, the Settings status card competes with
   three stats and the Upgrade button) wrap would silently drop Google Play
   onto its own line. Shrinking is handled per-surface instead — the badges
   flex down rather than stacking. The internals of each badge are untouched:
   "Download on the" over "App Store" is Apple's and Google's own lockup. */
.app-store-links { display: flex; gap: 0.5rem; flex-wrap: nowrap; }

.app-store-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    /* min-width:0 lets a flex item shrink below its content width; without it
       the badge refuses to narrow and overflows its container instead. */
    min-width: 0;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    /* Fixed near-black rather than --foreground-component: that token inverts
       in dark mode, which would flip the badge to a white field with dark
       text. The store field colour must not follow our theme. */
    background: #000;
    color: #fff;
    text-decoration: none;
    transition: filter 0.15s, transform 0.15s;
}
.app-store-badge:hover { filter: brightness(1.18); }
.app-store-badge:active { transform: translateY(1px); }
/* Accent IS right for the focus ring — that is our affordance, not Apple's. */
.app-store-badge:focus-visible {
    outline: 2px solid hsl(var(--accent-component, 193 70% 39%));
    outline-offset: 2px;
}
/* Sized on the element: these are literal <svg> in the partial, so Lucide never
   swaps them, but an unsized SVG still balloons to its viewBox before CSS
   applies. */
.app-store-badge svg { width: 20px; height: 20px; flex-shrink: 0; }
.app-store-badge span { display: flex; flex-direction: column; line-height: 1.15; }
.app-store-badge small { font-size: 0.5625rem; opacity: 0.78; letter-spacing: 0.02em; }
.app-store-badge b { font-size: 0.8125rem; font-weight: 600; }

/* compact — a settings row rather than a hero band */
.app-store-links--compact .app-store-badge { padding: 0.4375rem 0.75rem; }
.app-store-links--compact .app-store-badge svg { width: 17px; height: 17px; }
.app-store-links--compact .app-store-badge small { font-size: 0.5rem; }
.app-store-links--compact .app-store-badge b { font-size: 0.75rem; }

@media (max-width: 560px) {
    .app-store-links { width: 100%; }
    .app-store-badge { flex: 1; justify-content: center; }
}
