/* The Mac app cards and the waitlist pop-up, on /apps and in the Mac apps group on /products (tools/build_pages.py), pop-up in apps.js.
   The cards reuse the /products card (.ben.wk.pd). The pop-up copies the members area unlock pop-up (members app buy.js). */

/* Hero: no picture on the right, so the text gets the full width. */
.wl-hero-sec .hero-grid { grid-template-columns: 1fr; }
.wl-hero-sec .h-hero { max-width: none; }

/* /products#apps: land below the fixed header, so the "Mac apps" label shows. */
.pd-grp#apps { scroll-margin-top: 104px; }

/* Cards: the icon sits on a grey panel where /products shows a cover. The whole card opens the pop-up. */
.wl-card { cursor: pointer; }
html body .ben.wk .wl-shot { display: grid; place-items: center; align-self: stretch; width: 100%; background: #f5f5f5; }  /* phones: cards line up left, so stretch it */
/* Each app's own colour behind its icon, light to deeper (data-tint in site-pages/apps.html, Nate 9 Oct) */
html body .ben.wk .wl-shot[style*="--tint"] { background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 16%, #fff) 0%, color-mix(in srgb, var(--tint) 52%, #fff) 100%); }
/* "Coming soon" on the picture of an app that is not out yet (Nate, 9 Oct) */
html body .ben.wk .wl-shot { position: relative; }
.wl-badge { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.85); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); font: 11px "Geist Mono", monospace; text-transform: uppercase; letter-spacing: 0.08em; color: #0a0a0a; }
/* "Notify me" is the secondary button, like the offer cards' (the shared .pd-foot rule makes every button black) */
/* The waitlist pop-up top in the app's colour too, same gradient as its card (Nate, 9 Oct) */
.wl-top[style*="--tint"] { background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 16%, #fff) 0%, color-mix(in srgb, var(--tint) 52%, #fff) 100%); }
html body .pd-foot .btn.pd-sec { background: #fff; color: #0a0a0a; border-color: #d4d4d4; }
html body .pd-foot .btn.pd-sec:hover { background: #fff; border-color: #0a0a0a; }
html body .ben.wk .wl-shot img { width: 128px; height: 128px; object-fit: contain; object-position: 50% 50%; }
.wl-card:hover .wl-shot img, .wl-card:hover .wl-shot .wl-ph { transform: scale(1.05); }
.wl-shot .wl-ph { transition: transform 0.4s ease; }

/* No icon yet: a plain grey app tile with the first letter, the same size as a real macOS icon. */
.wl-ph { width: 104px; height: 104px; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(180deg, #ececec, #dcdcdc);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(0, 0, 0, 0.04); font: 500 46px/1 "Geist", sans-serif; color: #8c8c8c; }

/* Pop-up */
body.wl-open { overflow: hidden; }
body.wl-open chat-widget { display: none; }  /* the GHL chat bubble sits above every z-index, so it hides while the pop-up is open */
.wl-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 10, 10, 0.5); display: grid; place-items: center; padding: 24px 16px; overflow-y: auto; animation: wl-fade 0.15s ease-out; }
.wl-box { position: relative; width: 100%; max-width: 480px; background: #fff; color: #0a0a0a; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25); animation: wl-up 0.2s ease-out; text-align: left; }
.wl-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; background: rgba(10, 10, 10, 0.06); border: 0; border-radius: 50%; color: #0a0a0a; cursor: pointer; }
.wl-x:hover { background: rgba(10, 10, 10, 0.12); }
.wl-top { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 36px 24px 28px; background: #f5f5f5; text-align: center; }
.wl-top img { width: 96px; height: 96px; margin-bottom: 12px; display: block; }  /* same top as the buy pop-up (Nate, 9 Oct) */
.wl-top .wl-ph { width: 92px; height: 92px; border-radius: 21px; font-size: 40px; margin: 10px 0; }
.wl-top h2 { margin: 0; font-size: 24px; line-height: 1.5; font-weight: 500; color: #0a0a0a; }
.wl-top .wl-sub { margin: 0; font-size: 16px; line-height: 1.5; color: #525252; }
.wl-body { padding: 24px 28px 28px; }
.wl-blurb { margin: 0 0 12px; font-size: 15px; line-height: 1.55; color: #525252; text-wrap: pretty; }
.wl-points { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; font-size: 14px; line-height: 1.5; color: #0a0a0a; }
.wl-points li { display: flex; gap: 8px; align-items: flex-start; margin: 0; text-wrap: pretty; }
.wl-points svg { flex: none; margin-top: 2px; color: #16a34a; }
.wl-form { margin: 0; }
.wl-form input[type=email] { display: block; width: 100%; height: 48px; box-sizing: border-box; padding: 0 14px; border: 1px solid #dfdfdf; border-radius: 12px; background: #fff;
  font: inherit; font-size: 16px; color: #0a0a0a; -webkit-appearance: none; appearance: none; transition: border-color 0.15s, box-shadow 0.15s; }
.wl-form input[type=email]::placeholder { color: #8c8c8c; }
.wl-form input[type=email]:focus { outline: none; border-color: #000; box-shadow: 0 0 0 1px #000; }
.wl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
html body .wl-go { display: flex; width: 100%; height: 48px; margin-top: 10px; align-items: center; justify-content: center; gap: 8px; padding: 0 20px; border: 0; border-radius: 6px;
  background: #0a0a0a; color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.15s, transform 0.1s; }
html body .wl-go:hover { background: #262626; }
html body .wl-go:active { transform: scale(0.98); }
html body .wl-go:disabled { opacity: 0.6; cursor: default; }
.wl-msg { margin: 10px 0 0; font-size: 14px; color: #dc2626; }
.wl-msg:empty { display: none; }
.wl-note { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: #737373; text-align: center; text-wrap: pretty; }
.wl-done { padding-top: 40px; text-align: center; }
.wl-done h2 { margin: 0 0 8px; font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; color: #0a0a0a; }
.wl-done p { margin: 0 0 24px; font-size: 15px; line-height: 1.55; color: #525252; text-wrap: pretty; }
.wl-tick { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 50%; background: #16a34a; color: #fff; display: grid; place-items: center; animation: wl-pop 0.3s ease-out; }
@keyframes wl-fade { from { opacity: 0; } }
@keyframes wl-up { from { opacity: 0; transform: translateY(12px); } }
@keyframes wl-pop { from { transform: scale(0.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wl-overlay, .wl-box, .wl-tick { animation: none; } }
@media (max-width: 520px) {
  .wl-overlay { place-items: end center; padding: 0; }
  .wl-box { max-width: none; border-radius: 14px 14px 0 0; max-height: 92dvh; overflow-y: auto; }
  .wl-body { padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); }
}

/* "All Mac Apps" bundle card over the grid (Nate, 9 Oct): icons, text, price and button in one row; stacked on phones */
.wl-bundle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 32px; padding: 28px 32px; margin-bottom: 24px; border: 1px solid #e5e5e5; border-radius: 15px; cursor: pointer;
  background: linear-gradient(110deg, color-mix(in srgb, #fbb419 18%, #fff) 0%, color-mix(in srgb, #f23e41 12%, #fff) 35%, color-mix(in srgb, #3a84f4 14%, #fff) 70%, color-mix(in srgb, #945eed 18%, #fff) 100%); }  /* a soft run through the app colours (Nate, 9 Oct) */
/* The icons fill two rows (Nate, 12 Oct): --cols is half the apps, rounded up (build_pages.py), and a short second row sits in the middle */
.wl-bundle-icons { --cols: 5; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: calc(var(--cols) * 56px + (var(--cols) - 1) * 10px); }
.wl-bundle-icons img { width: 56px; height: 56px; display: block; }
.wl-bundle-text .h-card { margin: 0 0 6px; }
.wl-bundle-text p { margin: 0; color: #525252; text-wrap: pretty; }
.wl-bundle-text .wl-bundle-aa { margin-top: 8px; font-size: 14px; }
.wl-bundle-text a { color: #0a0a0a; text-decoration: underline; text-underline-offset: 2px; }
html body .wl-bundle .pd-foot { margin: 0; padding: 0; flex-direction: column; align-items: flex-end; gap: 24px; }
html body .wl-bundle .pd-price { align-items: flex-end; }
/* More air around the price and button (Nate, 12 Oct: "feels cramped"): roomier card, a gap under the sale tag, a wider button */
@media (min-width: 901px) {
  .wl-bundle { gap: 40px; padding: 36px 40px; }
  html body .wl-bundle .pd-price > .sb-tag { margin-bottom: 12px; }
  html body .wl-bundle .pd-price em { margin-top: 4px; }
  html body .wl-bundle .pd-foot .btn { min-width: 180px; justify-content: center; }
}
@media (max-width: 900px) {
  .wl-bundle { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px; }
  .wl-bundle-icons { width: 100%; gap: 8px; }
  .wl-bundle-icons img { width: calc((100% - (var(--cols) - 1) * 8px) / var(--cols)); height: auto; }
  /* Like the product cards (Nate, 12 Oct): the note on top, the price with its sale tag beside it, a full-width button under */
  html body .wl-bundle .pd-foot { flex-direction: column; align-items: stretch; gap: 16px; }
  html body .wl-bundle .pd-price { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 10px; }
  html body .wl-bundle .pd-price em { order: -1; flex-basis: 100%; margin-bottom: 4px; }
  html body .wl-bundle .pd-price > .sb-tag { order: 1; margin: 0; }
  html body .wl-bundle .pd-foot .btn { width: 100%; justify-content: center; }
}
@media (min-width: 641px) and (max-width: 900px) {  /* tablets: every icon on one line (Nate, 12 Oct) */
  .wl-bundle-icons img { width: calc((100% - (var(--n) - 1) * 8px) / var(--n)); max-width: 80px; }
}
