/* Right-edge order widget. Motion is transform and opacity, matching the side demo. */
#todayView { position: relative; }

#bokabuBottleFab {
  --r11b-green: #123d22;
  --r11b-green-deep: #0c2f19;
  --r11b-yellow: #f6ca46;
  --r11b-cycle: 9.6s;
  --r11b-bob: 4.6s;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 8;
  width: 118px;
  height: 176px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 20px 6px 10px 16px;
  pointer-events: none;
}

#bokabuBottleFab .r11b-bob {
  position: relative;
  pointer-events: auto;
  transform: translateY(0);
  transform-origin: 50% 100%;
  animation: r11b-bob var(--r11b-bob) ease-in-out infinite;
}

#bokabuBottleFab .r11b-widget {
  position: relative;
  width: 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#bokabuBottleFab .r11b-hit {
  position: relative;
  width: 86px;
  min-height: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(1);
  transform-origin: 50% 80%;
  transition: transform 0.22s cubic-bezier(0.34, 1.45, 0.64, 1);
  box-shadow: none;
}

#bokabuBottleFab .r11b-hit:focus-visible {
  outline: 2px solid var(--r11b-yellow);
  outline-offset: 3px;
  border-radius: 16px;
}

#bokabuBottleFab .r11b-hit.is-pressed,
#bokabuBottleFab .r11b-hit:active {
  transform: scale(0.92);
  transition-duration: 0.09s;
  transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}

#bokabuBottleFab .r11b-bottles {
  position: relative;
  width: 48px;
  height: 118px;
  z-index: 1;
}

#bokabuBottleFab .r11b-flavor {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  animation: r11b-fade var(--r11b-cycle) ease-in-out infinite;
}

#bokabuBottleFab .r11b-flavor img {
  display: block;
  width: auto;
  height: auto;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: top center;
  filter: drop-shadow(0 3px 6px rgba(12, 47, 25, 0.32));
  pointer-events: none;
  user-select: none;
}

#bokabuBottleFab .r11b-flavor-cola { animation-delay: 0s; }
#bokabuBottleFab .r11b-flavor-bluehawaii { animation-delay: calc(var(--r11b-cycle) / -3 * 2); }
#bokabuBottleFab .r11b-flavor-honeylemon { animation-delay: calc(var(--r11b-cycle) / -3); }

#bokabuBottleFab .r11b-pill {
  position: relative;
  z-index: 2;
  margin-top: -14px;
  background: var(--r11b-yellow);
  color: var(--r11b-green-deep);
  font-family: "Noto Sans Thai", "Sarabun", sans-serif;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.01em;
  padding: 5px 11px 4px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 2px 6px rgba(12, 47, 25, 0.22);
  pointer-events: none;
}

#bokabuBottleFab .r11b-close {
  position: absolute;
  top: -4px;
  right: 14px;
  z-index: 3;
  width: 20px;
  height: 20px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--r11b-green-deep);
  box-shadow: 0 1px 4px rgba(12, 47, 25, 0.28);
  cursor: pointer;
  display: grid;
  place-items: center;
  appearance: none;
  -webkit-appearance: none;
}

#bokabuBottleFab .r11b-close:focus-visible {
  outline: 2px solid var(--r11b-yellow);
  outline-offset: 2px;
}

#bokabuBottleFab .r11b-close svg {
  width: 10px;
  height: 10px;
  display: block;
}

@keyframes r11b-fade {
  0%, 27.6% { opacity: 1; }
  33.3%, 94.27% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes r11b-bob {
  0%, 18%, 100% { transform: translateY(0); }
  9% { transform: translateY(-7px); }
}

@media (prefers-reduced-motion: reduce) {
  #bokabuBottleFab .r11b-bob {
    animation: none;
    transform: none;
  }
  #bokabuBottleFab .r11b-flavor {
    animation: none;
    opacity: 0;
  }
  #bokabuBottleFab .r11b-flavor-cola { opacity: 1; }
  #bokabuBottleFab .r11b-hit { transition: none; }
}
