/* @voltilt/coverflow — self-contained styles (CSS variables for theming) */

.vt-coverflow {
  --vt-bg: #0b0f1a;
  --vt-surface: #151b2c;
  --vt-surface-2: #1a2136;
  --vt-text: #e8ecf8;
  --vt-muted: #8b95b0;
  --vt-accent: #6d8dff;
  --vt-accent-soft: rgba(109, 141, 255, 0.18);
  --vt-border: rgba(255, 255, 255, 0.12);
  --vt-radius: 16px;
  --vt-perspective: 1400px;

  position: relative;
  width: 100%;
  height: 100%;
  min-height: 360px;
  color: var(--vt-text);
  background: var(--vt-bg);
  overflow: hidden;
  perspective: var(--vt-perspective);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.vt-coverflow.is-dragging {
  cursor: grabbing;
}

.vt-coverflow.is-dragging .vt-card {
  transition: none !important;
}

.vt-coverflow-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 42% at 50% 48%, var(--vt-accent-soft), transparent 70%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(0, 0, 0, 0.45), transparent 55%);
  z-index: 0;
}

.vt-coverflow-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  touch-action: none;
  transform-style: preserve-3d;
}

.vt-coverflow-scene {
  position: absolute;
  inset: 0;
  transform: translateY(-28px);
  transform-style: preserve-3d;
}

.vt-coverflow-chrome {
  position: absolute;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom, 0px) + 18px);
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(12, 16, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.vt-coverflow-status {
  min-width: min(220px, 42vw);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vt-coverflow-label {
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(240px, 44vw);
}

.vt-coverflow-meta {
  font-size: 0.75rem;
  color: var(--vt-muted);
  letter-spacing: 0.04em;
}

.vt-nav {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(109, 141, 255, 0.16);
  color: var(--vt-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.vt-nav:hover {
  background: rgba(109, 141, 255, 0.32);
}

.vt-nav:active {
  transform: scale(0.94);
}

.vt-nav:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

.vt-coverflow-hint {
  position: absolute;
  left: 50%;
  bottom: max(88px, env(safe-area-inset-bottom, 0px) + 72px);
  transform: translateX(-50%);
  z-index: 15;
  margin: 0;
  pointer-events: none;
  opacity: 0.7;
  white-space: nowrap;
  font-size: 0.8rem;
  color: var(--vt-muted);
}

.vt-coverflow.is-empty .vt-coverflow-chrome,
.vt-coverflow.is-empty .vt-coverflow-hint,
.vt-coverflow.is-empty .vt-coverflow-ambient {
  display: none;
}

.vt-hidden {
  display: none !important;
}

.vt-empty {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vt-muted);
  pointer-events: none;
}

.vt-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(200px, 42vw);
  min-height: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: var(--vt-radius);
  border: 1px solid var(--vt-border);
  background: linear-gradient(165deg, var(--vt-surface-2) 0%, #12182a 100%);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--vt-text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.4s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    filter 0.35s ease;
}

.vt-card.is-focus {
  width: min(268px, 58vw);
  border-color: rgba(109, 141, 255, 0.55);
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(109, 141, 255, 0.25),
    0 0 48px rgba(109, 141, 255, 0.18);
  filter: none;
}

.vt-card:not(.is-focus) {
  filter: saturate(0.82) brightness(0.88);
}

.vt-card.is-far {
  pointer-events: none;
}

.vt-card-face {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: rgba(109, 141, 255, 0.1);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 35% 30%, rgba(109, 141, 255, 0.28), transparent 55%),
    linear-gradient(160deg, #1e2740, #12182a);
}

.vt-card-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vt-card-initials {
  font-size: 2.4rem;
  font-weight: 600;
  color: #c5d0ff;
}

.vt-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.vt-card-body h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
}

.vt-card.is-focus .vt-card-body h3 {
  font-size: 1.12rem;
}

.vt-card-kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vt-muted);
}

.vt-card-open-hint {
  display: none;
  margin-top: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(185, 200, 255, 0.75);
}

.vt-card.is-focus .vt-card-open-hint {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .vt-card {
    transition: none;
  }
}

@media (max-width: 560px) {
  .vt-card {
    width: min(168px, 48vw);
  }
  .vt-card.is-focus {
    width: min(220px, 68vw);
  }
  .vt-coverflow-hint {
    display: none;
  }
  .vt-nav {
    width: 36px;
    height: 36px;
  }
}
