/* Copyright (c) 2026 Daniel Hunter Drury. All rights reserved. GoDNA License Agreement (LICENSE.md). */
/* Drag-to-turn character viewers (javascripts/turntable.js), in a row. Frames are 2:3 portraits. */
.godna-turntables {
  display: flex;
  gap: 0.8rem;
  margin: 1.5em 0;
}
.md-typeset .godna-turntables figure {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  margin: 0;
}
.md-typeset .godna-turntables figcaption {
  max-width: none;
  margin: 0;
  font-size: 0.7rem;
  text-align: center;
}

.godna-turntable {
  position: relative;
  margin: 0 0 0.4rem;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  background: #9c9c9c;
  cursor: grab;
  touch-action: pan-y; /* vertical swipes still scroll the page */
  user-select: none;
}
.godna-turntable.is-dragging { cursor: grabbing; }
.godna-turntable:focus-visible { outline: 0.15rem solid var(--md-accent-fg-color); outline-offset: 0.15rem; }
.godna-turntable img { display: block; width: 100%; } /* the still, shown without JavaScript */
.md-typeset .godna-turntable__view {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 0;
  background: none;
  pointer-events: none;
}
.godna-turntable__hint {
  position: absolute;
  bottom: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.15rem 0.6rem;
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.65rem;
  white-space: nowrap;
  pointer-events: none;
}

/* Two by two on a phone. */
@media screen and (max-width: 44.9375em) {
  .godna-turntables { flex-wrap: wrap; }
  .md-typeset .godna-turntables figure { flex-basis: 40%; }
}
