/* Checkmark Audio — floating "Sound demo" mini player.
   Docks bottom-left once the visitor has started the homepage sound demo and
   scrolls the console out of view. Markup and behaviour: checkmark-reel-dock.js. */

.reel-dock {
  --dock-gold: #e6cba1;
  --dock-gold-deep: #c8954e;
  --dock-line: rgba(200, 149, 78, .55);
  position: fixed;
  z-index: 95;
  left: max(16px, env(safe-area-inset-left));
  bottom: calc(var(--reel-dock-bottom, 16px) + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(432px, calc(100vw - 32px));
  min-height: 68px;
  padding: 10px 10px 13px 10px;
  border: 1px solid #594629;
  border-radius: 16px;
  background: linear-gradient(145deg, #2a2926 0%, #11110f 38%, #080807 100%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5), inset 0 0 0 1px #0b0a09, inset 0 0 0 2px rgba(200, 149, 78, .4), inset 0 1px 0 rgba(255, 230, 184, .16);
  color: var(--dock-gold);
  font-family: "DM Sans", system-ui, sans-serif;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity .28s ease, transform .28s ease, visibility 0s linear .28s;
}

.reel-dock.is-raised {
  bottom: var(--reel-dock-bottom);
}

.reel-dock.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .28s ease, transform .28s ease, visibility 0s;
}

.reel-dock button {
  display: inline-grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.reel-dock button:focus-visible {
  outline: 2px solid var(--dock-gold);
  outline-offset: 2px;
}

.reel-dock svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Logo disc doubles as the play/pause button, like the console's logo. */
.reel-dock__play {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50% !important;
  background: radial-gradient(circle at 50% 40%, #1d1a15 0%, #090908 70%) !important;
  box-shadow: inset 0 0 0 1px var(--dock-line), 0 0 0 0 rgba(229, 189, 109, 0);
}

.reel-dock__play img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  opacity: .5;
  transition: opacity .2s ease;
}

.reel-dock__play .reel-dock__glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff6e6;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .9));
}

.reel-dock__play .reel-dock__glyph svg {
  width: 22px;
  height: 22px;
}

.reel-dock .icon-pause,
.reel-dock.is-playing .icon-play { display: none; }
.reel-dock.is-playing .icon-pause { display: block; }

.reel-dock.is-playing .reel-dock__play {
  animation: reel-dock-pulse 1.8s ease-in-out infinite;
}

.reel-dock.is-playing .reel-dock__play img { opacity: .78; }

@keyframes reel-dock-pulse {
  0%, 100% { box-shadow: inset 0 0 0 1px var(--dock-line), 0 0 0 0 rgba(229, 189, 109, 0); }
  50% { box-shadow: inset 0 0 0 1px rgba(230, 203, 161, .9), 0 0 18px 2px rgba(229, 189, 109, .28); }
}

.reel-dock__meta {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 0;
  text-align: left;
  border-radius: 6px;
}

.reel-dock__kicker {
  color: #cbab7d;
  font: 700 .68rem/1 "Barlow Condensed", sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.reel-dock__title {
  overflow: hidden;
  color: var(--dock-gold);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.reel-dock__hint {
  color: #9c8f7c;
  font-size: .72rem;
  line-height: 1.2;
}

.reel-dock__hint:empty { display: none; }

.reel-dock__controls {
  display: flex;
  align-items: center;
  gap: 2px;
}

.reel-dock__controls button {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: #e6cba1;
  transition: background-color .15s ease, color .15s ease;
}

.reel-dock__controls button:hover {
  background: rgba(200, 149, 78, .16);
  color: #fff3dd;
}

.reel-dock__close {
  margin-left: 4px !important;
  border-left: 1px solid rgba(200, 149, 78, .28) !important;
  border-radius: 0 9px 9px 0 !important;
}

.reel-dock__progress {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(200, 149, 78, .22);
}

.reel-dock__progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #c8954e, #f1dab8);
  transform: scaleX(var(--reel-progress, 0));
  transform-origin: left center;
}

/* Phones: smaller, still bottom-left; previous-track is dropped to save room. */
@media (max-width: 560px) {
  .reel-dock {
    left: max(12px, env(safe-area-inset-left));
    bottom: calc(var(--reel-dock-bottom, 12px) + env(safe-area-inset-bottom));
    gap: 9px;
    width: min(340px, calc(100vw - 24px));
    min-height: 58px;
    padding: 7px 6px 10px 7px;
    border-radius: 14px;
  }

  .reel-dock__play { width: 42px; height: 42px; }
  .reel-dock__play img { width: 28px; height: 28px; }
  .reel-dock__play .reel-dock__glyph svg { width: 19px; height: 19px; }
  .reel-dock__title { font-size: .82rem; }
  .reel-dock__kicker { font-size: .62rem; }
  .reel-dock [data-reel-dock="prev"] { display: none; }
  .reel-dock__controls button { width: 34px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .reel-dock,
  .reel-dock.is-visible {
    transform: none;
    transition: none;
  }

  .reel-dock.is-playing .reel-dock__play { animation: none; }
}

/* Room under the footer so its last lines can scroll clear of the dock. */
.has-reel-dock .footer::after {
  content: "";
  display: block;
  height: var(--reel-dock-clearance, 0px);
}

@media print {
  .reel-dock { display: none !important; }
}
