/* ============================================
   Info — просмотрщики, контекстные меню
   ============================================ */

/* Контекстное меню */
.ctx-menu {
  position: fixed;
  background: var(--bg-panel);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 6px;
  min-width: 220px;
  z-index: 200;
  box-shadow: var(--shadow-lg);
  animation: ctxIn 0.15s ease;
}
@keyframes ctxIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ctx-reactions {
  display: flex;
  gap: 4px;
  padding: 4px 4px 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-line);
}

.ctx-react {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.ctx-react:hover {
  background: var(--bg-hover);
  transform: scale(1.15);
}

.context-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s;
}
.context-item:hover {
  background: var(--bg-hover);
}
.context-danger {
  color: var(--status-error);
}
.context-danger:hover {
  background: rgba(248, 113, 113, 0.1);
}
.context-divider {
  height: 1px;
  background: var(--border-line);
  margin: 4px 0;
}

/* Просмотр изображений */
.image-viewer {
  position: fixed;
  inset: 0;
  background: rgba(4, 21, 37, 0.96);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  cursor: zoom-out;
}
.image-viewer img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

/* Видео-плеер */
.video-player {
  position: fixed;
  inset: 0;
  background: rgba(4, 21, 37, 0.96);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
.video-player video {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-md);
}

/* Аудио-плеер */
.audio-player-popup {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  max-width: calc(100vw - 32px);
  background: var(--bg-panel);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 16px 20px;
  z-index: 250;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.audio-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.audio-popup-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-waveform {
  height: 40px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
}
.audio-waveform bar {
  flex: 1;
  background: var(--aion-gradient);
  border-radius: 2px;
  height: 40%;
}
.audio-waveform bar:nth-child(2n) { height: 70%; }
.audio-waveform bar:nth-child(3n) { height: 90%; }

.audio-popup-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.audio-popup-controls input[type="range"] {
  flex: 1;
  accent-color: var(--accent-solid);
  height: 4px;
}

/* Скрыть стандартные стили для ползунков */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--aion-gradient);
  box-shadow: var(--shadow-glow-strong);
  border: none;
}