/* Hisab Time: the store badges and the "coming soon" sheet behind them.
   Self-contained: its own tokens, so it reads the same on the site pages
   (site.css) and on the account pages (app.css). Pair with /js/store-sheet.js.
   Markup: .store-badges > a.store-badge[data-store="play"|"ios"] > img.
   Motion: transform and opacity only; reduced motion fades. */

/* ---------- the badges ---------- */
.store-badges {
  --store-h: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(var(--store-h) * 0.3);
  margin: 0;
  padding: 0;
}
.store-badge {
  display: inline-flex;
  flex: none;
  border-radius: calc(var(--store-h) * 0.15);
  line-height: 0;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.store-badge img {
  display: block;
  width: auto;
  height: var(--store-h);
  max-width: none;
}
.store-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -12px rgba(17, 20, 31, 0.55);
}
.store-badge:active {
  transform: scale(0.98);
  transition-duration: 0.12s;
}
.store-badge:focus-visible {
  outline: 2px solid #0b7a55;
  outline-offset: 3px;
}
/* on a dark ground the focus ring is gold */
.store-badges--ink .store-badge:focus-visible {
  outline-color: #f5c45a;
}
/* what the badges mean, said beside them */
.store-note {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: #626779;
}
/* the trademark line, in the fine print wherever badges show */
.store-tm {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #737889;
}

/* ---------- the sheet ---------- */
.ss {
  --ss-paper: #fbf7ec;
  --ss-paper-2: #f5efe0;
  --ss-ink: #161a2b;
  --ss-ink-2: #41465a;
  --ss-muted: #626779;
  --ss-line: #e6decb;
  --ss-em: #0b7a55;
  --ss-em-2: #0e8560;
  --ss-em-deep: #064a33;
  --ss-gold: #f5c45a;
  --ss-serif: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", serif;
  --ss-sans: "Plus Jakarta Sans", "Jakarta Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ss-ease: cubic-bezier(0.22, 1, 0.36, 1);
  box-sizing: border-box;
  width: min(440px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: var(--ss-ink-2);
  font-family: var(--ss-sans);
  font-size: 15.5px;
  line-height: 1.55;
  overflow: visible;
}
.ss *,
.ss *::before,
.ss *::after {
  box-sizing: border-box;
}
/* a solid scrim on its own (Firefox draws no blur behind a dialog); the blur is extra */
.ss::backdrop {
  background: rgba(14, 20, 28, 0.62);
}
@supports ((-webkit-backdrop-filter: blur(3px)) or (backdrop-filter: blur(3px))) {
  .ss::backdrop {
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }
}
.ss[open]:not(.is-settled) {
  animation: ss-in 0.32s var(--ss-ease) both;
}
.ss[open]::backdrop {
  animation: ss-fade 0.3s ease-out both;
}
.ss[open].is-closing {
  animation: ss-out 0.2s cubic-bezier(0.4, 0, 1, 1) both;
}
.ss[open].is-closing::backdrop {
  animation: ss-fade 0.2s ease-in reverse both;
}
@keyframes ss-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes ss-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(6px) scale(0.99); }
}
@keyframes ss-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ss__panel {
  position: relative;
  max-height: inherit;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 30px 30px 26px;
  border-radius: inherit;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, var(--ss-paper) 0%, var(--ss-paper-2) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(22, 26, 43, 0.06),
    0 2px 4px rgba(22, 26, 43, 0.06),
    0 32px 64px -24px rgba(14, 17, 25, 0.5);
}
.ss__handle {
  display: none;
}
.ss__x {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ss-muted);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.ss__x:hover {
  background: rgba(22, 26, 43, 0.06);
  color: var(--ss-ink);
}
.ss__x svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.ss :focus-visible {
  outline: 2px solid var(--ss-em);
  outline-offset: 3px;
}

/* the store's own mark, small, on a black tile like its badge */
.ss__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
}
.ss__glyph {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #1d1f24, #000);
  box-shadow: inset 0 0 0 1px rgba(166, 166, 166, 0.55), 0 8px 16px -10px rgba(0, 0, 0, 0.6);
}
.ss__glyph svg {
  display: block;
  width: 22px;
  height: 22px;
}
.ss__soon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ss-em-deep);
}
.ss__soon::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ss-gold);
  box-shadow: 0 0 0 3px rgba(245, 196, 90, 0.22);
}
.ss__title {
  margin: 0;
  padding-right: 28px;
  font-family: var(--ss-serif);
  font-variation-settings: "opsz" 72;
  font-size: 27px;
  font-weight: 470;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ss-ink);
  text-wrap: balance;
}
.ss__body {
  margin: 10px 0 0;
  color: var(--ss-ink-2);
  text-wrap: pretty;
}
.ss__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 22px 0 0;
}
.ss__primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--ss-em-2), var(--ss-em));
  color: #fff;
  font-family: var(--ss-sans);
  font-size: 16px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 2px rgba(6, 74, 51, 0.3), 0 12px 24px -12px rgba(11, 122, 85, 0.7);
  transition: transform 0.3s var(--ss-ease), box-shadow 0.3s var(--ss-ease);
}
.ss__primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 4px rgba(6, 74, 51, 0.28), 0 18px 32px -14px rgba(11, 122, 85, 0.78);
}
.ss__primary:active {
  transform: scale(0.98);
}
.ss__primary svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s var(--ss-ease);
}
.ss__primary:hover svg {
  transform: translateX(3px);
}
.ss__secondary {
  min-height: 44px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ss-ink-2);
  font: 600 15px/1 var(--ss-sans);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(65, 70, 90, 0.35);
  text-underline-offset: 4px;
}
.ss__secondary:hover {
  color: var(--ss-ink);
  text-decoration-color: currentColor;
}

/* add it to your home screen: two short lines, the visitor's own phone first */
.ss__steps {
  margin: 24px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--ss-line);
}
.ss__steps-t {
  margin: 0;
  font-family: var(--ss-serif);
  font-variation-settings: "opsz" 24;
  font-size: 17px;
  font-style: italic;
  font-weight: 450;
  color: var(--ss-ink);
}
/* computers: a code to carry the web app to the phone */
.ss__desk {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px var(--ss-line);
}
.ss__desk[hidden] {
  display: none;
}
.ss__qr {
  display: block;
  flex: none;
  width: 116px;
  height: 116px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--ss-line), 0 6px 14px -10px rgba(22, 26, 43, 0.45);
  image-rendering: pixelated;
}
.ss__desk-k {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--ss-ink);
}
.ss__desk-d {
  margin: 4px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ss-muted);
}
.ss__steps-lead {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ss-muted);
}
.ss__list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.ss__step {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 2px 12px;
  align-items: baseline;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ss-ink-2);
}
.ss__os {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ss-ink);
}
.ss__step.is-here {
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px var(--ss-line);
}
.ss__here {
  grid-column: 2;
  justify-self: start;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(11, 122, 85, 0.1);
  color: var(--ss-em-deep);
  font-size: 11.5px;
  font-weight: 650;
}
.ss__step.is-other {
  color: var(--ss-muted);
}

/* ---------- phones: a bottom sheet with a handle ---------- */
@media (max-width: 639.98px) {
  .ss {
    width: 100%;
    max-height: 90dvh;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
  }
  .ss[open]:not(.is-settled) {
    animation-name: ss-up;
    animation-duration: 0.38s;
  }
  .ss[open].is-closing {
    animation-name: ss-down;
    animation-duration: 0.24s;
  }
  .ss__panel {
    padding: 26px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  }
  /* the handle: a full width strip to pull, with the small bar drawn in it */
  .ss__handle {
    position: absolute;
    top: 0;
    left: 64px;
    right: 64px;
    display: block;
    height: 26px;
    touch-action: none;
    cursor: grab;
  }
  .ss__handle::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 40px;
    height: 5px;
    margin-left: -20px;
    border-radius: 3px;
    background: rgba(22, 26, 43, 0.18);
  }
  .ss__title {
    font-size: 24px;
  }
  .ss__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .ss__primary {
    width: 100%;
    min-height: 52px;
  }
  .ss__step {
    grid-template-columns: minmax(0, 1fr);
  }
  .ss__here {
    grid-column: 1;
  }
}
@keyframes ss-up {
  from { transform: translateY(100%); }
  to { transform: none; }
}
@keyframes ss-down {
  from { transform: translateY(var(--ss-drag, 0px)); }
  to { transform: translateY(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .store-badge,
  .store-badge:hover,
  .ss__primary,
  .ss__primary:hover {
    transition: none;
    transform: none;
  }
  .ss[open]:not(.is-settled),
  .ss[open].is-closing,
  .ss[open]::backdrop,
  .ss[open].is-closing::backdrop {
    animation-name: ss-fade;
    animation-duration: 0.16s;
  }
  .ss[open].is-closing,
  .ss[open].is-closing::backdrop {
    animation-direction: reverse;
  }
}

/* while the sheet is open the page behind it stays put */
html.ss-lock {
  overflow: hidden;
}
html.ss-lock body {
  padding-right: var(--ss-sbw, 0px);
}
