/* The store's Products menu. Loaded after each product's own stylesheet, so it sits in that page's header
   and takes that product's colors. */
:root {
  --sf-menu-bg: #ffffff;
  --sf-menu-text: #1d1d1f;
  --sf-menu-dim: #6e6e73;
  --sf-menu-line: #e6e6ea;
  --sf-menu-hover: #f4f4f7;
  --sf-menu-shadow: 0 1px 2px rgba(29, 29, 31, 0.06), 0 18px 48px rgba(43, 46, 69, 0.14);
}
html[data-product="gridmode"] {
  --sf-menu-bg: #22241e;
  --sf-menu-text: #f8f4e9;
  --sf-menu-dim: rgba(248, 244, 233, 0.62);
  --sf-menu-line: rgba(248, 244, 233, 0.11);
  --sf-menu-hover: rgba(248, 244, 233, 0.06);
  --sf-menu-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.sf-products { position: relative; }
.sf-products-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer;
}
.sf-products-toggle:hover, .sf-products.is-open .sf-products-toggle { color: var(--sf-menu-text); }
.sf-products-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 4px; }
.sf-caret {
  width: 7px; height: 7px; margin-top: -3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform 0.15s ease;
}
.sf-products.is-open .sf-caret { transform: translateY(3px) rotate(225deg); }

.sf-products-menu {
  position: absolute; z-index: 50; top: calc(100% + 14px); left: 50%;
  width: 300px; padding: 8px; transform: translateX(-50%);
  display: none;
  background: var(--sf-menu-bg); color: var(--sf-menu-text);
  border: 1px solid var(--sf-menu-line); border-radius: 16px; box-shadow: var(--sf-menu-shadow);
  text-align: left;
}
/* An invisible bridge so the menu stays open while the pointer crosses the gap. */
.sf-products-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.sf-products.is-open .sf-products-menu { display: block; }
@media (hover: hover) {
  .sf-products:hover .sf-products-menu { display: block; }
}

.sf-product { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: var(--sf-menu-text); }
.sf-product:hover, .sf-product:focus-visible { background: var(--sf-menu-hover); outline: none; }
.sf-product img { flex: none; width: 36px; height: 36px; border-radius: 9px; object-fit: contain; }
.sf-product span { display: grid; gap: 2px; }
.sf-product strong { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.sf-product small { font-size: 13px; color: var(--sf-menu-dim); }
.sf-product[aria-current="page"] strong::after { content: " ·  you're here"; font-weight: 500; font-size: 12px; color: var(--sf-menu-dim); }
.sf-all {
  display: flex; justify-content: space-between; margin-top: 6px; padding: 12px 10px 6px;
  border-top: 1px solid var(--sf-menu-line); font-size: 13px; color: var(--sf-menu-dim);
}
.sf-all:hover { color: var(--sf-menu-text); }

@media (max-width: 520px) {
  /* The product pages hide their other header links on phones; keep the way back to the store. */
  .site-header .header-nav > a.sf-home.sf-home { display: inline; }
  /* Make room for it: the apps are for desktops, and each page has download buttons further down. */
  .site-header .header-nav > a.button-small { display: none; }
  .sf-products-menu { left: auto; right: -80px; transform: none; width: min(300px, calc(100vw - 28px)); }
}

/* The bundle banner on pages that don't have their own (see nav.js). Uses the page's own gradient where it has one. */
.sf-promo { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 18px; padding: 11px 20px; background: var(--gradient, #13263b); color: #fff; font-size: 14px; line-height: 1.5; text-align: center; }
.sf-promo[hidden] { display: none; }
.sf-promo p { margin: 0; }
.sf-promo a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* GridMode's app screenshot has width/height attributes, so without this it keeps its 900px height as it shrinks
   and gets stretched tall. */
.preview-frame img { height: auto; }
