/*
 * 只保留 APlayer 自带的固定控件。
 * 桌面端将播放器收进左侧，仅露出右侧 18px 的原生开关；悬浮或键盘
 * 聚焦时展开。触屏设备没有 hover，继续使用 APlayer 原生迷你模式。
 */
.aplayer.aplayer-fixed {
  z-index: 9998;
}

.aplayer.aplayer-fixed .aplayer-body,
.aplayer.aplayer-fixed .aplayer-list {
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 8px 28px rgba(24, 61, 110, 0.2);
}

.aplayer.aplayer-fixed .aplayer-info {
  border-top-color: rgba(59, 130, 246, 0.16);
}

.aplayer.aplayer-fixed .aplayer-miniswitcher {
  background: #3b82f6;
}

.aplayer.aplayer-fixed .aplayer-miniswitcher .aplayer-icon path {
  fill: #fff;
}

.aplayer.aplayer-fixed .aplayer-list ol li.aplayer-list-light {
  background: rgba(59, 130, 246, 0.1);
}

[data-theme='dark'] .aplayer.aplayer-fixed .aplayer-body,
[data-theme='dark'] .aplayer.aplayer-fixed .aplayer-list {
  background: rgba(29, 39, 54, 0.97);
  color: rgba(255, 255, 255, 0.84);
}

[data-theme='dark'] .aplayer.aplayer-fixed .aplayer-info,
[data-theme='dark'] .aplayer.aplayer-fixed .aplayer-title,
[data-theme='dark'] .aplayer.aplayer-fixed .aplayer-author,
[data-theme='dark'] .aplayer.aplayer-fixed .aplayer-list-title,
[data-theme='dark'] .aplayer.aplayer-fixed .aplayer-list-author {
  color: rgba(255, 255, 255, 0.84);
}

[data-theme='dark'] .aplayer.aplayer-fixed .aplayer-list ol li {
  border-top-color: rgba(255, 255, 255, 0.08);
}

@media (hover: hover) and (pointer: fine) {
  .aplayer.aplayer-fixed .aplayer-info {
    display: block !important;
    transform: scaleX(1) !important;
  }

  .aplayer.aplayer-fixed .aplayer-body,
  .aplayer.aplayer-fixed .aplayer-list {
    transform: translateX(calc(-100% + 20px));
    transition: transform 0.28s ease;
  }

  .aplayer.aplayer-fixed:hover .aplayer-body,
  .aplayer.aplayer-fixed:hover .aplayer-list,
  .aplayer.aplayer-fixed:focus-within .aplayer-body,
  .aplayer.aplayer-fixed:focus-within .aplayer-list {
    transform: translateX(0);
  }

  .aplayer.aplayer-fixed .aplayer-miniswitcher {
    cursor: e-resize;
  }

  .aplayer.aplayer-fixed:hover .aplayer-miniswitcher {
    cursor: w-resize;
  }
}

@media (max-width: 600px) {
  .aplayer.aplayer-fixed .aplayer-list {
    width: min(100vw, 340px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aplayer.aplayer-fixed .aplayer-body,
  .aplayer.aplayer-fixed .aplayer-list {
    transition: none !important;
  }
}
