/* store-badge.css
   Category badge over store images: a flat disc with a wireframe glyph.
   Theme-agnostic; both themes link it. Markup: appstore_category_badge() in
   modules/appstore/appstore.badge.php. The element wrapping the image must be
   position: relative.

   One palette on every theme, deliberately flat (Eric 2026-10-21: no
   gradient, no shadow, clean lines): a solid sand face (Alder's --al-sand
   #F5EFE6) inside a thin rim, rim and glyph both in the brand's forest green
   (Alder --al-pill #14532D, a step darker than orcounselors --green
   #16794E). The solid face carries the contrast, so it reads on white
   screenshots, dark photos and the Alder deep-green panels alike. */

.store-badge {
  --store-badge-face: #F5EFE6;
  --store-badge-ink:  #14532D;

  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--store-badge-ink);
  border-radius: 50%;
  color: var(--store-badge-ink);
  background: var(--store-badge-face);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.store-badge svg {
  display: block;
  width: 18px;
  height: 18px;
  overflow: visible;
  stroke-width: 1.5;
}

/* Hero: the main detail image. About 52px on a 390px phone, growing with
   the viewport to 60px from roughly 930px up; inset 12px from the corner. */
.store-badge--hero {
  top: 12px;
  right: 12px;
  width: clamp(52px, calc(46px + 1.5vw), 60px);
  height: clamp(52px, calc(46px + 1.5vw), 60px);
  border-width: 1.5px;
}

.store-badge--hero svg {
  width: 56%;
  height: 56%;
  stroke-width: 1.25;
}

/* Mini: small thumbnails (app rails on partner and provider profiles, the
   dashboard product list). The disc overhangs the thumbnail's top-right
   corner like an app-icon badge, so it covers less of a 40-80px picture.
   The thumbnail and the badge share a .store-badge-host wrapper, which has
   no overflow clipping of its own. */
.store-badge-host {
  position: relative;
  display: block;
  flex: none;
  width: max-content;
  line-height: 0;
}

.store-badge--mini {
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
}

.store-badge--mini svg {
  width: 13px;
  height: 13px;
  stroke-width: 1.75;
}

/* The bare glyph from appstore_category_glyph(), for use beside text. */
.store-glyph {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -.2em;
  flex: none;
}

@media (forced-colors: active) {
  .store-badge {
    border-color: CanvasText;
    background: Canvas;
    color: CanvasText;
  }
}
