Ezmary commited on
Commit
26b53fd
·
verified ·
1 Parent(s): 3d15a54

Update src/App.scss

Browse files
Files changed (1) hide show
  1. src/App.scss +56 -42
src/App.scss CHANGED
@@ -26,14 +26,22 @@
26
  @layer base {
27
  * {
28
  border-color: var(--border);
29
- outline-color: var(--foreground);
 
30
  }
31
  body {
32
  @apply bg-background text-foreground;
33
- overflow-x: hidden; // Ensures no horizontal scroll on body
34
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
35
  -webkit-font-smoothing: antialiased;
36
  -moz-osx-font-smoothing: grayscale;
 
 
 
 
 
 
 
37
  }
38
  }
39
 
@@ -46,8 +54,8 @@
46
  left: 50%;
47
  transform: translateX(-50%);
48
  z-index: 100;
49
- width: calc(100% - 2rem); // Takes full width minus some margin
50
- max-width: 28rem; // Max width for larger screens
51
  display: flex;
52
  justify-content: center;
53
  pointer-events: none;
@@ -63,12 +71,12 @@
63
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
64
  outline: none;
65
  transition: opacity 0.3s ease-out, transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
66
- opacity: 0;
67
  transform: translateY(-100%) scale(0.9);
68
  pointer-events: none;
69
 
70
  &.open {
71
- opacity: 1;
72
  transform: translateY(0) scale(1);
73
  pointer-events: auto;
74
  }
@@ -91,33 +99,35 @@
91
  /* Header controls */
92
  .header-controls {
93
  display: flex;
94
- padding: 1rem; // Sufficient padding for touch targets
 
95
  justify-content: space-between;
96
  align-items: center;
97
  width: 100%;
98
  position: absolute;
99
  top: 0;
100
  left: 0;
101
- z-index: 10; // Above media content
 
102
  }
103
 
104
  .header-button {
105
  display: flex;
106
  align-items: center;
107
  justify-content: center;
108
- padding: 0.5rem;
109
- border-radius: var(--radius-lg, 0.625rem); // Corrected from var(--radius-lg, 0.625rem)
110
- background-color: #e5e7eb; // Tailwind gray-200
111
  cursor: pointer;
112
  transition: background-color 0.2s;
113
 
114
  &:hover {
115
- background-color: #d1d5db; // Tailwind gray-300
116
  }
117
 
118
  svg {
119
- opacity: 0.7;
120
- stroke: #374151; // Tailwind gray-700
121
  }
122
  }
123
 
@@ -127,7 +137,7 @@
127
  background-color: oklch(0.35 0 0);
128
  }
129
  svg {
130
- opacity: 0.8;
131
  stroke: oklch(0.85 0 0);
132
  }
133
  }
@@ -136,25 +146,27 @@
136
  .footer-controls {
137
  width: 100%;
138
  display: flex;
139
- gap: 1rem; // Space between control items
 
140
  position: absolute;
141
  bottom: 0;
142
- // *** MODIFIED: Reduced padding for better mobile fit ***
143
- padding: 1.5rem 1rem; // 24px top/bottom, 16px left/right
144
  align-items: center;
 
145
 
146
  &.layout-default {
147
- justify-content: space-between; // For mic and cam buttons
148
  }
149
  &.layout-with-small-logo {
150
- justify-content: space-around; // For mic, logo, and cam buttons
151
  }
152
  }
153
 
154
  .control-button {
155
- height: 80px; // Keeping original size, should fit with new padding
156
- width: 80px;
157
- border-radius: 9999px; // Circular
158
  padding: 0;
159
  display: flex;
160
  align-items: center;
@@ -164,6 +176,8 @@
164
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
165
  cursor: pointer;
166
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
 
 
167
 
168
  &:hover {
169
  transform: scale(1.05);
@@ -171,37 +185,37 @@
171
  }
172
  }
173
 
174
- .cam-button-color { background-color: #E0ECFF; } // Light blueish
175
- .mic-button-color { background-color: #fecdd3; } // Light redish
176
 
177
- .dark .cam-button-color { background-color: #223355; } // Dark blueish
178
- .dark .mic-button-color { background-color: #5C2129; } // Dark redish
179
 
180
  /* Switch Camera Button */
181
  .switch-camera-button-container {
182
  position: absolute;
183
- bottom: calc(100% + 0.65rem); // Positioned above the camera button
184
  left: 50%;
185
- z-index: 5; // Below header controls but above other footer elements if overlap
186
- opacity: 0;
187
  transform: translateY(15px) scale(0.7) translateX(-50%);
188
  pointer-events: none;
189
  transition: opacity 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55), transform 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
190
  transform-origin: center bottom;
191
 
192
  &.visible {
193
- opacity: 1;
194
  transform: translateY(0) scale(1) translateX(-50%);
195
  pointer-events: auto;
196
  }
197
  }
198
 
199
  .switch-camera-button-content {
200
- width: 48px;
201
- height: 48px;
202
  background-color: var(--background);
203
  border: 1px solid var(--border);
204
- border-radius: 9999px; // Circular
205
  display: flex;
206
  align-items: center;
207
  justify-content: center;
@@ -219,8 +233,8 @@
219
  }
220
 
221
  svg {
222
- width: 22px; // SVG size is fixed here
223
- height: 22px;
224
  stroke: var(--foreground);
225
  transition: transform 0.3s ease-in-out;
226
  }
@@ -231,26 +245,26 @@
231
 
232
  /* Keyframes for popover */
233
  @keyframes popover-drop-in {
234
- 0% {
235
  opacity: 0;
236
  transform: translateY(-100%) scale(0.9);
237
  }
238
- 70% {
239
  opacity: 1;
240
- transform: translateY(5px) scale(1.02); /* Slight overshoot */
241
  }
242
- 100% {
243
  opacity: 1;
244
  transform: translateY(0) scale(1);
245
  }
246
  }
247
 
248
  @keyframes popover-lift-out {
249
- 0% {
250
  opacity: 1;
251
  transform: translateY(0) scale(1);
252
  }
253
- 100% {
254
  opacity: 0;
255
  transform: translateY(-100%) scale(0.9);
256
  }
 
26
  @layer base {
27
  * {
28
  border-color: var(--border);
29
+ outline-color: var(--foreground);
30
+ box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
31
  }
32
  body {
33
  @apply bg-background text-foreground;
34
+ overflow-x: hidden; // Prevents horizontal scroll on the body itself
35
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
36
  -webkit-font-smoothing: antialiased;
37
  -moz-osx-font-smoothing: grayscale;
38
+ margin: 0; /* Ensure no default margin on body */
39
+ padding: 0; /* Ensure no default padding on body */
40
+ }
41
+ html {
42
+ margin: 0;
43
+ padding: 0;
44
+ overflow-x: hidden; /* Also apply to html for good measure in iframes */
45
  }
46
  }
47
 
 
54
  left: 50%;
55
  transform: translateX(-50%);
56
  z-index: 100;
57
+ width: calc(100% - 1rem); /* Reduced side margin for very small screens */
58
+ max-width: 28rem;
59
  display: flex;
60
  justify-content: center;
61
  pointer-events: none;
 
71
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
72
  outline: none;
73
  transition: opacity 0.3s ease-out, transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
74
+ opacity: 0;
75
  transform: translateY(-100%) scale(0.9);
76
  pointer-events: none;
77
 
78
  &.open {
79
+ opacity: 1;
80
  transform: translateY(0) scale(1);
81
  pointer-events: auto;
82
  }
 
99
  /* Header controls */
100
  .header-controls {
101
  display: flex;
102
+ /* *** MODIFIED: Reduced horizontal padding significantly *** */
103
+ padding: 0.75rem 0.5rem; /* 12px top/bottom, 8px left/right */
104
  justify-content: space-between;
105
  align-items: center;
106
  width: 100%;
107
  position: absolute;
108
  top: 0;
109
  left: 0;
110
+ z-index: 10;
111
+ /* box-sizing: border-box; // Already set globally for * */
112
  }
113
 
114
  .header-button {
115
  display: flex;
116
  align-items: center;
117
  justify-content: center;
118
+ padding: 0.5rem; /* 8px padding */
119
+ border-radius: var(--radius-lg, 0.625rem);
120
+ background-color: #e5e7eb;
121
  cursor: pointer;
122
  transition: background-color 0.2s;
123
 
124
  &:hover {
125
+ background-color: #d1d5db;
126
  }
127
 
128
  svg {
129
+ opacity: 0.7;
130
+ stroke: #374151;
131
  }
132
  }
133
 
 
137
  background-color: oklch(0.35 0 0);
138
  }
139
  svg {
140
+ opacity: 0.8;
141
  stroke: oklch(0.85 0 0);
142
  }
143
  }
 
146
  .footer-controls {
147
  width: 100%;
148
  display: flex;
149
+ /* *** MODIFIED: Reduced gap and horizontal padding significantly *** */
150
+ gap: 0.5rem; /* 8px gap between buttons */
151
  position: absolute;
152
  bottom: 0;
153
+ /* Reduced top/bottom padding slightly, horizontal padding significantly */
154
+ padding: 0.75rem 0.5rem; /* 12px top/bottom, 8px left/right */
155
  align-items: center;
156
+ /* box-sizing: border-box; // Already set globally for * */
157
 
158
  &.layout-default {
159
+ justify-content: space-between;
160
  }
161
  &.layout-with-small-logo {
162
+ justify-content: space-around;
163
  }
164
  }
165
 
166
  .control-button {
167
+ height: 70px; /* Slightly reduced size */
168
+ width: 70px; /* Slightly reduced size */
169
+ border-radius: 9999px;
170
  padding: 0;
171
  display: flex;
172
  align-items: center;
 
176
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
177
  cursor: pointer;
178
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
179
+ flex-shrink: 0; /* Prevent buttons from shrinking if space is tight in a way that breaks layout */
180
+
181
 
182
  &:hover {
183
  transform: scale(1.05);
 
185
  }
186
  }
187
 
188
+ .cam-button-color { background-color: #E0ECFF; }
189
+ .mic-button-color { background-color: #fecdd3; }
190
 
191
+ .dark .cam-button-color { background-color: #223355; }
192
+ .dark .mic-button-color { background-color: #5C2129; }
193
 
194
  /* Switch Camera Button */
195
  .switch-camera-button-container {
196
  position: absolute;
197
+ bottom: calc(100% + 0.5rem); /* Adjusted spacing slightly */
198
  left: 50%;
199
+ z-index: 5;
200
+ opacity: 0;
201
  transform: translateY(15px) scale(0.7) translateX(-50%);
202
  pointer-events: none;
203
  transition: opacity 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55), transform 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
204
  transform-origin: center bottom;
205
 
206
  &.visible {
207
+ opacity: 1;
208
  transform: translateY(0) scale(1) translateX(-50%);
209
  pointer-events: auto;
210
  }
211
  }
212
 
213
  .switch-camera-button-content {
214
+ width: 44px; /* Slightly reduced size */
215
+ height: 44px; /* Slightly reduced size */
216
  background-color: var(--background);
217
  border: 1px solid var(--border);
218
+ border-radius: 9999px;
219
  display: flex;
220
  align-items: center;
221
  justify-content: center;
 
233
  }
234
 
235
  svg {
236
+ width: 20px; /* Slightly reduced size */
237
+ height: 20px; /* Slightly reduced size */
238
  stroke: var(--foreground);
239
  transition: transform 0.3s ease-in-out;
240
  }
 
245
 
246
  /* Keyframes for popover */
247
  @keyframes popover-drop-in {
248
+ 0% {
249
  opacity: 0;
250
  transform: translateY(-100%) scale(0.9);
251
  }
252
+ 70% {
253
  opacity: 1;
254
+ transform: translateY(5px) scale(1.02);
255
  }
256
+ 100% {
257
  opacity: 1;
258
  transform: translateY(0) scale(1);
259
  }
260
  }
261
 
262
  @keyframes popover-lift-out {
263
+ 0% {
264
  opacity: 1;
265
  transform: translateY(0) scale(1);
266
  }
267
+ 100% {
268
  opacity: 0;
269
  transform: translateY(-100%) scale(0.9);
270
  }