/* App download strip (okc-ds-*): the bottom bar on homepages, landing
   pages and every blog page (357 pages); script in js/download-strip.js. */

/* Out-ranks the blog theme and legacy `* { font-family }` rules, same trick
   as nav-header.css. --indic is set by the homepage for non-Latin locales. */
.okc-ds, .okc-ds * {
  font-family: "Plus Jakarta Sans", var(--indic, Helvetica), Arial, sans-serif;
  box-sizing: border-box;
  line-height: normal;
}
.okc-ds {
  --ds-bg: #121212;
  --ds-fg: #F2F2F2;
  --ds-track: #3A3A3D;
  --ds-green: #30A74F;
  --ds-red: #FF5E38;
  --ds-cream: #FFE3B9;
  --ds-ink: #222F2F;
  /* Length of one scene. Keep in step with SCENE_MS in the script. */
  --ds-t: 8s;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  /* Above the back-to-top buttons (60, 111), below the language modal (200). */
  z-index: 150;
  max-width: 520px;
  margin: 0 auto;
  background: var(--ds-bg);
  color: var(--ds-fg);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 26px rgba(0, 0, 0, 0.32);
  -webkit-font-smoothing: antialiased;
  transform: translateY(115%);
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.okc-ds.is-on { transform: none; }

.okc-ds-link,
.okc-ds-link:hover,
.okc-ds-link:visited {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 14px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  color: var(--ds-fg);
  text-decoration: none;
}
.okc-ds svg { display: block; flex-shrink: 0; }

/* ---- Scenes: stacked in one cell, only the current one plays ---- */
.okc-ds-scenes { display: grid; }
.okc-ds-scene {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  min-width: 0;
  visibility: hidden;
}
.okc-ds-scene.is-cur { visibility: visible; animation: okcDsFade var(--ds-t) both; }
/* A scene that is not current has no animations at all, so each one starts
   from zero when its turn comes. */
.okc-ds-scene:not(.is-cur) *,
.okc-ds-capset:not(.is-cur) * { animation: none !important; }
@keyframes okcDsFade {
  0% { opacity: 0; }
  4%, 96% { opacity: 1; }
  100% { opacity: 0; }
}

/* Chip on the left, a lane, the far end on the right. */
.okc-ds-chip { display: grid; flex-shrink: 0; }
.okc-ds-chip > span {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}
.okc-ds-chip svg { width: 17px; height: 17px; }
.okc-ds-chip-a { background: var(--ds-cream); color: var(--ds-ink); animation: okcDsChipA var(--ds-t) both; }
.okc-ds-chip-b { background: var(--ds-green); color: #FFFFFF; opacity: 0; animation: okcDsChipB var(--ds-t) both; }
.okc-ds--qr .okc-ds-chip-a { background: #FFFFFF; color: #121212; }
.okc-ds--auto .okc-ds-chip-a,
.okc-ds--bill .okc-ds-chip-a,
.okc-ds--stock .okc-ds-chip-a,
.okc-ds--report .okc-ds-chip-a { background: #2A2A2D; color: #F2F2F2; }
.okc-ds--auto .okc-ds-chip-a svg,
.okc-ds--bill .okc-ds-chip-a svg,
.okc-ds--stock .okc-ds-chip-a svg { color: #5FD68A; }
.okc-ds--report .okc-ds-chip-a svg { color: #9281FF; }
.okc-ds--defaulter .okc-ds-chip-a { background: #46231D; color: #FFD9CF; }
.okc-ds--defaulter .okc-ds-chip-a svg { color: var(--ds-red); }
.okc-ds--stock .okc-ds-chip-b { background: #46231D; color: #FF8A6E; }
.okc-ds-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ds-red); }
@keyframes okcDsChipA {
  0%, 2%, 9%, 60% { opacity: 1; transform: none; }
  5% { opacity: 1; transform: scale(0.92); }
  64%, 100% { opacity: 0; transform: none; }
}
@keyframes okcDsChipB {
  0%, 60% { opacity: 0; transform: scale(0.8); }
  65% { opacity: 1; transform: scale(1.06); }
  68%, 100% { opacity: 1; transform: none; }
}

.okc-ds-lane { position: relative; flex: 1; min-width: 0; height: 34px; }
.okc-ds-lane::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 2px dotted var(--ds-track);
}
/* Each flyer is a full-width runner, so translateX(100%) is one lane length. */
.okc-ds-fly { position: absolute; left: 0; right: 22px; top: 6px; height: 22px; opacity: 0; animation: okcDsOut var(--ds-t) both; }
.okc-ds-fly i {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-style: normal;
  background: #25D366;
  color: #FFFFFF;
}
.okc-ds-fly svg { width: 15px; height: 15px; }
.okc-ds-fly--qr i,
.okc-ds-fly--bill i { background: #FFFFFF; color: #121212; }
.okc-ds-fly--sms i { background: #2F80ED; }
.okc-ds-fly--def i { background: var(--ds-red); }
.okc-ds-fly--pdf i { background: #E5252A; }
.okc-ds-fly--excel i { background: #1D6F42; }
.okc-ds-fly--minus i {
  width: 26px;
  background: #2A2A2D;
  color: var(--ds-red);
  font-size: 12px;
  font-weight: 800;
}
.okc-ds-fly--coin { animation-name: okcDsBack; }
.okc-ds .okc-ds-fly--coin i {
  border-radius: 50%;
  background: #FFC400;
  border: 2px solid #E0A800;
  color: #7A5200;
  font-size: 12px;
  font-weight: 800;
}
.okc-ds-fly[data-n="2"] { animation-delay: 0.3s; }
.okc-ds-fly[data-n="3"] { animation-delay: 0.6s; }
@keyframes okcDsOut {
  0%, 8% { opacity: 0; transform: translateX(0); }
  10% { opacity: 1; transform: translateX(0); }
  28% { opacity: 1; transform: translateX(100%); }
  31%, 100% { opacity: 0; transform: translateX(100%); }
}
@keyframes okcDsBack {
  0%, 40% { opacity: 0; transform: translateX(100%); }
  42% { opacity: 1; transform: translateX(100%); }
  58% { opacity: 1; transform: translateX(0); }
  61%, 100% { opacity: 0; transform: translateX(0); }
}

.okc-ds-custs { display: flex; flex-shrink: 0; }
.okc-ds-custs > i {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin-left: -7px;
  border: 2px solid var(--ds-bg);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11.5px;
  font-weight: 800;
  color: #FFFFFF;
  background: #4B5BD6;
}
.okc-ds-custs > i:first-child { margin-left: 0; }
.okc-ds-custs > i:nth-child(2) { background: #C2570C; }
.okc-ds-custs > i:nth-child(3) { background: #0F8A7A; }
.okc-ds-custs > i > svg { width: 15px; height: 15px; }
.okc-ds-tick {
  position: absolute;
  right: -4px;
  bottom: -4px;
  /* Above the next customer's circle, which overlaps this one. */
  z-index: 1;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #25D366;
  color: #FFFFFF;
  display: grid;
  place-items: center;
  transform: scale(0);
  animation: okcDsTick var(--ds-t) both;
}
.okc-ds-tick svg { width: 10px; height: 10px; }
.okc-ds-custs > i:nth-child(2) .okc-ds-tick { animation-delay: 0.3s; }
.okc-ds-custs > i:nth-child(3) .okc-ds-tick { animation-delay: 0.6s; }
@keyframes okcDsTick {
  0%, 28% { transform: scale(0); }
  31% { transform: scale(1.4); }
  34%, 100% { transform: scale(1); }
}
/* Defaulter: one customer, and the app's real badge lands on them. */
.okc-ds--defaulter .okc-ds-custs { padding: 0 8px 4px; }
.okc-ds-badge {
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 40px;
  margin-left: -20px;
  opacity: 0;
  animation: okcDsBadge var(--ds-t) both;
}
.okc-ds-badge svg { width: 40px; height: auto; }
@keyframes okcDsBadge {
  0%, 27% { opacity: 0; transform: scale(2.4); }
  32%, 100% { opacity: 1; transform: scale(1); }
}
/* Stock: one item, its count drops and turns red. */
.okc-ds--stock .okc-ds-custs > i {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #2A2A2D;
  color: #F2F2F2;
  animation: okcDsLow var(--ds-t) both;
}
.okc-ds--stock .okc-ds-custs > i > svg { width: 19px; height: 19px; }
@keyframes okcDsLow {
  0%, 28% { box-shadow: 0 0 0 0 rgba(255, 94, 56, 0); color: #F2F2F2; }
  34%, 100% { box-shadow: 0 0 0 2px var(--ds-red); color: #FF8A6E; }
}
/* Report: the far end is the app's share icon. */
.okc-ds--report .okc-ds-custs > i { background: var(--ds-green); }

/* ---- Caption and button ---- */
.okc-ds-capt { display: flex; align-items: center; gap: 12px; }
.okc-ds-caps { position: relative; flex: 1; min-width: 0; height: 36px; }
.okc-ds-capset { visibility: hidden; }
.okc-ds-capset.is-cur { visibility: visible; }
.okc-ds-capset > span {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 36px;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  opacity: 0;
  animation: okcDsCap1 var(--ds-t) both;
}
.okc-ds-capset > span:nth-child(2) { animation-name: okcDsCap2; color: #5FD68A; }
/* The southern scripts set wider, so their captions go a size down. */
.okc-ds:lang(ta) .okc-ds-capset > span,
.okc-ds:lang(te) .okc-ds-capset > span,
.okc-ds:lang(kn) .okc-ds-capset > span,
.okc-ds:lang(ml) .okc-ds-capset > span { font-size: 12.5px; }
@keyframes okcDsCap1 {
  0% { opacity: 0; transform: translateY(6px); }
  4%, 54% { opacity: 1; transform: none; }
  58%, 100% { opacity: 0; transform: translateY(-6px); }
}
@keyframes okcDsCap2 {
  0%, 58% { opacity: 0; transform: translateY(6px); }
  62%, 96% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}

/* The download button: brand green, the app's download arrow on a white
   tile, a one-line label and a "Free" badge on the corner. The same on
   Android and iPhone. max-width keeps a long label in any language from
   squeezing the caption; it wraps to a second line instead. */
.okc-ds-btn {
  position: relative;
  flex-shrink: 0;
  max-width: 170px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 5px 12px 5px 7px;
  border-radius: 14px;
  background: linear-gradient(180deg, #3CBF60 0%, #1F9443 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  animation: okcDsBtn 3s infinite;
}
.okc-ds-store {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #FFFFFF;
  color: #1F9443;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.okc-ds-store svg { width: 19px; height: 19px; }
.okc-ds-btn-t { font-size: 14px; font-weight: 800; line-height: 1.2; letter-spacing: 0.1px; }
.okc-ds-free {
  position: absolute;
  top: -9px;
  right: -5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #FFFFFF;
  color: #0E7A41;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
/* A shine across the button, as a "tap here" cue. It is clipped by its own
   box, so the badge can sit outside the button's edge. */
.okc-ds-shine {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: inherit;
  overflow: hidden;
}
.okc-ds-shine::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));
  animation: okcDsSweep 3s infinite;
}
@keyframes okcDsSweep {
  0%, 55% { transform: translateX(0); }
  85%, 100% { transform: translateX(420%); }
}
@keyframes okcDsBtn {
  0%, 50%, 100% { transform: none; box-shadow: 0 0 0 0 rgba(60, 191, 96, 0); }
  62% { transform: scale(1.05); box-shadow: 0 0 0 0 rgba(60, 191, 96, 0.7); }
  80% { transform: none; box-shadow: 0 0 0 10px rgba(60, 191, 96, 0); }
}
/* Nothing moves while the strip is off screen. */
.okc-ds:not(.is-on) .okc-ds-btn,
.okc-ds:not(.is-on) .okc-ds-shine::after { animation-play-state: paused; }

.okc-ds-link:focus-visible { outline: 2.5px solid #5FD68A; outline-offset: -3px; }

/* Keep the back-to-top buttons (homepage, blog) clear of the strip. On wide
   desktops the bar stops short of the corner, so no lift is needed there. */
.okc-ds-on:not(.okc-ds-on--web) .to-top,
.okc-ds-on:not(.okc-ds-on--web) .go-top-btn { bottom: 128px !important; }
@media (max-width: 899px) {
  .okc-ds-on--web .to-top,
  .okc-ds-on--web .go-top-btn { bottom: 128px !important; }
}
@media (min-width: 900px) and (max-width: 1399px) {
  .okc-ds-on--web .to-top,
  .okc-ds-on--web .go-top-btn { bottom: 110px !important; }
}

/* ---- Desktop: the button is Login, not Download ---- */
.okc-ds-web-only,
.okc-ds-webline { display: none; }
.okc-ds--web .okc-ds-app-only,
.okc-ds--web .okc-ds-free { display: none; }
.okc-ds--web .okc-ds-web-only { display: block; }
.okc-ds--web .okc-ds-link { cursor: pointer; }

/* ---- Desktop layout: one floating row, as wide as the page's own content
   column (.okc-nav-wrap / .okc-wrap: 1320px max, 56px side padding) ---- */
@media (min-width: 900px) {
  .okc-ds--web {
    left: 50%;
    right: auto;
    bottom: 18px;
    width: calc(100% - 112px);
    max-width: 1208px;
    margin: 0;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
    transform: translate(-50%, 160%);
  }
  .okc-ds--web.is-on { transform: translate(-50%, 0); }
  .okc-ds--web .okc-ds-link,
  .okc-ds--web .okc-ds-link:hover,
  .okc-ds--web .okc-ds-link:visited {
    flex-direction: row;
    align-items: center;
    gap: 24px;
    padding: 13px 16px 13px 20px;
  }
  .okc-ds--web .okc-ds-scenes { flex: 0 0 36%; }
  .okc-ds--web .okc-ds-capt {
    flex: 1;
    min-width: 0;
    gap: 20px;
    padding-left: 24px;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
  }
  .okc-ds--web .okc-ds-caps,
  .okc-ds--web .okc-ds-capset > span { height: 44px; }
  .okc-ds--web .okc-ds-capset > span { font-size: 17px; justify-content: center; text-align: center; }
  /* Says where the Login button goes. */
  .okc-ds--web .okc-ds-webline {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 2px;
    text-align: right;
    white-space: nowrap;
  }
  .okc-ds-webline b { font-size: 14px; font-weight: 800; color: #F2F2F2; }
  .okc-ds-webline small { font-size: 12px; font-weight: 600; color: #9A9AA0; }
  .okc-ds--web .okc-ds-btn { min-height: 48px; padding: 6px 20px 6px 8px; gap: 10px; max-width: none; }
  .okc-ds--web .okc-ds-btn-t { font-size: 16px; white-space: nowrap; }
  .okc-ds--web .okc-ds-link:hover .okc-ds-btn { filter: brightness(1.08); }
}

/* Reduced motion: the features still take turns, but nothing animates. */
@media (prefers-reduced-motion: reduce) {
  .okc-ds { transition: none; }
  .okc-ds *, .okc-ds *::after { animation: none !important; }
  .okc-ds-capset > span:first-child { opacity: 1; }
  .okc-ds-tick { transform: scale(1); }
  .okc-ds-badge { opacity: 1; }
}
