/**
 * Resources Page Styles
 * Audio player, upload dropzone, and related components
 */

/* Emoji Reactions */
.emoji-btn,
.reaction-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
  font-size: 1.25rem;
  line-height: 1;
}

.emoji-picker-dropdown {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
}

.emoji-picker-dropdown button {
  font-size: 1.25rem;
  padding: 0.25rem;
  transition: transform 0.1s ease;
}

.emoji-picker-dropdown button:hover {
  transform: scale(1.2);
}

.reaction-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.reaction-badge:hover {
  transform: scale(1.05);
}

.reaction-badge.active {
  background-color: #dbeafe;
  border: 1px solid #93c5fd;
}

/* Audio Player */
.audio-player {
  background: linear-gradient(135deg, #f5f3ff 0%, #faf5ff 100%);
  border: 1px solid #e9d5ff;
  border-radius: 0.75rem;
  padding: 1rem;
}

.audio-player-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.audio-play-btn {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #9333ea;
  color: white;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(147, 51, 234, 0.3);
}

.audio-play-btn:hover {
  background-color: #7c3aed;
  transform: scale(1.05);
}

.audio-play-btn.playing {
  background-color: #7c3aed;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 2px 4px rgba(147, 51, 234, 0.3);
  }
  50% {
    box-shadow: 0 2px 12px rgba(147, 51, 234, 0.5);
  }
}

.audio-progress-container {
  flex-grow: 1;
  cursor: pointer;
}

.audio-progress-bar {
  height: 0.5rem;
  background-color: #e9d5ff;
  border-radius: 0.25rem;
  overflow: hidden;
  position: relative;
}

.audio-progress {
  height: 100%;
  background: linear-gradient(90deg, #9333ea, #c084fc);
  border-radius: 0.25rem;
  transition: width 0.1s linear;
}

.audio-time {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #6b7280;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.audio-filename {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Music Notes Animation */
.music-notes {
  display: flex;
  gap: 0.25rem;
  font-size: 1.25rem;
  color: #9333ea;
  margin-left: 0.5rem;
}

.music-notes .note {
  animation: float 1.2s ease-in-out infinite;
  opacity: 0.7;
}

.music-notes .note-1 {
  animation-delay: 0s;
}

.music-notes .note-2 {
  animation-delay: 0.2s;
}

.music-notes .note-3 {
  animation-delay: 0.4s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

/* Upload Dropzone */
.upload-dropzone {
  border: 2px dashed #d1d5db;
  border-radius: 0.75rem;
  background-color: #f9fafb;
  transition: all 0.2s ease;
}

.upload-dropzone:hover {
  border-color: #9333ea;
  background-color: #faf5ff;
}

.upload-dropzone.has-file {
  border-color: #9333ea;
  border-style: solid;
  background-color: #faf5ff;
}

/* Upload Progress */
.upload-progress-container {
  margin-top: 1rem;
}

.upload-progress-bar {
  height: 0.5rem;
  background-color: #e5e7eb;
  border-radius: 0.25rem;
  overflow: hidden;
}

.upload-progress {
  height: 100%;
  background: linear-gradient(90deg, #9333ea, #c084fc);
  border-radius: 0.25rem;
  transition: width 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .audio-player-controls {
    flex-wrap: wrap;
  }

  .audio-play-btn {
    width: 2.5rem;
    height: 2.5rem;
  }

  .audio-progress-container {
    width: 100%;
    order: 2;
    margin-top: 0.5rem;
  }

  .music-notes {
    order: 1;
  }
}
