/* "Mystery Discount" octopus (templates/site/partials/octo.html). Own namespace (ro-octo) and own fixed layer:
   it never inherits page styles it does not set itself, so it looks the same on the site and on the order sheet. */
.ro-octo {
  --ro-w: 196px;
  --ro-gap: 18px;
  --ro-lift: 0px;                      /* raised above the phone buy bar when that bar is showing */
  --ro-ink: #4A0E52;
  --ro-green: #198A5C;
  position: fixed;
  right: max(var(--ro-gap), env(safe-area-inset-right));
  bottom: calc(max(var(--ro-gap), env(safe-area-inset-bottom)) + var(--ro-lift));
  z-index: 2147483000;
  width: var(--ro-w);
  font-family: "Geologica", system-ui, sans-serif;
  pointer-events: none;                /* only the octopus and its buttons take clicks */
  opacity: 0;
  transform: translate3d(0, 24px, 0) scale(.88);
  transform-origin: 82% 100%;
  transition: opacity .32s cubic-bezier(.22, 1, .36, 1), transform .5s cubic-bezier(.22, 1, .36, 1), bottom .3s ease;
}
.ro-octo[hidden] { display: none; }
.ro-octo.is-in { opacity: 1; transform: none; }
.ro-octo.is-out { opacity: 0; transform: translate3d(0, 16px, 0) scale(.94); transition-duration: .22s, .3s, .3s; }
.ro-octo.is-up { --ro-lift: 68px; }
/* the order sheet: a little smaller, it shares the corner with the order summary */
.ro-octo.is-sheet { --ro-w: 176px; }

.ro-octo__grab {
  all: unset;
  pointer-events: auto;
  display: block;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding: 6px;
  cursor: copy;
  border-radius: 22px;
  background: #fff;                    /* the artwork's own white ground */
  box-shadow: 0 16px 38px -12px rgba(60, 20, 90, .38), 0 2px 8px rgba(60, 20, 90, .10), 0 0 0 1px rgba(120, 70, 170, .10);
  -webkit-tap-highlight-color: transparent;
  animation: ro-float 4s ease-in-out infinite;
}
.ro-octo__grab:focus-visible { outline: 3px solid var(--ro-green); outline-offset: 4px; }
@keyframes ro-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }

.ro-octo__pic { position: relative; display: block; container-type: inline-size; transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
.ro-octo__img { display: block; width: 100%; height: auto; border-radius: 16px; }

/* The code sits on the blank sign of the picture: real text (copyable, changeable without a new picture). */
/* the sign's clear area, measured on the picture: x 17.5–80.7 %, y 66.9–96.8 % (the tentacles hold its top corners) */
.ro-octo__sign {
  position: absolute; left: 20%; right: 22%; top: 70%; bottom: 6%;
  display: flex; align-items: center; justify-content: center; container-type: inline-size;
  color: var(--ro-ink); text-align: center; line-height: 1; white-space: nowrap;
}
.ro-octo__code {
  font-size: 20.5cqw; font-weight: 900; letter-spacing: .01em;           /* of the sign: always fits inside it */
  -webkit-text-stroke: .9cqw var(--ro-ink); paint-order: stroke fill;   /* rounds the letters like the artwork */
}

.ro-octo__grab:hover .ro-octo__pic, .ro-octo__grab:focus-visible .ro-octo__pic { transform: translateY(-2px) scale(1.015); }

/* "Click to copy" chip above the card; turns green "Copied!" after a click. */
.ro-octo__tip {
  position: absolute; left: 50%; bottom: calc(100% + 8px);
  transform: translate(-50%, 6px);
  padding: 6px 12px; border-radius: 999px;
  background: var(--ro-ink); color: #fff;
  font-size: 13px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(74, 14, 82, .25);
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .25s cubic-bezier(.22, 1, .36, 1), background-color .2s ease;
}
.ro-octo__grab:hover .ro-octo__tip, .ro-octo__grab:focus-visible .ro-octo__tip, .ro-octo.is-copied .ro-octo__tip {
  opacity: 1; transform: translate(-50%, 0);
}
.ro-octo.is-copied .ro-octo__tip { background: var(--ro-green); }

.ro-octo__x {
  all: unset;
  pointer-events: auto;
  position: absolute; top: -9px; right: -9px; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--ro-ink);
  box-shadow: 0 2px 10px rgba(74, 14, 82, .24), 0 0 0 1px rgba(74, 14, 82, .08);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.ro-octo__x svg { width: 10px; height: 10px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; fill: none; }
.ro-octo__x:hover { transform: scale(1.08); box-shadow: 0 4px 14px rgba(74, 14, 82, .3), 0 0 0 1px rgba(74, 14, 82, .12); }
.ro-octo__x:focus-visible { outline: 3px solid var(--ro-green); outline-offset: 2px; }
.ro-octo__x::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; }   /* bigger touch target */

.ro-octo__terms {
  display: block; margin: 2px 2px 2px; text-align: center;
  font-size: 15px; line-height: 1.25; font-weight: 800; letter-spacing: .005em; color: var(--ro-ink); text-wrap: balance;
}
.ro-octo__today { color: var(--ro-green); }
.ro-octo__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 640px) {
  .ro-octo { --ro-w: 148px; --ro-gap: 10px; }
  .ro-octo.is-sheet { --ro-w: 140px; }
  .ro-octo__grab { padding: 4px; border-radius: 18px; }
  .ro-octo__img { border-radius: 14px; }
  .ro-octo__x { top: -8px; right: -6px; width: 26px; height: 26px; }
  .ro-octo__tip { font-size: 12px; padding: 5px 10px; }
  .ro-octo__terms { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .ro-octo, .ro-octo.is-out { transition: opacity .2s linear; transform: none; }
  .ro-octo__grab { animation: none; }
  .ro-octo__pic, .ro-octo__tip { transition: none; }
}

@media print { .ro-octo { display: none !important; } }
