/* generated by tools/port-fish.mjs from the main site's fish (BetaScore 0798f38d): components/mascot/BettaFish + components/rankings/RankingFishGuide. Do not edit. */
/* Idle swim loop, ported from the BetaSouls pet widget (bf-* keyframes):
   the body bobs up and down while the tail and fins sway on offset timings. */

.bf-fish {
  display: block;
  overflow: visible;
  animation: bf-bob 3s ease-in-out infinite;
}

.bf-fish [data-part] {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

/* Hosts can speed the tail up (a fish swimming somewhere) through --fish-tail-beat. */
.bf-fish [data-part="tail"] {
  animation: bf-tail var(--fish-bf-tail-beat, 1.9s) ease-in-out infinite;
}

.bf-fish [data-part="top-rear-fin"] {
  animation: bf-topFin 2.1s ease-in-out infinite 0.25s;
}

.bf-fish [data-part="middle-rear-fin"] {
  animation: bf-midFin 1.9s ease-in-out infinite 0.5s;
}

.bf-fish [data-part="bottom-rear-fin"] {
  animation: bf-botFin 2s ease-in-out infinite 0.35s;
}

.bf-fish [data-part="front-fin"] {
  transform-origin: 50% 0%;
  animation: bf-frontFin 1.3s ease-in-out infinite 0.1s;
}

@keyframes bf-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes bf-tail {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(7deg); }
}

@keyframes bf-topFin {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-5deg); }
}

@keyframes bf-midFin {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(4deg); }
}

@keyframes bf-botFin {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-4deg); }
}

@keyframes bf-frontFin {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-6deg); }
}

/* Moods (only drawn when the host passes `mood`): the faces fade in over the
   normal eye; happy swims faster, meh slows down and the pupil sinks. */
.bf-fish [data-expression] {
  opacity: 0;
  transition: opacity 160ms ease;
}

.bf-fish[data-mood] [data-part="eye"] {
  transition: opacity 160ms ease;
}

.bf-fish[data-mood] [data-part="pupil"] {
  transition: transform 220ms ease;
}

.bf-fish[data-mood="happy"] [data-expression="happy"],
.bf-fish[data-mood="meh"] [data-expression="meh"] {
  opacity: 1;
}

.bf-fish[data-mood="happy"] {
  --fish-tail-beat: 0.6s;
}

.bf-fish[data-mood="happy"] [data-part="eye"] {
  opacity: 0;
}

.bf-fish[data-mood="meh"] {
  --fish-tail-beat: 3.4s;
}

.bf-fish[data-mood="meh"] [data-part="pupil"] {
  transform: translate(-10px, 38px);
}

.bf-fish[data-mood="meh"] [data-part="sweat"] {
  animation: bf-sweat 1.4s ease-in infinite;
}

@keyframes bf-sweat {
  0% { transform: translateY(-18px); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateY(60px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bf-fish,
  .bf-fish [data-part] {
    animation: none;
  }
}


/* ---------- The fish ---------- */

.bf-figure {
  display: block;
  position: relative;
}

/* Leans into fast scrolling, then settles. */
.bf-tilt {
  display: block;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 320ms cubic-bezier(.4,0,.2,1);
}

.bf-act,
.bf-turn {
  display: block;
}

.bf-fish {
  display: block;
  height: auto;
  width: 100%;
}

/* Blinks: the whole eye closes for a moment. */
.bf-figure [data-part="eye"] {
  transition: transform 70ms ease-in;
}

.bf-figure[data-blink="true"] [data-part="eye"] {
  transform: scaleY(0.12);
}

/* Looks: the pupil moves toward the pointer (values are in the drawing's units). */
.bf-figure [data-part="pupil"] {
  transform: translate(var(--look-x, 0px), var(--look-y, 0px));
  transition: transform 260ms cubic-bezier(0.3, 0.7, 0.4, 1);
}

/* Talks: the mouth opens and closes while a line appears. */
.bf-figure[data-talking="true"] [data-part="mouth"] {
  animation: bf-talk 0.26s ease-in-out infinite alternate;
}

/* Swims somewhere: a faster tail (BettaFish reads --fish-tail-beat). */
.bf-figure[data-swim="true"] {
  --fish-tail-beat: 0.55s;
}

/* Small acts, one at a time, every 7 to 14 seconds while nothing else is going on. */
.bf-figure[data-act="wiggle"] .bf-act {
  animation: bf-wiggle 700ms ease-in-out;
}

.bf-figure[data-act="drift"] .bf-act {
  animation: bf-drift 2400ms ease-in-out;
}

.bf-figure[data-act="lap"] .bf-act {
  animation: bf-lapMove 2800ms ease-in-out;
}

.bf-figure[data-act="lap"] .bf-turn {
  animation: bf-lapTurn 2800ms ease-in-out;
}

.bf-figure[data-act="celebrate"] .bf-act {
  animation: bf-flip 950ms cubic-bezier(0.3, 0.7, 0.3, 1);
}

/* Three quick taps: a betta's flare. Fins and tail spread from where they join the body, the body
   puffs and shivers, then everything settles; three sparks go off around it. */
.bf-figure[data-act="flare"] .bf-act {
  animation: bf-flareBody 1800ms ease-out;
}

.bf-figure[data-act="flare"] [data-part="tail"] {
  animation: bf-flareTail 1800ms ease-out;
  transform-origin: 0% 50%;
}

.bf-figure[data-act="flare"] [data-part="top-rear-fin"] {
  animation: bf-flareTop 1800ms ease-out;
  transform-origin: 10% 95%;
}

.bf-figure[data-act="flare"] [data-part="middle-rear-fin"] {
  animation: bf-flareMiddle 1800ms ease-out;
  transform-origin: 0% 50%;
}

.bf-figure[data-act="flare"] [data-part="bottom-rear-fin"] {
  animation: bf-flareBottom 1800ms ease-out;
  transform-origin: 8% 5%;
}

.bf-figure[data-act="flare"] [data-part="front-fin"] {
  animation: bf-flareFront 1800ms ease-out;
  transform-origin: 85% 5%;
}

.bf-figure[data-act="flare"] [data-part="head"] {
  animation: bf-flareHead 1800ms ease-out;
  transform-origin: 100% 50%;
}

.bf-sparks {
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.bf-sparks svg {
  fill: #ffa244;
  height: 18px;
  opacity: 0;
  position: absolute;
  width: 18px;
}

.bf-sparks svg:nth-child(1) {
  left: 4%;
  top: -14%;
}

.bf-sparks svg:nth-child(2) {
  height: 14px;
  left: 58%;
  top: -26%;
  width: 14px;
}

.bf-sparks svg:nth-child(3) {
  height: 12px;
  left: 96%;
  top: 18%;
  width: 12px;
}

.bf-figure[data-act="flare"] .bf-sparks svg {
  animation: bf-spark 1100ms ease-out 120ms both;
}

.bf-figure[data-act="flare"] .bf-sparks svg:nth-child(2) {
  animation-delay: 300ms;
}

.bf-figure[data-act="flare"] .bf-sparks svg:nth-child(3) {
  animation-delay: 480ms;
}

/* Bubbles from the mouth (the fish faces left, so they rise from its left end). */
.bf-bubbles {
  height: 1px;
  left: 2%;
  pointer-events: none;
  position: absolute;
  top: 40%;
  width: 1px;
}

.bf-bubbles span {
  border: 1.5px solid #fec48a;
  border-radius: 999px;
  height: 8px;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  width: 8px;
}

.bf-bubbles span:nth-child(2) {
  height: 6px;
  left: -7px;
  width: 6px;
}

.bf-bubbles span:nth-child(3) {
  height: 5px;
  left: 3px;
  width: 5px;
}

.bf-figure[data-act="bubble"] .bf-bubbles span,
.bf-figure[data-act="celebrate"] .bf-bubbles span {
  animation-duration: 1.4s;
  animation-fill-mode: forwards;
  animation-name: bf-rise;
  animation-timing-function: ease-out;
}

.bf-figure[data-act="bubble"] .bf-bubbles span:nth-child(2),
.bf-figure[data-act="celebrate"] .bf-bubbles span:nth-child(2) {
  animation-delay: 0.25s;
}

.bf-figure[data-act="bubble"] .bf-bubbles span:nth-child(3),
.bf-figure[data-act="celebrate"] .bf-bubbles span:nth-child(3) {
  animation-delay: 0.5s;
}

@keyframes bf-talk {
  from { transform: scaleY(1); }
  to { transform: scaleY(1.9); }
}

@keyframes bf-wiggle {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-6deg); }
  45% { transform: rotate(5deg); }
  70% { transform: rotate(-3deg); }
}

@keyframes bf-drift {
  0%, 100% { transform: translateX(0); }
  45%, 60% { transform: translateX(-10px); }
}

/* A short lap: swims ahead, turns round, swims back, turns to face the page again. */
@keyframes bf-lapMove {
  0%, 100% { transform: translate(0, 0); }
  38%, 52% { transform: translate(-48px, -6px); }
  90% { transform: translate(0, 0); }
}

@keyframes bf-lapTurn {
  0%, 38% { transform: scaleX(1); }
  45% { transform: scaleX(0.1); }
  52%, 88% { transform: scaleX(-1); }
  94% { transform: scaleX(0.1); }
  100% { transform: scaleX(1); }
}

@keyframes bf-flareBody {
  0% { transform: none; }
  10% { transform: scale(1.08); }
  18% { transform: scale(1.05); }
  26% { transform: scale(1.06) translateX(-1.5px); }
  34% { transform: scale(1.06) translateX(1.5px); }
  42% { transform: scale(1.06) translateX(-1.5px); }
  50% { transform: scale(1.06) translateX(1.5px); }
  68% { transform: scale(1.05); }
  100% { transform: none; }
}

@keyframes bf-flareTail {
  0% { transform: none; }
  10% { transform: scale(1.2, 1.28) rotate(-4deg); }
  28% { transform: scale(1.17, 1.25) rotate(3deg); }
  44% { transform: scale(1.2, 1.28) rotate(-3deg); }
  60% { transform: scale(1.17, 1.25) rotate(2deg); }
  78% { transform: scale(1.06, 1.08); }
  100% { transform: none; }
}

@keyframes bf-flareTop {
  0% { transform: none; }
  10% { transform: rotate(-16deg) scale(1.16); }
  60% { transform: rotate(-13deg) scale(1.14); }
  100% { transform: none; }
}

@keyframes bf-flareMiddle {
  0% { transform: none; }
  10% { transform: scale(1.14); }
  60% { transform: scale(1.12); }
  100% { transform: none; }
}

@keyframes bf-flareBottom {
  0% { transform: none; }
  10% { transform: rotate(14deg) scale(1.16); }
  60% { transform: rotate(11deg) scale(1.14); }
  100% { transform: none; }
}

@keyframes bf-flareFront {
  0% { transform: none; }
  10% { transform: rotate(-30deg) scale(1.15); }
  30% { transform: rotate(-22deg) scale(1.15); }
  45% { transform: rotate(-30deg) scale(1.15); }
  60% { transform: rotate(-22deg) scale(1.12); }
  100% { transform: none; }
}

@keyframes bf-flareHead {
  0% { transform: none; }
  10% { transform: scale(1.06); }
  70% { transform: scale(1.04); }
  100% { transform: none; }
}

@keyframes bf-spark {
  0% { opacity: 0; transform: scale(0.2) rotate(0deg); }
  30% { opacity: 1; transform: scale(1.1) rotate(45deg); }
  100% { opacity: 0; transform: scale(0.6) rotate(90deg); }
}

@keyframes bf-flip {
  0% { transform: translateY(0) rotate(0deg); }
  40% { transform: translateY(-18px) rotate(-160deg); }
  75% { transform: translateY(-6px) rotate(-330deg); }
  100% { transform: translateY(0) rotate(-360deg); }
}

@keyframes bf-rise {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  15% { opacity: 0.95; }
  80% { opacity: 0.7; }
  100% { opacity: 0; transform: translate(-10px, -46px) scale(1.1); }
}

/* ---------- Buttons that hold a fish ---------- */

.bf-fishButton {
  background: transparent;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  display: block;
  padding: 4px;
  position: relative;
}

.bf-fishButton:focus-visible {
  box-shadow: 0 0 0 2px #faf7f3, 0 0 0 4px #231c19;
  outline: 2px solid transparent;
}

.bf-fishButton:active .bf-tilt {
  transform: rotate(var(--tilt, 0deg)) scale(0.94);
}

/* "Need a hand?" above the fish on hover or keyboard focus. */
.bf-hint {
  background: #231c19;
  border-radius: 999px;
  bottom: calc(100% + 4px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  opacity: 0;
  padding: 4px 10px;
  pointer-events: none;
  position: absolute;
  right: 8px;
  transition: opacity 150ms ease 0ms;
  white-space: nowrap;
}

.bf-fishButton:hover .bf-hint,
.bf-fishButton:focus-visible .bf-hint {
  opacity: 1;
  transition-delay: 350ms;
}

/* Not while the fish is talking or has its menu open, nor while it swims in or out. */
.bf-fishButton[data-busy] .bf-hint,
.bf-dock:not([data-phase="here"]) .bf-hint {
  opacity: 0;
  transition: none;
}

/* ---------- In the bottom-right corner ---------- */

.bf-dock {
  /* How far the fish slides right to peek: about half of it stays on screen, head first. */
  --peek-x: 72px;
  /* --bs-consent-offset: the bottom cookie banner's height while it is open (ConsentBanner B). */
  bottom: calc(24px + var(--bs-consent-offset, 0px));
  height: 88px;
  pointer-events: none;
  position: fixed;
  right: 24px;
  width: 112px;
  z-index: 1030;
}

.bf-dockButton {
  bottom: 6px;
  pointer-events: auto;
  position: absolute;
  right: -2px;
}

.bf-dockFish {
  width: 104px;
}

.bf-travel,
.bf-wave,
.bf-turnAround {
  display: block;
}

/* Peeking slides in from past the edge to half out (with a little overshoot), nodding as it
   arrives; from the corner it slides out to the same place. Ducking slides it back past the edge;
   coming the rest of the way slides it into the corner. */
.bf-travel {
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bf-dock[data-phase="peeking"] .bf-travel {
  transform: translateX(var(--peek-x));
  transition: transform 620ms cubic-bezier(0.2, 1.3, 0.4, 1);
}

@starting-style {
  .bf-dock[data-phase="peeking"] .bf-travel {
    transform: translateX(160px);
  }
}

.bf-dock[data-phase="peeking"] .bf-wave {
  animation: bf-peekHello 900ms ease-out;
}

.bf-dock[data-phase="ducking"] .bf-travel {
  transform: translateX(160px);
  transition: transform 380ms cubic-bezier(0.55, 0, 0.8, 0.2);
}

/* What it says comes once it has arrived. */
.bf-dock[data-phase="peeking"] .bf-prompt {
  animation-delay: 300ms;
}

.bf-dock[data-phase="entering"] .bf-travel {
  animation: bf-dockIn 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bf-dock[data-phase="entering"] .bf-wave {
  animation: bf-dockWave 900ms ease-in-out both;
}

.bf-dock[data-phase="leaving"] .bf-turnAround {
  animation: bf-turnAway 220ms ease-in both;
}

.bf-dock[data-phase="leaving"] .bf-travel {
  animation: bf-dockOut 380ms cubic-bezier(0.55, 0, 0.8, 0.2) 180ms both;
}

@keyframes bf-dockIn {
  from { transform: translateX(160px); }
  to { transform: none; }
}

/* An S-shaped path: dips, rises, settles, the body pitching with it. */
@keyframes bf-dockWave {
  0% { transform: translateY(12px) rotate(-8deg); }
  30% { transform: translateY(-10px) rotate(6deg); }
  60% { transform: translateY(5px) rotate(-3deg); }
  85% { transform: translateY(-2px) rotate(1deg); }
  100% { transform: none; }
}

@keyframes bf-peekHello {
  0% { transform: rotate(10deg); }
  40% { transform: rotate(-7deg); }
  70% { transform: rotate(3deg); }
  100% { transform: none; }
}

@keyframes bf-turnAway {
  0% { transform: scaleX(1); }
  45% { transform: scaleX(0.12) scaleY(1.05); }
  100% { transform: scaleX(-1); }
}

@keyframes bf-dockOut {
  from { transform: none; }
  to { transform: translateX(180px); }
}

/* Narrow desktops leave no room in the page margin: the fish only peeks in from the edge,
   so it never covers a card or a score. */
@media (max-width: 1299px) {
  .bf-dock {
    --peek-x: 14px;
    right: -34px;
  }

  .bf-dock .bf-hint {
    right: 44px;
  }
}

/* ---------- What the fish says first ----------
   It opens where the menu opens, above the fish, in the same card (.bf-panel). */

.bf-prompt .bf-panelHead {
  align-items: flex-start;
}

.bf-prompt .bf-avatar {
  margin-top: 2px;
}

.bf-promptText {
  color: #231c19;
  flex: 1;
  font-size: 16px;
  line-height: 24px;
  margin: 0;
}

/* Under the line, in from the mark. */
.bf-promptActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-left: calc(32px + 12px);
}

.bf-chip {
  align-items: center;
  background: #fff;
  border: 1px solid #e7e0db;
  border-radius: 999px;
  color: #231c19;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  min-height: 36px;
  padding: 0 12px;
  text-decoration: none;
}

.bf-chip:hover {
  border-color: #5c534f;
}

.bf-chip:focus-visible,
.bf-iconButton:focus-visible,
.bf-menuItem:focus-visible,
.bf-choice:focus-visible,
.bf-relatedRow:focus-visible,
.bf-primary:focus-visible,
.bf-textLink:focus-visible {
  box-shadow: 0 0 0 2px #faf7f3, 0 0 0 4px #231c19;
  outline: 2px solid transparent;
}

.bf-iconButton {
  align-items: center;
  background: none;
  border: 0;
  border-radius: 8px;
  color: #5c534f;
  cursor: pointer;
  display: grid;
  flex: none;
  height: 32px;
  justify-items: center;
  padding: 0;
  width: 32px;
}

.bf-iconButton:hover {
  color: #231c19;
}

/* ---------- The menu ---------- */

.bf-panel {
  animation: bf-pop 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
  background: #fff;
  border: 1.5px solid #fec48a;
  border-radius: 12px;
  bottom: calc(100% + 12px);
  box-sizing: border-box;
  /* The dock rises above the bottom cookie banner, so the menu gets that much less room. */
  max-height: min(560px, calc(100vh - var(--hd, 56px) - 140px - var(--bs-consent-offset, 0px)));
  overflow-y: auto;
  padding: 16px;
  pointer-events: auto;
  position: absolute;
  right: 0;
  width: 360px;
}

/* The peeking dock sits 34px past the edge; keep the menu the usual space in from it. */
@media (max-width: 1299px) {
  .bf-dock .bf-panel {
    right: calc(34px + 24px);
  }
}

.bf-panelHead {
  align-items: center;
  display: flex;
  gap: 12px;
}

.bf-avatar {
  display: block;
  flex: none;
  height: auto;
  width: 32px;
}

.bf-panelTitle {
  color: #231c19;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  margin: 0;
}

.bf-panelTitle:focus {
  outline: none;
}

@keyframes bf-pop {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Reduced motion: no acts, swims, pops or glances; the fish simply appears where it belongs. */
@media (prefers-reduced-motion: reduce) {
  .bf-figure,
  .bf-figure *,
  .bf-dock *,
  .bf-prompt,
  .bf-panel {
    animation: none !important;
    transition: none !important;
  }
}

