/* Sonic_Gio: shared components. Phase 1. */

/* Primary button: an orange pill */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: #12100E;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--t-fast) ease,
    box-shadow var(--t-fast) ease,
    transform var(--t-fast) ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--orange-hover);
  color: #12100E;
  box-shadow: 0 10px 28px -6px rgba(232, 96, 28, .75);
}

.btn:active {
  transform: translateY(1px) scale(.98);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: default;
  opacity: .7;
  transform: none;
  box-shadow: none;
}

.btn__arrow {
  width: 18px;
  height: 18px;
  flex: none;
  transition: transform var(--t-fast) ease;
}

.btn:hover .btn__arrow,
.btn:focus-visible .btn__arrow {
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn__arrow {
    transition: none;
  }
}

/* ------------------------------------------------------------------ */
/* Waveform slider (Phase 5)                                           */
/* ------------------------------------------------------------------ */

.wave {
  position: relative;
  width: 100%;
  cursor: pointer;
  outline-offset: 4px;
  border-radius: 4px;
}

.wave__layer {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  height: 100%;
}

.wave__layer--rest {
  position: relative; /* paints above the glow */
}

.wave__layer--played {
  position: absolute;
  inset: 0;
  clip-path: inset(0 100% 0 0);
}

/* Live extras on the big wave: a soft glow behind the playhead, a few rising sparks.
   Both are driven inline by js/player.js while a set plays; at rest they are invisible. */
.wave__glow {
  position: absolute;
  top: -45%;
  left: 0;
  width: 160px;
  height: 190%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 166, 90, .42), rgba(232, 96, 28, .2) 55%, transparent);
  opacity: 0;
  pointer-events: none;
}

.wave__spark {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--orange-hover);
  box-shadow: 0 0 6px 1px rgba(242, 166, 90, .55);
  opacity: 0;
  pointer-events: none;
}

.wave__layer i {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  border-radius: 1.5px;
  background: rgba(244, 234, 220, .5);
}

.wave__layer--played i {
  background: var(--orange);
}

.wave--mini {
  height: 34px;
  min-width: 120px;
}

.wave--big {
  height: 56px;
}

.wave--big .wave__layer--rest i {
  background: var(--cream);
}

/* ------------------------------------------------------------------ */
/* Mini player (Phase 5)                                               */
/* ------------------------------------------------------------------ */

.mini {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  min-width: 0;
}

.mini__toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--orange);
  color: #12100E;
  transition: background-color var(--t-fast) ease, transform var(--t-fast) ease;
}

.mini__toggle:hover,
.mini__toggle:focus-visible {
  background: var(--orange-hover);
}

.mini__toggle:active {
  transform: scale(.96);
}

.mini__toggle svg {
  width: 18px;
  height: 18px;
}

.mini:not(.is-playing) .mini__toggle svg {
  transform: translateX(2px);
}

/* A play request waiting for SoundCloud: the control breathes (1 Hz) until PLAY arrives.
   Under reduced motion the global rule stops the animation; the control simply stays. */
@keyframes busy {
  50% { opacity: .45; }
}

.mini__toggle[aria-busy="true"],
.play__toggle[aria-busy="true"] {
  animation: busy 1s ease-in-out infinite;
}

.mini__meta {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  max-width: 220px;
  min-height: 44px;
  color: var(--cream);
  text-decoration: none;
}

.mini__meta:hover .mini__title {
  color: var(--orange-hover);
}

.mini__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--t-fast) ease;
}

.mini__sub {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--sand);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini .wave--mini {
  flex: 1 1 160px;
}

.mini__minutes {
  flex: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.placeholder-note {
  color: var(--sand);
}

@media (max-width: 760px) {
  .mini__minutes {
    display: none;
  }

  .mini__meta {
    max-width: 40%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mini__toggle,
  .mini__title {
    transition: none;
  }
}
