File size: 2,445 Bytes
f1a0148
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/* WavePlayer Component Styles */
.waveplayer {
  position: relative;
  width: 100%;
  background-color: var(--light-gray, #f5f5f5);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

/* Hide native audio elements */
.waveplayer audio {
  display: none !important;
}

.waveplayer-controls {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}

.waveplayer-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color, #5046e5);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  flex-shrink: 0;
}

.waveplayer-play-btn:hover {
  background-color: var(--primary-hover, #4038c7);
}

.waveplayer-play-btn:active {
  transform: scale(0.95);
}

.waveplayer-play-btn svg {
  width: 20px;
  height: 20px;
}

.waveplayer-time {
  font-size: 14px;
  color: var(--text-color, #333);
  font-weight: 500;
  flex-shrink: 0;
}

.waveplayer-waveform {
  position: relative;
  width: 100%;
  height: 80px;
  cursor: pointer;
}

.waveplayer-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  z-index: 10;
}

.waveplayer-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(80, 70, 229, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color, #5046e5);
  animation: spin 1s linear infinite;
  margin-bottom: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Dark mode styles */
@media (prefers-color-scheme: dark) {
  .waveplayer {
    background-color: var(--light-gray, #1e1e24);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
  
  .waveplayer-time {
    color: var(--text-color, #e0e0e0);
  }
  
  .waveplayer-loading {
    background-color: rgba(30, 30, 36, 0.7);
  }
} 

/* Mobile optimizations */
@media (max-width: 768px) {
  .waveplayer {
    padding: 12px;
  }
  
  .waveplayer-play-btn {
    width: 44px;
    height: 44px;
  }
  
  .waveplayer-waveform {
    height: 70px;
    touch-action: none; /* Prevents scroll/zoom on touch */
  }
  
  .waveplayer-time {
    font-size: 12px;
  }
}