/* Milk Brand Vote — the jar in the bottom-right corner and its voting card.
   Selectors start with "html body" where themes and Elementor style buttons, so they can't restyle these. */

@font-face {
  font-family: 'MV Fat Frank';
  src: url('FatFrank-Regular.ttf') format('truetype');
  font-display: swap;
}

/* Level with the arcade button. vote.js nudges it left of the reCAPTCHA badge, or up
   above a cookie bar while one is showing, and these are where it sits otherwise. */
html body .mv-root {
  position: fixed;
  right: 22px;
  bottom: 28px;
  transition: right 0.35s ease, bottom 0.35s ease;
  z-index: 2147482990;
  font-family: 'DM Sans', Arial, sans-serif;
  color: #000;
  line-height: 1.3;
  text-align: left;
}
.mv-root *,
.mv-root *::before,
.mv-root *::after { box-sizing: border-box; }

.mv-root .mv-display {
  font-family: fatfrank, 'Fat Frank', 'MV Fat Frank', 'Arial Black', sans-serif;
  font-weight: 400;
}

/* ---------- The jar ---------- */
html body .mv-root button.mv-jar,
html body .mv-root button.mv-jar:hover,
html body .mv-root button.mv-jar:focus {
  display: block;
  width: 153px;
  height: 168px;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mv-jar-svg { display: block; width: 100%; height: 100%; overflow: visible; }

html body .mv-root button.mv-jar {
  transform-origin: 50% 100%;
  transform: translateY(150%);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.2, 1.4, 0.4, 1), opacity 0.3s;
}
html body .mv-root.mv-shown button.mv-jar {
  transform: none;
  opacity: 1;
  /* a little wobble every few seconds, out of step with the arcade button's hop */
  animation: mv-wobble 7s ease-in-out 4s infinite;
}
html body .mv-root.mv-shown button.mv-jar:hover { transform: translateY(-4px) rotate(3deg); animation: none; }
html body .mv-root.mv-is-open button.mv-jar { animation: none; }
html body .mv-root button.mv-jar:focus-visible { outline: 3px solid #4DBEED; outline-offset: 4px; border-radius: 18px; }
html body .mv-root button.mv-jar.mv-hop { animation: mv-hop 0.6s ease; }
html body .mv-root button.mv-jar.mv-shake { animation: mv-shake 0.6s ease; }

.mv-lid { transform-box: fill-box; transform-origin: 50% 100%; }
.mv-pop .mv-lid { animation: mv-lid 0.7s ease; }

@keyframes mv-wobble {
  0%, 14%, 100% { rotate: 0deg; translate: 0 0; }
  3% { rotate: -6deg; translate: 0 -6px; }
  6% { rotate: 5deg; translate: 0 0; }
  9% { rotate: -3deg; }
  12% { rotate: 1deg; }
}
@keyframes mv-hop {
  0%, 100% { translate: 0 0; }
  35% { translate: 0 -16px; }
  65% { translate: 0 0; }
  80% { translate: 0 -5px; }
}
@keyframes mv-shake {
  0%, 100% { rotate: 0deg; translate: 0 0; }
  12% { rotate: calc(var(--amp, 8) * -1deg); translate: -3px 0; }
  26% { rotate: calc(var(--amp, 8) * 0.9deg); translate: 3px 0; }
  40% { rotate: calc(var(--amp, 8) * -0.7deg); translate: -2px 0; }
  54% { rotate: calc(var(--amp, 8) * 0.5deg); translate: 2px 0; }
  70% { rotate: calc(var(--amp, 8) * -0.3deg); translate: 0 0; }
}
@keyframes mv-lid {
  0%, 100% { transform: none; }
  30% { transform: translateY(-14px) rotate(-10deg); }
  60% { transform: translateY(-4px) rotate(4deg); }
}

/* ---------- Voting card ---------- */
.mv-root .mv-card {
  position: absolute;
  right: 0;
  bottom: 181px;
  width: 340px;
  padding: 20px 20px 18px;
  background: #fff;
  border: 3px solid #000;
  border-radius: 22px;
  box-shadow: 8px 8px 0 #000;
  transform-origin: 85% 100%;
  transform: translateY(12px) scale(0.92);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.2, 1.3, 0.4, 1), opacity 0.2s;
}
.mv-root .mv-card[hidden] { display: none !important; }
.mv-root .mv-card.mv-in { transform: none; opacity: 1; }
/* the card's tail points down at the jar */
.mv-root .mv-card::after {
  content: '';
  position: absolute;
  right: 68px;
  bottom: -12px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-right: 3px solid #000;
  border-bottom: 3px solid #000;
  transform: rotate(45deg);
}

html body .mv-root .mv-card button.mv-x,
html body .mv-root .mv-card button.mv-x:hover,
html body .mv-root .mv-card button.mv-x:focus {
  position: static;
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0 0 2px;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  border-radius: 50%;
  box-shadow: 2px 2px 0 #000;
  font: 700 20px/1 'DM Sans', Arial, sans-serif;
  cursor: pointer;
}
html body .mv-root .mv-card button.mv-x:focus-visible { outline: 3px solid #4DBEED; outline-offset: 2px; }

.mv-root .mv-stack { display: flex; flex-direction: column; gap: 6px; }
.mv-root .mv-line {
  margin: 0;
  padding: 0;
  font-family: fatfrank, 'Fat Frank', 'MV Fat Frank', 'Arial Black', sans-serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.02;
  color: #000;
  letter-spacing: 0;
  text-transform: none;
  transform-origin: 0 100%;
}
.mv-root .mv-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 12px; }
.mv-root .mv-sub { margin: 0; padding: 0; font-size: 13px; font-weight: 700; color: #555; letter-spacing: 0.02em; }
.mv-root .mv-pop-text { animation: mv-pop-text 0.35s cubic-bezier(0.2, 1.6, 0.4, 1); }
.mv-root .mv-hurt-text { animation: mv-hurt-text 0.45s ease; }
@keyframes mv-pop-text { 0% { transform: scale(0.85); } 60% { transform: scale(1.06); } 100% { transform: none; } }
@keyframes mv-hurt-text { 0%, 100% { transform: none; } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.mv-root .mv-card { transition: transform 0.3s cubic-bezier(0.2, 1.3, 0.4, 1), opacity 0.2s, background-color 0.25s; }

.mv-root .mv-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
html body .mv-root button.mv-choice,
html body .mv-root button.mv-choice:hover,
html body .mv-root button.mv-choice:focus {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 96px;
  margin: 0;
  padding: 12px 8px;
  border: 3px solid #000;
  border-radius: 16px;
  box-shadow: 5px 5px 0 #000;
  font: 700 15px/1.15 'DM Sans', Arial, sans-serif;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}
html body .mv-root button.mv-choice-love,
html body .mv-root button.mv-choice-love:hover,
html body .mv-root button.mv-choice-love:focus { background: #F4B0D7; color: #000; }
html body .mv-root button.mv-choice-hate,
html body .mv-root button.mv-choice-hate:hover,
html body .mv-root button.mv-choice-hate:focus { background: #3B2314; color: #fff; }
html body .mv-root button.mv-choice:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 #000; }
html body .mv-root button.mv-choice:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 #000; }
html body .mv-root button.mv-choice:focus-visible { outline: 3px solid #4DBEED; outline-offset: 3px; }
html body .mv-root button.mv-choice:disabled { opacity: 0.6; cursor: default; transform: none; }
.mv-root .mv-choice svg { width: 36px; height: 33px; }

.mv-root .mv-note,
.mv-root .mv-error { margin: 12px 0 0; font-size: 12px; color: #555; }
.mv-root .mv-error { color: #b3261e; font-weight: 700; }

/* results */
.mv-root .mv-results:not(:empty) { margin-top: 16px; padding-top: 12px; border-top: 2px dashed #ddd; }
.mv-root .mv-split {
  display: flex;
  gap: 2px;
  height: 22px;
  margin: 0 0 8px;
  background: #fff;
  border: 3px solid #000;
  border-radius: 12px;
  overflow: hidden;
}
.mv-root .mv-split span { display: block; height: 100%; }
.mv-root .mv-love { background: #F4B0D7; }
.mv-root .mv-hate { background: #3B2314; }
.mv-root .mv-key { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0; font-size: 13px; font-weight: 700; }
.mv-root .mv-dot { display: inline-block; width: 11px; height: 11px; margin-right: 6px; border: 2px solid #000; border-radius: 50%; vertical-align: -1px; }
.mv-root .mv-total { margin-left: auto; font-size: 12px; font-weight: 400; color: #555; }

/* the jar's label says what it's for */
.mv-root .mv-label-text {
  font-family: 'DM Sans', Arial, sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
  fill: #000;
}
/* the puddle spreads as the tears keep coming */
.mv-root .mv-puddle { transition: rx 0.4s ease, ry 0.4s ease; }
.mv-root .mv-tear { opacity: 0; transform-box: fill-box; transform-origin: 50% 0; }
.mv-root .mv-tear.mv-on { opacity: 1; animation: mv-drip 1.4s ease-in infinite; }
@keyframes mv-drip {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  20% { opacity: 1; transform: translateY(0) scale(1); }
  100% { transform: translateY(14px) scale(0.9); opacity: 0; }
}

/* hearts (love) and broken hearts (hate) float up out of the jar */
.mv-root .mv-fx { position: absolute; z-index: 1; left: 0; right: 0; bottom: 135px; height: 0; pointer-events: none; }
/* hearts rise behind the speech bubble, not over its buttons */
.mv-root .mv-card { z-index: 2; }
.mv-root .mv-heart {
  position: absolute;
  bottom: 0;
  width: 24px;
  height: 22px;
  opacity: 0;
  animation: mv-float 1.5s ease-out forwards;
}
.mv-root .mv-heart svg { display: block; width: 100%; height: 100%; }
@keyframes mv-float {
  0% { transform: translateY(0) scale(0.4); opacity: 0; }
  15% { transform: translateY(-12px) scale(1); opacity: 1; }
  100% { transform: translateY(-130px) scale(0.9) rotate(var(--r, 0deg)); opacity: 0; }
}

/* phones: a smaller jar, no bubble, and a card that fits the screen */
@media (max-width: 640px) {
  html body .mv-root { right: 12px; bottom: 18px; }
  html body .mv-root button.mv-jar,
  html body .mv-root button.mv-jar:hover,
  html body .mv-root button.mv-jar:focus { width: 112px; height: 122px; }
  .mv-root .mv-card { bottom: 135px; width: min(340px, calc(100vw - 24px)); }
  .mv-root .mv-card::after { right: 47px; }
  .mv-root .mv-fx { bottom: 97px; }
}

@media (prefers-reduced-motion: reduce) {
  html body .mv-root,
  html body .mv-root button.mv-jar,
  .mv-root .mv-card { transition: none; }
  .mv-root .mv-tear.mv-on,
  .mv-root .mv-pop-text,
  .mv-root .mv-hurt-text { animation: none; }
  html body .mv-root.mv-shown button.mv-jar { animation: none; }
}
