/* Potatify Mini Player: the old Potato Radio evolved into the site-wide player */
@import url("https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700;800&display=swap");

:root {
  --potato-radio-bottom-offset: 0px;
}

.potato-radio,
.potato-radio * {
  box-sizing: border-box;
}

body.has-potatify-mini {
  padding-bottom: 7rem;
}

body.has-potatify-mini .site-footer {
  margin-bottom: 2rem;
}

.potato-radio {
  position: fixed;
  left: 50%;
  bottom: calc(var(--potato-radio-bottom-offset) + 1rem);
  z-index: 9998;
  width: min(920px, calc(100% - 2rem));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.62rem 0.72rem;
  color: var(--ink, #25162f);
  background:
    linear-gradient(135deg, rgba(255, 248, 214, 0.96), rgba(255, 79, 216, 0.26)),
    url("assets/buttonbackground.gif");
  background-size: cover;
  border: 3px solid var(--ink, #25162f);
  border-radius: 999px;
  box-shadow:
    0 16px 38px rgba(37, 22, 47, 0.25),
    6px 6px 0 rgba(37, 22, 47, 0.28);
  font-family: "Comic Sans MS", "Comic Sans", "Comic Neue", system-ui, sans-serif;
}

.potato-radio.is-playing {
  animation: potato-radio-bob 2.4s ease-in-out infinite alternate;
}

.potato-radio-toggle,
.potato-radio-controls button,
.potato-radio-hide {
  display: inline-grid;
  place-items: center;
  min-height: 2.35rem;
  border: 2px solid var(--ink, #25162f);
  border-radius: 999px;
  color: var(--ink, #25162f);
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(37, 22, 47, 0.22);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.potato-radio-toggle {
  min-width: 7.1rem;
  padding: 0.42rem 0.78rem;
  background: var(--acid, #9cff3b);
}

.potato-radio-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.potato-radio-controls button {
  min-width: 2.35rem;
  padding: 0.38rem 0.58rem;
  background: rgba(255, 255, 255, 0.82);
}

.potato-radio-hide {
  min-width: 2.35rem;
  padding: 0.38rem 0.58rem;
  background: var(--danger, #ff5a5f);
  color: #fff;
}

.potato-radio-toggle:hover,
.potato-radio-toggle:focus-visible,
.potato-radio-controls button:hover,
.potato-radio-controls button:focus-visible,
.potato-radio-hide:hover,
.potato-radio-hide:focus-visible {
  transform: translate(-1px, -1px) rotate(-1deg);
  box-shadow: 5px 5px 0 rgba(37, 22, 47, 0.23);
  outline: none;
}

.potato-radio-display {
  min-width: 0;
  overflow: hidden;
  display: grid;
  gap: 0.1rem;
  padding: 0.28rem 0.68rem;
  border: 2px solid var(--ink, #25162f);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
}

.potato-radio-display strong,
.potato-radio-display span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.potato-radio-display strong {
  font-size: 0.9rem;
  line-height: 1.05;
}

.potato-radio-display span {
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0.82;
}

.potato-radio-volume {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 145px;
  padding: 0.32rem 0.52rem;
  border: 2px solid var(--ink, #25162f);
  border-radius: 999px;
  background: rgba(255, 248, 214, 0.92);
  font-size: 0.82rem;
  font-weight: 900;
}

.potato-radio-volume input {
  width: 82px;
  accent-color: var(--hot-pink, #ff4fd8);
  cursor: pointer;
}

.potato-radio-status {
  position: absolute;
  left: 1.1rem;
  top: -0.85rem;
  padding: 0.18rem 0.45rem;
  border: 2px solid var(--ink, #25162f);
  border-radius: 999px;
  background: var(--danger, #ff5a5f);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  transform: rotate(-3deg);
}

.potato-radio:not(.is-playing) .potato-radio-status {
  background: var(--banana, #ffe45c);
  color: var(--ink, #25162f);
}

@keyframes potato-radio-bob {
  from { transform: translateX(-50%) translateY(0); }
  to { transform: translateX(-50%) translateY(-3px); }
}

@media (max-width: 780px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body.has-potatify-mini {
    padding-bottom: 9.5rem;
  }

  body.has-potatify-mini .site-footer {
    margin-bottom: 2rem;
  }

  .potato-radio {
    width: min(calc(100vw - 1.5rem), 30rem);
    max-width: calc(100vw - 1.5rem);
    bottom: calc(var(--potato-radio-bottom-offset) + 0.65rem);
    transform: translate3d(-50%, 0, 0);
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "display display"
      "toggle controls"
      "volume hide";
    gap: 0.42rem;
    padding: 0.48rem;
    border-radius: 22px;
  }

  .potato-radio-toggle {
    grid-area: toggle;
    width: 100%;
    min-width: 0;
    min-height: 2.08rem;
    padding: 0.28rem 0.42rem;
    font-size: 0.78rem;
  }

  .potato-radio-display {
    grid-area: display;
    border-radius: 17px;
    padding: 0.35rem 0.55rem;
  }

  .potato-radio-display strong {
    font-size: 0.82rem;
  }

  .potato-radio-display span {
    font-size: 0.68rem;
  }

  .potato-radio-controls {
    grid-area: controls;
    justify-self: end;
  }

  .potato-radio-controls button,
  .potato-radio-hide {
    min-width: 2.05rem;
    min-height: 2.05rem;
    padding: 0.25rem 0.42rem;
    font-size: 0.78rem;
  }

  .potato-radio-hide {
    grid-area: hide;
    justify-self: end;
    align-self: center;
  }

  .potato-radio-volume {
    grid-area: volume;
    width: min(100%, 18rem);
    min-width: 0;
    justify-self: center;
    justify-content: center;
    padding: 0.24rem 0.42rem;
    font-size: 0.74rem;
  }

  .potato-radio-volume input {
    width: min(145px, 42vw);
  }

  .potato-radio-status {
    left: 0.65rem;
    top: -0.7rem;
    font-size: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .potato-radio {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
