/* /site/get-app.css: the way from a page to the stores (PLAY-FUNNEL, with /site/get-app.js).
   Before it, every "Get the app" button went to a block of words with four small store badges under it, the same
   for everyone.

   One block (.sv-getapp) has a card for each app, Sunday Visit and Sunday Visit Carer, the same shape and size side by
   side (GUIDE-GETAPP: the first block gave the Carer app one line under Sunday Visit's card). Each card says what its
   app is and has its store buttons in it. What a visitor sees depends on the device get-app.js found
   (html[data-sv-device]):
   - an iPhone or iPad: the App Store button alone, bigger, with "Also on Google Play" as a small link under it;
   - an Android phone or tablet: Google Play alone, big, with "Also on the App Store" under it;
   - a computer, or no JavaScript: both stores, and a code to scan with a phone's camera, which opens that phone's
     own store (/get/app/).
   The badges are Apple's and Google's files, unchanged, each drawn edge to edge, so the same height on screen is the
   same size: 60px where a phone has its own store alone, 50px beside a code, never under 48px, with a quarter of that
   or more clear around each.
   The colours are the site's own (green #245447, navy #13243b, cream #f6f1e8), written out so the block looks the
   same on a guide-style page and on a plain one. */
.sv-getapp {
  clear: both;
  margin: 1.75rem 0 0;
  color: #13243b;
}
/* The two apps, each in a card of the same shape and size: side by side when there is room for both, else one above
   the other. Each card is a column with its stores at the foot. Where the browser can (subgrid), the two cards share
   their rows, so their lists and store buttons start on the same lines however the words wrap. */
.sv-getapp-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.25rem;
}
.sv-getapp-app {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.5rem;
  border-radius: 24px;
  background: #f6f1e8;
  box-shadow: inset 0 0 0 1px rgba(19, 36, 59, .1);
}
@supports (grid-template-rows: subgrid) {
  .sv-getapp-pair { row-gap: 0; margin-bottom: -1.25rem; }
  .sv-getapp-app { display: grid; grid-row: span 4; grid-template-rows: subgrid; margin-bottom: 1.25rem; }
}
/* The icon and the name start on the same line in both cards, whichever card's words wrap. */
.sv-getapp-head { display: flex; align-items: flex-start; }
.sv-getapp-head > div { padding-top: .2rem; }
.sv-getapp-icon {
  flex: none;
  display: block;
  width: 64px;
  height: 64px;
  margin-right: 1rem;
  border-radius: 15px;
  box-shadow: 0 1px 2px rgba(19, 36, 59, .12), 0 10px 22px -14px rgba(19, 36, 59, .55);
}
.sv-getapp .sv-getapp-name { margin: 0; font: 600 1.5rem/1.15 "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif; color: #13243b; }
.sv-getapp .sv-getapp-for { margin: .25rem 0 0; max-width: none; color: #4a5363; font-size: 1.125rem; line-height: 1.35; text-wrap: pretty; }
.sv-getapp ul.sv-getapp-ticks { margin: 1.25rem 0; padding: 0; list-style: none; }
.sv-getapp .sv-getapp-ticks li {
  position: relative;
  max-width: none;
  margin: 0;
  padding: 0 0 0 2.1rem;
  font-size: 1.125rem;
  line-height: 1.4;
  text-wrap: pretty;
}
.sv-getapp .sv-getapp-ticks li + li { margin-top: .6rem; }
.sv-getapp-ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .08em;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: #245447 url("/site/get-app-tick.svg") center / 62% no-repeat;
}
/* The stores, at the foot of the card under a fine rule: on a computer the code to scan, with both store buttons
   beside it, the same height as the code, and what the code is for under them. */
.sv-getapp-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(19, 36, 59, .12);
}
.sv-getapp-scan { width: 112px; margin: 0 1.25rem 0 0; }
.sv-getapp-code {
  display: block;
  width: 100%;
  height: auto;
  padding: .2rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(19, 36, 59, .14);
  box-sizing: border-box;
}
.sv-getapp .sv-getapp-caption { grid-column: 1 / -1; margin: .75rem 0 0; max-width: none; color: #4a5363; font-size: 1.125rem; line-height: 1.35; }
.sv-getapp-stores { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.sv-getapp-store { display: block; line-height: 0; border-radius: 10px; }
.sv-getapp-store + .sv-getapp-store { margin-top: 12px; }
.sv-getapp-store img { display: block; width: auto; height: 50px; max-width: 100%; }
/* With no code to scan (the page a code opens), the two stores sit side by side. */
.sv-getapp-row > .sv-getapp-stores:first-child { flex-direction: row; flex-wrap: wrap; align-items: center; margin: -6px; }
.sv-getapp-row > .sv-getapp-stores:first-child .sv-getapp-store { margin: 6px; }
.sv-getapp-store:focus-visible, .sv-getapp-also a:focus-visible, .sv-getapp-close:focus-visible { outline: 3px solid #8a6420; outline-offset: 3px; }
.sv-getapp .sv-getapp-also { display: none; margin: .25rem 0 -.6rem; max-width: none; }
.sv-getapp-also a { display: none; align-items: center; min-height: 48px; color: #245447; font-size: 1.125rem; font-weight: 600; }
/* On a guide, the words that name the two stores are for a printed copy, which has no buttons: on a screen the cards
   say it. */
.sv-getapp-print { display: none; }

/* A phone or tablet: its own store alone, bigger, with the other store one small link under it, and no code to scan. */
html[data-sv-device="ios"] [data-getapp-store="google"],
html[data-sv-device="android"] [data-getapp-store="apple"],
html[data-sv-device="ios"] .sv-getapp-scan,
html[data-sv-device="android"] .sv-getapp-scan,
html[data-sv-device="ios"] .sv-getapp-caption,
html[data-sv-device="android"] .sv-getapp-caption { display: none; }
html[data-sv-device="ios"] .sv-getapp-also,
html[data-sv-device="android"] .sv-getapp-also { display: block; }
html[data-sv-device="ios"] .sv-getapp-also [data-getapp-also="google"],
html[data-sv-device="android"] .sv-getapp-also [data-getapp-also="apple"] { display: inline-flex; }
html[data-sv-device="ios"] .sv-getapp-app .sv-getapp-store img,
html[data-sv-device="android"] .sv-getapp-app .sv-getapp-store img { height: 60px; }

/* A store button that shows only on that store's own devices: beside a page's Play button, where a computer has
   "Get the app" (which opens the code to scan). */
.sv-getapp-phone { display: none; line-height: 0; border-radius: 10px; }
.sv-getapp-phone img { display: block; width: auto; height: 60px; }
html[data-sv-device="ios"] .sv-getapp-phone[data-getapp-store="apple"],
html[data-sv-device="android"] .sv-getapp-phone[data-getapp-store="google"] { display: inline-block; }
html[data-sv-device="ios"] .sv-getapp-desk,
html[data-sv-device="android"] .sv-getapp-desk { display: none; }

/* A phone-sized window with no device known (no JavaScript): both stores side by side, no code to scan. */
@media (max-width: 699px) {
  .sv-getapp-app { padding: 1.25rem 1.125rem; }
  .sv-getapp-icon { width: 56px; height: 56px; margin-right: .875rem; border-radius: 13px; }
  .sv-getapp .sv-getapp-name { font-size: 1.375rem; }
  .sv-getapp-scan, .sv-getapp .sv-getapp-caption { display: none; }
  .sv-getapp-stores { flex-direction: row; flex-wrap: wrap; align-items: center; margin: -6px; }
  .sv-getapp-stores .sv-getapp-store { margin: 6px; }
}

/* ---------- The code to scan, over the page (a computer) ---------- */
.sv-getapp-dialog {
  width: 44rem;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: #fffcf7;
  color: #13243b;
  box-shadow: 0 2px 6px rgba(19, 36, 59, .12), 0 40px 90px -30px rgba(19, 36, 59, .7);
  overflow: auto;
  font-family: "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.5;
}
.sv-getapp-dialog::backdrop { background: rgba(19, 36, 59, .62); }
.sv-getapp-dialog-in { position: relative; padding: 2rem 2.25rem 2.25rem; }
.sv-getapp-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 999px;
  background: #ece5d6;
  color: #13243b;
  font: 600 1.125rem/1 "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
}
.sv-getapp-close:hover { background: #e2d9c6; }
.sv-getapp-dialog .sv-getapp-head { align-items: center; padding-right: 6.5rem; }
.sv-getapp-dialog h2 {
  margin: 0;
  color: #13243b;
  font: 400 2rem/1.15 "Newsreader", Georgia, "Times New Roman", serif;
  letter-spacing: -.01em;
}
.sv-getapp-dialog-body { display: flex; align-items: center; margin-top: 1.75rem; }
.sv-getapp-dialog .sv-getapp-scan { width: 13.5rem; margin-right: 2.25rem; }
.sv-getapp-dialog .sv-getapp-code { padding: .8rem; border-radius: 20px; }
.sv-getapp-dialog-words { min-width: 0; }
.sv-getapp-dialog-words p { margin: 0; }
.sv-getapp-dialog .sv-getapp-how { font-size: 1.375rem; font-weight: 600; line-height: 1.3; }
.sv-getapp-dialog .sv-getapp-how + p { margin-top: .5rem; color: #4a5363; }
.sv-getapp-dialog .sv-getapp-or { margin-top: 1.5rem; color: #4a5363; }
.sv-getapp-dialog .sv-getapp-stores { flex-direction: row; flex-wrap: wrap; align-items: center; margin: .25rem -6px -6px; }
.sv-getapp-dialog .sv-getapp-store { margin: 6px; }
.sv-getapp-dialog .sv-getapp-store img { height: 52px; }
.sv-getapp-dialog ul.sv-getapp-ticks { margin: 1.75rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid rgba(19, 36, 59, .12); list-style: none; }
.sv-getapp-dialog .sv-getapp-ticks li { position: relative; padding-left: 2.1rem; }
.sv-getapp-dialog .sv-getapp-ticks li + li { margin-top: .55rem; }
html.sv-getapp-open { overflow: hidden; }
@media (max-width: 699px) {
  .sv-getapp-dialog-in { padding: 1.5rem 1.25rem 1.5rem; }
  .sv-getapp-dialog h2 { font-size: 1.625rem; }
  .sv-getapp-dialog-body { display: block; margin-top: 1.25rem; }
  /* The dialog's words point at the code, so a narrow window has it too, above them. */
  .sv-getapp-dialog .sv-getapp-scan { display: block; width: 12rem; margin: 0 auto 1.25rem; }
}
/* On a guide the stores' credit line follows the block. */
.sv-getapp + .sv-app-marks { margin-top: 1.25rem; }
@media print {
  .sv-getapp-dialog, .sv-getapp-phone { display: none !important; }
  /* A printed guide is the puzzle or the list, as before: the old badges did not print either. */
  .sv-guide .sv-getapp, .sv-guide .sv-getapp + .sv-app-marks { display: none !important; }
  .sv-guide .sv-getapp-print { display: block !important; }
}
