@nicertravel/ui 0.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2917 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&display=swap')
2
+ @import './reset.css'
3
+ @import './icons/style.css'
4
+
5
+ /* FONTS */
6
+ @font-face
7
+ font-family: 'The Seasons'
8
+ src: url('./fonts/TheSeasons-Regular.woff2') format('woff2'), url('./fonts/TheSeasons-Regular.woff') format('woff'), url('./fonts/TheSeasons-Regular.ttf') format('truetype')
9
+ font-weight: normal
10
+ font-style: normal
11
+ /* eND: FONTS */
12
+
13
+ /* COLORS */
14
+ :root
15
+ // Grayscale
16
+ --gray50: #F2F2F2
17
+ --gray100: #E6E6E6
18
+ --gray150: #D9D9D9
19
+ --gray200: #CCCCCC
20
+ --gray300: #B3B3B3
21
+ --gray400: #999999
22
+ --gray500: #808080
23
+ --gray600: #666666
24
+ --gray700: #4D4D4D
25
+ --gray800: #333333
26
+ --gray850: #262626
27
+ --gray875: #202020
28
+ --gray900: #1A1A1A
29
+
30
+ // Status
31
+ --positive100: #D9F2D9
32
+ --positive300: #8CD98C
33
+ --positive500: #40BF40
34
+ --positive700: #267326
35
+
36
+ --warning100: #FFF2CC
37
+ --warning300: #FFD966
38
+ --warning500: #FFBF00
39
+ --warning700: #997300
40
+
41
+ --negative100: #FFCCCC
42
+ --negative300: #FF6666
43
+ --negative500: #FF0000
44
+ --negative700: #990000
45
+
46
+ // Brand
47
+ --brandBg: #333333
48
+ --brandHighlight: white
49
+ --brandShadow: rgba(51, 51, 51, .5)
50
+
51
+ // Brand gold — the warm half of the identity.
52
+ // The mid steps share hex values with --warning*, but they are NOT alerts:
53
+ // this ramp is what makes the product feel like Nicer rather than a neutral
54
+ // shell (advisor banner, progress CTAs, accents). The two darkest steps exist
55
+ // only here — nothing else in the system goes that deep.
56
+ --gold50: #FFF9E5
57
+ --gold100: #FFF2CC
58
+ --gold200: #FFE599
59
+ --gold300: #FFD966
60
+ --gold400: #FFCC33
61
+ --gold500: #FFBF00
62
+ --gold600: #CC9900
63
+ --gold700: #997300
64
+ --gold800: #664D00
65
+ --gold900: #332600
66
+ // The accent ramp agency-facing screens use: Nicer's gold until an agency's
67
+ // theme sets its own (site-theme brandRamp).
68
+ --brand50: var(--gold50)
69
+ --brand100: var(--gold100)
70
+ --brand200: var(--gold200)
71
+ --brand300: var(--gold300)
72
+ --brand400: var(--gold400)
73
+ --brand500: var(--gold500)
74
+ --brand600: var(--gold600)
75
+ --brand700: var(--gold700)
76
+ --brand800: var(--gold800)
77
+ --brand900: var(--gold900)
78
+
79
+ // THEMES
80
+ // Light
81
+ :root
82
+ --bgPrimary: white
83
+ --bgSoft: var(--gray50)
84
+ --bgMedium: var(--gray100)
85
+ --bgHard: var(--gray150)
86
+ --borderSoft: var(--gray100)
87
+ --borderMedium: var(--gray150)
88
+ --borderHard: var(--gray200)
89
+ --borderHighlight: var(--gray400)
90
+ --textSoft: var(--gray500)
91
+ --textNormal: var(--gray700)
92
+ --highlight: black
93
+ --bgPositive: var(--positive100)
94
+ --textPositive: var(--positive700)
95
+ --bgWarning: var(--warning100)
96
+ --textWarning: var(--warning700)
97
+ --bgNegative: var(--negative100)
98
+ --bgNegativeHover: #FFB2B2
99
+ --textNegative: var(--negative700)
100
+
101
+ // Chart series (categorical, fixed slot order: colour follows the entity).
102
+ // Gold leads as the brand hue; the order passes colour-vision separation
103
+ // (OKLab ΔE ≥ 8 on adjacent pairs) on white. Never cycle past slot 6.
104
+ --chart1: #EDA100
105
+ --chart2: #2A78D6
106
+ --chart3: #1BAF7A
107
+ --chart4: #4A3AA7
108
+ --chart5: #E87BA4
109
+ --chart6: #008300
110
+
111
+ // Dark
112
+ .dark
113
+ --bgPrimary: var(--gray900)
114
+ --bgSoft: var(--gray875)
115
+ --bgMedium: var(--gray850)
116
+ --bgHard: var(--gray800)
117
+ --borderSoft: var(--gray850)
118
+ --borderMedium: var(--gray800)
119
+ --borderHard: var(--gray700)
120
+ --borderHighlight: var(--gray600)
121
+ --textSoft: var(--gray500)
122
+ --textNormal: var(--gray300)
123
+ --highlight: white
124
+ --bgPositive: rgba(64, 191, 64, .15)
125
+ --textPositive: var(--positive300)
126
+ --bgWarning: rgba(255, 191, 0, .15)
127
+ --textWarning: var(--warning300)
128
+ --bgNegative: rgba(255, 0, 0, .15)
129
+ --bgNegativeHover: rgba(255, 0, 0, .25)
130
+ --textNegative: var(--negative300)
131
+
132
+ // Same six hues re-stepped for the dark surface (not a brightness flip).
133
+ --chart1: #C98500
134
+ --chart2: #3987E5
135
+ --chart3: #199E70
136
+ --chart4: #9085E9
137
+ --chart5: #D55181
138
+ --chart6: #008300
139
+
140
+ // SEGMENTS
141
+ :root
142
+ --activityDark: #301040
143
+ --activityLight: #D6B8E5
144
+ --car_rentalDark: #404010
145
+ --car_rentalLight: #E5E5B8
146
+ --cruiseDark: #104040
147
+ --cruiseLight: #B8E5E5
148
+ --flightDark: #104028
149
+ --flightLight: #B8E5CF
150
+ --lodgingDark: #401010
151
+ --lodgingLight: #FFCCCC
152
+ --restaurantDark: #402810
153
+ --restaurantLight: #FFCC99
154
+ --transportationDark: #404040
155
+ --transportationLight: #E6E6E6
156
+ --insuranceDark: #102840
157
+ --insuranceLight: #99CCFF
158
+ --customDark: var(--highlight)
159
+ --customLight: var(--bgSoft)
160
+
161
+ .dark
162
+ --activityDark: #D6B8E5
163
+ --activityLight: rgba(214, 184, 229, .15)
164
+ --car_rentalDark: #E5E5B8
165
+ --car_rentalLight: rgba(229, 229, 184, .15)
166
+ --cruiseDark: #B8E5E5
167
+ --cruiseLight: rgba(184, 229, 229, .15)
168
+ --flightDark: #B8E5CF
169
+ --flightLight: rgba(184, 229, 207, .15)
170
+ --lodgingDark: #FFCCCC
171
+ --lodgingLight: rgba(255, 204, 204, .15)
172
+ --restaurantDark: #FFCC99
173
+ --restaurantLight: rgba(255, 204, 153, .15)
174
+ --transportationDark: #E6E6E6
175
+ --transportationLight: rgba(230, 230, 230, .15)
176
+ --insuranceDark: #99CCFF
177
+ --insuranceLight: rgba(153, 204, 255, .15)
178
+ --customDark: var(--highlight)
179
+ --customLight: var(--bgSoft)
180
+ /* End: COLORS */
181
+
182
+ /* EASINGS */
183
+ :root
184
+ --easeOutExpo: cubic-bezier(0.16, 1, 0.3, 1)
185
+ --easeOutBack: cubic-bezier(0.34, 1.56, 0.64, 1)
186
+ /* End: EASINGS */
187
+
188
+ /* RADIUS */
189
+ // A booking site's theme overrides these (siteThemeVars in @nicer/catalog).
190
+ // Not `--radius-*`: discover's Tailwind CSS defines those globally.
191
+ :root
192
+ --nicerRadiusS: 6px
193
+ --nicerRadiusM: 12px
194
+ --nicerRadiusL: 16px
195
+ /* End: RADIUS */
196
+
197
+ /* TEXT STYLES */
198
+ .t-xxxl
199
+ font-size: 56px
200
+ line-height: 96px
201
+
202
+ .t-xxl
203
+ font-size: 48px
204
+ line-height: 80px
205
+
206
+ .t-xl
207
+ font-size: 32px
208
+ line-height: 56px
209
+
210
+ .t-l
211
+ font-size: 28px
212
+ line-height: 48px
213
+
214
+ .t-m
215
+ font-size: 24px
216
+ line-height: 40px
217
+
218
+ .t-s
219
+ font-size: 16px
220
+ line-height: 28px
221
+
222
+ .t-xs
223
+ font-size: 14px
224
+ line-height: 24px
225
+
226
+ .t-xxs
227
+ font-size: 12px
228
+ line-height: 20px
229
+
230
+ .t-xxxs
231
+ font-size: 10px
232
+ line-height: 16px
233
+
234
+ b,
235
+ .bold
236
+ font-weight: 700
237
+
238
+ .brand
239
+ font-family: var(--fontBrand, 'The Seasons')
240
+ /* End: TEXT STYLES */
241
+
242
+ /* GLOBALS */
243
+ // The browser's own parts (scrollbars, native pickers) follow the theme:
244
+ // without it, every scrollbar stays light on a dark page.
245
+ body
246
+ color-scheme: light
247
+
248
+ body.dark
249
+ color-scheme: dark
250
+
251
+ body
252
+ background: var(--bgPrimary)
253
+ font-family: var(--fontBody, 'Inter'), sans-serif
254
+ font-weight: 400
255
+ color: var(--highlight)
256
+ -webkit-font-smoothing: antialiased
257
+ -moz-osx-font-smoothing: grayscale
258
+
259
+ // IMAGE PLACEHOLDERS
260
+ // A photo that failed (installImageFallbacks), an <img> without a src, or a
261
+ // frame with no photo to show (.ui-image-placeholder): a picture glyph a tone
262
+ // off a fill one step harder than the surfaces around it, so the slot reads as
263
+ // a slot — never a broken icon, its alt text or a block of the proxy's 1×1
264
+ // pixel. No brand mark: every agency's travelers see it. A person gets a
265
+ // silhouette, a hotel the blurred room its cards already fall back to.
266
+ img[data-image-fallback],
267
+ img:not([src]),
268
+ .ui-image-placeholder
269
+ background-color: var(--bgMedium)
270
+ background-image: url('../assets/image-placeholder-light.svg')
271
+ background-position: center
272
+ background-repeat: no-repeat
273
+ background-size: auto min(40%, 48px)
274
+ color: transparent
275
+
276
+ // The frame's stand-in for its photo: sized by the host like the <img> it
277
+ // replaces.
278
+ .ui-image-placeholder
279
+ display: block
280
+
281
+ img[data-image-fallback='avatar']
282
+ background-color: var(--bgSoft)
283
+ background-image: url('../assets/avatar-placeholder-light.svg')
284
+ background-position: center bottom
285
+ background-size: 100%
286
+
287
+ img[data-image-fallback='lodging'],
288
+ .ui-image-placeholder[data-image-kind='lodging']
289
+ background-image: url('../assets/lodging-placeholder.jpg')
290
+ background-size: cover
291
+
292
+ .dark
293
+ img[data-image-fallback],
294
+ img:not([src]),
295
+ .ui-image-placeholder
296
+ background-image: url('../assets/image-placeholder-dark.svg')
297
+
298
+ img[data-image-fallback='avatar']
299
+ background-image: url('../assets/avatar-placeholder-dark.svg')
300
+
301
+ img[data-image-fallback='lodging'],
302
+ .ui-image-placeholder[data-image-kind='lodging']
303
+ background-image: url('../assets/lodging-placeholder.jpg')
304
+
305
+ // A photo that waits for its pixels: hidden until installImageFallbacks marks
306
+ // it loaded or swaps in its placeholder, so neither the proxy's 1×1 pixel nor
307
+ // a half-painted photo flashes before it — the frame shows its own ground.
308
+ img.ui-image-reveal
309
+ transition: opacity 240ms var(--easeOutExpo)
310
+
311
+ &[src]:not([data-image-loaded]):not([data-image-fallback])
312
+ opacity: 0
313
+ // End: IMAGE PLACEHOLDERS
314
+
315
+ // Scrollbar
316
+ .no-scrollbar
317
+ -ms-overflow-style: none
318
+ scrollbar-width: none
319
+
320
+ &::-webkit-scrollbar
321
+ display: none
322
+ /* End: GLOBALS */
323
+
324
+ /* ICONS THE FONT LACKS */
325
+ // Drawn as a mask in the text's colour at the font's size, so <Icon> and
326
+ // IconButton take them by name like the font's own, at the same 1px line:
327
+ // the ones the font has no glyph for, and the ones whose glyph read as a
328
+ // blank page (note, document), which these replace.
329
+ .ui-icon.icon-gear::before,
330
+ .ui-icon.icon-cake::before,
331
+ .ui-icon.icon-note::before,
332
+ .ui-icon.icon-document::before,
333
+ .ui-icon.icon-sliders::before,
334
+ .ui-icon.icon-tag::before,
335
+ .ui-icon.icon-building::before
336
+ content: ""
337
+ display: inline-block
338
+ width: 1em
339
+ height: 1em
340
+ vertical-align: top
341
+ background-color: currentColor
342
+
343
+ // A birthday cake: a traveler's birthday among their important dates.
344
+ // Scaled a tenth up to fill the em box as the font's glyphs do.
345
+ .ui-icon.icon-cake::before
346
+ $cake: "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'><g transform='translate(12 11.6) scale(1.1) translate(-12 -11.6)'><path d='M12 2.75c.9 1 1.35 1.8 1.35 2.45a1.35 1.35 0 0 1-2.7 0c0-.65.45-1.45 1.35-2.45Z'/><path d='M12 7.85v2.65'/><path d='M6.5 15v-3.5a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1V15'/><path d='M4.5 20.5V16a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1v4.5'/><path d='M4.5 17.25c1.25 0 1.25 1 2.5 1s1.25-1 2.5-1 1.25 1 2.5 1 1.25-1 2.5-1 1.25 1 2.5 1 1.25-1 2.5-1'/><path d='M3 20.5h18'/></g></svg>"
347
+ -webkit-mask: url("#{$cake}") center / contain no-repeat
348
+ mask: url("#{$cake}") center / contain no-repeat
349
+
350
+ // A note: a page with its lines and the pencil writing it.
351
+ .ui-icon.icon-note::before
352
+ $note: "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'><path d='M16 12.5V3H4v18h6.5'/><path d='M7 7h6M7 10h6M7 13h3'/><path d='M12.5 21.5l.7-2.83 6.48-6.48 2.12 2.12-6.48 6.48z'/><path d='M18.27 13.6l2.12 2.12'/></svg>"
353
+ -webkit-mask: url("#{$note}") center / contain no-repeat
354
+ mask: url("#{$note}") center / contain no-repeat
355
+
356
+ // A document: a page with its corner folded and lines of text.
357
+ .ui-icon.icon-document::before
358
+ $document: "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'><path d='M14 3H5.5v18h13V7.5z'/><path d='M14 3v4.5h4.5'/><path d='M8.5 11.5h7M8.5 14.5h7M8.5 17.5h4'/></svg>"
359
+ -webkit-mask: url("#{$document}") center / contain no-repeat
360
+ mask: url("#{$document}") center / contain no-repeat
361
+
362
+ // A gear: Settings, wherever a page or a panel is set up (the sliders,
363
+ // `settings`, arrange a list's columns or pages).
364
+ .ui-icon.icon-gear::before
365
+ $gear: "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1' stroke-linejoin='round'><path d='M10.05 4.45L10.32 1.94A10.2 10.2 0 0 1 13.68 1.94L13.95 4.45A7.8 7.8 0 0 1 15.96 5.28L17.92 3.7A10.2 10.2 0 0 1 20.3 6.08L18.72 8.04A7.8 7.8 0 0 1 19.55 10.05L22.06 10.32A10.2 10.2 0 0 1 22.06 13.68L19.55 13.95A7.8 7.8 0 0 1 18.72 15.96L20.3 17.92A10.2 10.2 0 0 1 17.92 20.3L15.96 18.72A7.8 7.8 0 0 1 13.95 19.55L13.68 22.06A10.2 10.2 0 0 1 10.32 22.06L10.05 19.55A7.8 7.8 0 0 1 8.04 18.72L6.08 20.3A10.2 10.2 0 0 1 3.7 17.92L5.28 15.96A7.8 7.8 0 0 1 4.45 13.95L1.94 13.68A10.2 10.2 0 0 1 1.94 10.32L4.45 10.05A7.8 7.8 0 0 1 5.28 8.04L3.7 6.08A10.2 10.2 0 0 1 6.08 3.7L8.04 5.28A7.8 7.8 0 0 1 10.05 4.45Z'/><circle cx='12' cy='12' r='3'/></svg>"
366
+ -webkit-mask: url("#{$gear}") center / contain no-repeat
367
+ mask: url("#{$gear}") center / contain no-repeat
368
+
369
+ // Sliders: preferences, how someone likes things set (a traveler's flights,
370
+ // stays and interests).
371
+ .ui-icon.icon-sliders::before
372
+ $sliders: "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'><path d='M3 6h11M18 6h3M3 12h3M10 12h11M3 18h8M15 18h6'/><circle cx='16' cy='6' r='2'/><circle cx='8' cy='12' r='2'/><circle cx='13' cy='18' r='2'/></svg>"
373
+ -webkit-mask: url("#{$sliders}") center / contain no-repeat
374
+ mask: url("#{$sliders}") center / contain no-repeat
375
+
376
+ // A tag: a membership or a label (a traveler's loyalty programs).
377
+ .ui-icon.icon-tag::before
378
+ $tag: "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'><path d='M3 12.2V4a1 1 0 0 1 1-1h8.2a1 1 0 0 1 .7.3l8 8a1 1 0 0 1 0 1.4l-8.2 8.2a1 1 0 0 1-1.4 0l-8-8a1 1 0 0 1-.3-.7Z'/><circle cx='7.5' cy='7.5' r='1.5'/></svg>"
379
+ -webkit-mask: url("#{$tag}") center / contain no-repeat
380
+ mask: url("#{$tag}") center / contain no-repeat
381
+
382
+ // A building: the agency, what it keeps for itself (Agency details).
383
+ .ui-icon.icon-building::before
384
+ $building: "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'><path d='M4.5 21V4a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v17'/><path d='M14.5 9h4a1 1 0 0 1 1 1v11'/><path d='M2.5 21h19'/><path d='M8 7h3M8 10.5h3M8 14h3'/><path d='M8.5 21v-3h2v3'/></svg>"
385
+ -webkit-mask: url("#{$building}") center / contain no-repeat
386
+ mask: url("#{$building}") center / contain no-repeat
387
+ /* End: ICONS THE FONT LACKS */
388
+
389
+ /* ACTIONS */
390
+ .ui-actions
391
+ @extend .no-scrollbar
392
+ list-style: none
393
+ min-width: 200px
394
+ border-radius: 16px
395
+ overflow-y: scroll
396
+ border: 1px solid var(--borderHard)
397
+ padding: 7px
398
+ background: var(--bgPrimary)
399
+ box-shadow: 0 8px 16px 0 rgba(0, 0, 0, .1)
400
+ color: var(--highlight)
401
+ position: absolute
402
+ z-index: 1000
403
+
404
+ li
405
+ height: 40px
406
+ border-radius: 8px
407
+ padding: 8px 20px 8px 8px
408
+ display: flex
409
+ align-items: center
410
+ gap: 12px
411
+ cursor: pointer
412
+ transition: background 150ms
413
+
414
+ > .ui-icon
415
+ margin: 3px
416
+
417
+ p
418
+ @extend .t-xs
419
+ white-space: nowrap
420
+
421
+ &:hover
422
+ background: var(--bgSoft)
423
+
424
+ &.destructive
425
+ color: var(--textNegative)
426
+
427
+ > .ui-icon
428
+ color: var(--textNegative)
429
+
430
+ &.disabled
431
+ color: var(--textSoft)
432
+ cursor: default
433
+
434
+ > .ui-icon
435
+ color: var(--textSoft)
436
+
437
+ &:hover
438
+ background: none
439
+ /* End: ACTIONS */
440
+
441
+ /* BUTTON */
442
+ .ui-button
443
+ white-space: nowrap
444
+ display: flex
445
+ align-items: center
446
+ justify-content: center
447
+ gap: 8px
448
+ cursor: pointer
449
+ transition-property: background, box-shadow
450
+ transition-duration: 300ms
451
+
452
+ // Size
453
+ &.l
454
+ @extend .t-s
455
+ height: 56px
456
+ padding: 0 28px
457
+ border-radius: var(--nicerRadiusM, 12px)
458
+
459
+ &.m
460
+ @extend .t-xs
461
+ height: 40px
462
+ padding: 0 20px
463
+ // 8px: two thirds of M, so it follows a site's radius too.
464
+ border-radius: calc(var(--nicerRadiusM, 12px) * 2 / 3)
465
+
466
+ &.s
467
+ @extend .t-xxs
468
+ height: 28px
469
+ padding: 0 14px
470
+ border-radius: var(--nicerRadiusS, 6px)
471
+
472
+ // Hierarchy
473
+ // Hover styles only where hover exists: on touch, the browser keeps
474
+ // :hover applied after a tap, so the shadow (and hover fill) stuck to
475
+ // the tapped button until something else was touched.
476
+ &.primary
477
+ background: var(--brandBg)
478
+ color: var(--brandHighlight)
479
+
480
+ @media (hover: hover)
481
+ &.l:hover
482
+ box-shadow: 0 28px 28px -14px var(--brandShadow)
483
+
484
+ &.m:hover
485
+ box-shadow: 0 20px 20px -10px var(--brandShadow)
486
+
487
+ &.s:hover
488
+ box-shadow: 0 14px 14px -7px var(--brandShadow)
489
+
490
+ &.secondary,
491
+ &.tertiary
492
+ box-shadow: inset 0 0 0 1px var(--borderHard)
493
+ color: var(--highlight)
494
+
495
+ @media (hover: hover)
496
+ &:hover
497
+ background: var(--bgSoft)
498
+
499
+ // A tour pointing at the button shows it as hovered.
500
+ &.tour-highlighted
501
+ background: var(--bgSoft)
502
+
503
+ &.destructive
504
+ background: var(--bgNegative)
505
+ color: var(--textNegative)
506
+
507
+ @media (hover: hover)
508
+ &:hover
509
+ background: var(--bgNegativeHover)
510
+
511
+ // State
512
+ &.loading,
513
+ &.success,
514
+ &.error,
515
+ &.disabled
516
+ box-shadow: none
517
+ pointer-events: none
518
+
519
+ // Busy, done or failed: the label keeps its room unseen, so the button
520
+ // keeps its width, and the state sits on it, in the middle.
521
+ &.loading,
522
+ &.success,
523
+ &.error
524
+ display: grid
525
+ place-items: center
526
+
527
+ > .held,
528
+ > .status
529
+ grid-area: 1 / 1
530
+ display: flex
531
+ align-items: center
532
+ gap: 8px
533
+
534
+ > .held
535
+ visibility: hidden
536
+
537
+ &.disabled
538
+ background: var(--bgHard)
539
+ color: var(--textSoft)
540
+
541
+ &.loading
542
+ &.secondary,
543
+ &.tertiary
544
+ background: var(--bgSoft)
545
+ color: var(--highlight)
546
+
547
+ &.m .ui-spinner
548
+ width: 18px
549
+ height: 18px
550
+
551
+ &.s .ui-spinner
552
+ width: 12px
553
+ height: 12px
554
+
555
+ &.success
556
+ background: var(--bgPositive)
557
+ color: var(--textPositive)
558
+
559
+ &.error
560
+ background: var(--bgNegative)
561
+ color: var(--textNegative)
562
+ /* End: BUTTON */
563
+
564
+ /* MAINTENANCE GATE */
565
+ .ui-maintenance
566
+ min-height: 100dvh
567
+ display: flex
568
+ flex-direction: column
569
+ align-items: center
570
+ justify-content: center
571
+ gap: 12px
572
+ padding: 24px
573
+ text-align: center
574
+ background: var(--bgPrimary)
575
+
576
+ .wordmark
577
+ font-size: 44px
578
+ margin: 0 0 12px
579
+ color: var(--highlight)
580
+
581
+ h1
582
+ margin: 0
583
+ font-weight: 600
584
+
585
+ > p:last-child
586
+ margin: 0
587
+ max-width: 380px
588
+ color: var(--textSoft)
589
+ /* End: MAINTENANCE GATE */
590
+
591
+
592
+
593
+ /* ICON BUTTON */
594
+ .ui-icon-button
595
+ display: flex
596
+ align-items: center
597
+ justify-content: center
598
+ cursor: pointer
599
+ transition-property: background, box-shadow
600
+ transition-duration: 300ms
601
+
602
+ // Size
603
+ &.l
604
+ width: 56px
605
+ height: 56px
606
+ border-radius: 12px
607
+
608
+ &.m
609
+ width: 40px
610
+ height: 40px
611
+ border-radius: 8px
612
+
613
+ &.s
614
+ width: 28px
615
+ height: 28px
616
+ border-radius: 4px
617
+
618
+ &.circle
619
+ border-radius: 50% !important
620
+
621
+ // Hierarchy
622
+ // Hover styles only where hover exists: on touch, the browser keeps
623
+ // :hover applied after a tap, so the shadow (and hover fill) stuck to
624
+ // the tapped button until something else was touched.
625
+ &.primary
626
+ background: var(--brandBg)
627
+ color: var(--brandHighlight)
628
+
629
+ @media (hover: hover)
630
+ &.l:hover
631
+ box-shadow: 0 28px 28px -14px var(--brandShadow)
632
+
633
+ &.m:hover
634
+ box-shadow: 0 20px 20px -10px var(--brandShadow)
635
+
636
+ &.s:hover
637
+ box-shadow: 0 14px 14px -7px var(--brandShadow)
638
+
639
+ &.secondary,
640
+ &.tertiary
641
+ box-shadow: inset 0 0 0 1px var(--borderHard)
642
+ color: var(--highlight)
643
+
644
+ @media (hover: hover)
645
+ &:hover
646
+ background: var(--bgSoft)
647
+
648
+ &.destructive
649
+ background: var(--bgNegative)
650
+ color: var(--textNegative)
651
+
652
+ @media (hover: hover)
653
+ &:hover
654
+ background: var(--bgNegativeHover)
655
+
656
+ // State
657
+ &.disabled
658
+ box-shadow: none
659
+ pointer-events: none
660
+ background: var(--bgHard)
661
+ color: var(--textSoft)
662
+ /* End: ICON BUTTON */
663
+
664
+ /* CALENDAR */
665
+ .ui-calendar
666
+ width: 332px
667
+ border-radius: 20px
668
+ border: 1px solid var(--borderHard)
669
+ padding: 11px
670
+ background: var(--bgPrimary)
671
+ display: flex
672
+ flex-direction: column
673
+ gap: 24px
674
+
675
+ > :first-child
676
+ display: flex
677
+ align-items: center
678
+
679
+ .ui-nav-button
680
+ margin: 2px
681
+
682
+ p
683
+ @extend .t-s
684
+ flex: 1
685
+ line-height: 40px
686
+ border-radius: 8px
687
+ text-align: center
688
+ margin: 2px
689
+ cursor: pointer
690
+ transition: background 300ms
691
+
692
+ &:hover
693
+ background: var(--bgSoft)
694
+
695
+ .days
696
+ display: flex
697
+ flex-direction: column
698
+ gap: 16px
699
+
700
+ > :first-child
701
+ display: grid
702
+ grid-template-columns: repeat(7, 1fr)
703
+
704
+ p
705
+ @extend .t-xxxs
706
+ color: var(--textSoft)
707
+ text-align: center
708
+
709
+ > :last-child
710
+ display: grid
711
+ grid-template-columns: repeat(7, 1fr)
712
+ gap: 4px
713
+
714
+ button
715
+ @extend .t-xxs
716
+ width: 40px
717
+ height: 40px
718
+ border-radius: 20px
719
+ display: flex
720
+ align-items: center
721
+ justify-content: center
722
+ position: relative
723
+ margin: 0 auto
724
+ cursor: pointer
725
+
726
+ &:hover
727
+ background: var(--bgSoft)
728
+
729
+ &.today
730
+ &::after
731
+ content: ''
732
+ width: 4px
733
+ height: 4px
734
+ border-radius: 2px
735
+ background: var(--brandBg)
736
+ position: absolute
737
+ bottom: 4px
738
+ left: 18px
739
+
740
+ &.selected::after
741
+ background: white
742
+
743
+ &.selected
744
+ background: var(--brandBg)
745
+ color: var(--brandHighlight) !important
746
+
747
+ &.between
748
+ border: 1px solid var(--borderHard)
749
+
750
+ &:disabled
751
+ color: var(--textSoft)
752
+ pointer-events: none
753
+
754
+ &:empty
755
+ visibility: hidden
756
+
757
+ .months,
758
+ .years
759
+ display: flex
760
+ flex-wrap: wrap
761
+
762
+ p
763
+ flex-basis: calc(100% / 3)
764
+ border-radius: 8px
765
+ line-height: 40px
766
+ text-align: center
767
+ cursor: pointer
768
+ transition: background 300ms
769
+
770
+ &:hover
771
+ background: var(--bgSoft)
772
+
773
+ &.active
774
+ background: var(--brandBg)
775
+ color: var(--brandHighlight)
776
+
777
+ > .ui-button
778
+ width: 100%
779
+ /* End: CALENDAR */
780
+
781
+ /* CHECK & RADIO BUTTON */
782
+ .ui-check,
783
+ .ui-radio-button
784
+ width: 24px
785
+ height: 24px
786
+ padding: 2px
787
+ position: relative
788
+
789
+ input
790
+ width: 20px
791
+ height: 20px
792
+ border-radius: 50%
793
+ border: 1px solid var(--borderHard)
794
+ background: var(--bgSoft)
795
+ cursor: pointer
796
+
797
+ &:hover,
798
+ &:focus
799
+ & + figure,
800
+ & + .ui-icon
801
+ opacity: .2
802
+
803
+ &:focus
804
+ border: 0
805
+ box-shadow: 0 0 0 2px var(--borderHighlight)
806
+
807
+ // A required choice left empty, until it is made: only the ring turns
808
+ // red, so it still reads as empty.
809
+ &[aria-invalid="true"]:not(:checked)
810
+ border: 1px solid var(--textNegative)
811
+
812
+ &:checked
813
+ border: 0
814
+ background: var(--brandBg)
815
+
816
+ & + figure,
817
+ & + .ui-icon
818
+ opacity: 1
819
+
820
+ & + figure
821
+ background: var(--brandHighlight)
822
+
823
+ & + .ui-icon
824
+ color: var(--brandHighlight)
825
+
826
+ &:disabled
827
+ border: 0
828
+ background: var(--bgMedium)
829
+ pointer-events: none
830
+
831
+ &:checked
832
+ background: var(--bgHard)
833
+
834
+ & + figure,
835
+ & + .ui-icon
836
+ opacity: 1
837
+
838
+ & + figure
839
+ background: var(--textSoft)
840
+
841
+ & + .ui-icon
842
+ color: var(--textSoft)
843
+
844
+ figure,
845
+ .ui-icon
846
+ opacity: 0
847
+ position: absolute
848
+ top: calc(50% - 4px)
849
+ left: calc(50% - 4px)
850
+ pointer-events: none
851
+
852
+ figure
853
+ width: 8px
854
+ height: 8px
855
+ background: var(--highlight)
856
+ border-radius: 50%
857
+
858
+ .ui-icon
859
+ color: var(--highlight)
860
+
861
+ .ui-radio-button,
862
+ .ui-check.circle
863
+ input
864
+ border-radius: 50%
865
+
866
+ .ui-check:not(.circle)
867
+ input
868
+ border-radius: 5px
869
+ /* End: CHECK & RADIO BUTTON */
870
+
871
+ /* DIALOG */
872
+ .ui-dialog
873
+ width: 400px
874
+ max-width: calc(100vw - 40px)
875
+ // Header and actions stay put; a long body scrolls between them. Capped
876
+ // like a dialog, not the viewport: on a tall screen a long list stretched
877
+ // the box nearly floor to ceiling.
878
+ max-height: min(560px, calc(100dvh - 96px))
879
+ margin: 0 20px
880
+ border-radius: 20px
881
+ border: 1px solid var(--borderMedium)
882
+ background: var(--bgPrimary)
883
+ display: flex
884
+ flex-direction: column
885
+
886
+ header
887
+ padding: 10px
888
+ display: flex
889
+ align-items: center
890
+ justify-content: flex-end
891
+ gap: 16px
892
+
893
+ h6
894
+ flex: 1
895
+ min-width: 0
896
+ padding-left: 10px
897
+ overflow-wrap: anywhere
898
+
899
+ .ui-nav-button
900
+ flex-shrink: 0
901
+
902
+ > p
903
+ @extend .t-xs
904
+ padding: 32px 20px
905
+
906
+ .content
907
+ @extend .no-scrollbar
908
+ flex-grow: 1
909
+ min-height: 0
910
+ overflow-y: auto
911
+ padding: 0px 20px 32px
912
+
913
+ // A title sits right above the body: the gap that held the lone close
914
+ // button would float the content away from its heading.
915
+ header:has(h6) + .content
916
+ padding-top: 8px
917
+
918
+ footer
919
+ padding: 0 12px 12px
920
+ display: flex
921
+ gap: 8px
922
+
923
+ .ui-button
924
+ flex: 1
925
+ /* End: DIALOG */
926
+
927
+ /* DROPDOWN */
928
+ .ui-dropdown
929
+ @extend .no-scrollbar
930
+ list-style: none
931
+ min-width: 100%
932
+ width: 100%
933
+ max-height: 256px
934
+ border-radius: 8px
935
+ overflow-y: scroll
936
+ border: 1px solid var(--borderHard)
937
+ padding: 7px
938
+ background: var(--bgPrimary)
939
+ box-shadow: 0 8px 16px 0 rgba(0, 0, 0, .1)
940
+ position: absolute
941
+ z-index: 999
942
+ top: 100%
943
+ left: 0
944
+
945
+ li
946
+ @extend .t-xs
947
+ border-bottom: 1px solid var(--borderSoft)
948
+ padding: 12px 8px 11px
949
+ display: flex
950
+ align-items: center
951
+ gap: 12px
952
+ cursor: pointer
953
+ transition: background 150ms
954
+
955
+ // Phone-sized: desktop's row height turns five results into most of the
956
+ // screen.
957
+ @media (max-width: 600px)
958
+ padding: 9px 8px 8px
959
+
960
+ p
961
+ flex: 1
962
+ overflow: hidden
963
+ text-overflow: ellipsis
964
+ white-space: nowrap
965
+
966
+ img
967
+ width: auto
968
+ max-height: 24px
969
+
970
+ // A label with a second line under it: the row keeps its height.
971
+ &:has(.option-text)
972
+ padding: 6px 8px 5px
973
+
974
+ .option-text
975
+ flex: 1
976
+ min-width: 0
977
+ display: flex
978
+ flex-direction: column
979
+
980
+ p
981
+ flex: none
982
+
983
+ .description
984
+ color: var(--textSoft)
985
+
986
+ // The row the keyboard is on reads like the hovered one.
987
+ &:hover,
988
+ &.active
989
+ background: var(--bgSoft)
990
+
991
+ // Section headings group the rows under them; they are read, not picked.
992
+ &.section
993
+ @extend .t-xxs
994
+ padding: 12px 8px 6px
995
+ border-bottom: none
996
+ color: var(--textSoft)
997
+ font-weight: 600
998
+ cursor: default
999
+
1000
+ &:hover
1001
+ background: none
1002
+
1003
+ // Grouped lists (recent searches, then popular places) get the room to
1004
+ // show more than one group before scrolling.
1005
+ &.sectioned
1006
+ max-height: min(330px, 60vh)
1007
+
1008
+ // A select's list, with its search or without: every row's line runs
1009
+ // edge to edge, as the search's does, its text in line with the
1010
+ // search's, and the last row closes on the list's own border.
1011
+ &.searchable,
1012
+ &.choices
1013
+ padding: 0
1014
+
1015
+ > li
1016
+ padding-left: 15px
1017
+ padding-right: 15px
1018
+
1019
+ > li:last-child
1020
+ border-bottom: none
1021
+
1022
+ // A select's list without a search has at most seven options (from eight
1023
+ // it gets one): it shows them all instead of scrolling the last away.
1024
+ &.choices
1025
+ max-height: min(360px, 60vh)
1026
+
1027
+ // With its own search the field stays on top while the rows scroll
1028
+ // under it.
1029
+ &.searchable
1030
+ max-height: min(400px, 60vh)
1031
+
1032
+ // Opened over its anchor (no room under it): the search sits last, next
1033
+ // to the anchor, and stays there while the rows it narrows shorten the
1034
+ // list upward.
1035
+ &[data-side="over"]
1036
+ display: flex
1037
+ flex-direction: column
1038
+
1039
+ > li
1040
+ flex-shrink: 0
1041
+
1042
+ > li.search
1043
+ order: 1
1044
+ top: auto
1045
+ bottom: 0
1046
+ border-bottom: none
1047
+ border-top: 1px solid var(--borderSoft)
1048
+
1049
+ li.search
1050
+ @extend .t-xs
1051
+ border-bottom: 1px solid var(--borderSoft)
1052
+ padding: 12px 15px
1053
+ background: var(--bgPrimary)
1054
+ position: sticky
1055
+ top: 0
1056
+ z-index: 1
1057
+ cursor: text
1058
+
1059
+ &:hover
1060
+ background: var(--bgPrimary)
1061
+
1062
+ .ui-icon
1063
+ flex-shrink: 0
1064
+ color: var(--textSoft)
1065
+
1066
+ input
1067
+ flex: 1
1068
+ min-width: 0
1069
+ border: none
1070
+ padding: 0
1071
+ background: transparent
1072
+ color: var(--highlight)
1073
+ font-family: inherit
1074
+ outline: none
1075
+
1076
+ &::placeholder
1077
+ color: var(--textSoft)
1078
+
1079
+ li.empty
1080
+ @extend .t-xxs
1081
+ border-bottom: none
1082
+ color: var(--textSoft)
1083
+ cursor: default
1084
+
1085
+ &:hover
1086
+ background: none
1087
+ /* End: DROPDOWN */
1088
+
1089
+ /* FILE UPLOAD */
1090
+ .ui-file-input
1091
+ // One height for every state: the box never pulls what is under it.
1092
+ min-height: 180px
1093
+ padding: 20px 16px
1094
+ border-radius: 12px
1095
+ border: 2px dashed var(--borderHard)
1096
+ display: flex
1097
+ align-items: center
1098
+ justify-content: center
1099
+ cursor: pointer
1100
+ transition-property: border-color, background
1101
+ transition-duration: 300ms
1102
+
1103
+ &:hover
1104
+ border-color: var(--borderHighlight)
1105
+
1106
+ // Something held over it: the box answers, the arrow lifts.
1107
+ &.dragging
1108
+ border-style: solid
1109
+ border-color: var(--borderHighlight)
1110
+ background: var(--bgSoft)
1111
+
1112
+ .badge
1113
+ background: var(--bgPrimary)
1114
+ transform: scale(1.15)
1115
+
1116
+ .ui-icon
1117
+ animation: ui-file-input-lift 700ms var(--easeOutExpo) infinite alternate
1118
+
1119
+ &.link
1120
+ cursor: default
1121
+
1122
+ .stage
1123
+ width: 100%
1124
+ display: flex
1125
+ flex-direction: column
1126
+ align-items: center
1127
+ gap: 12px
1128
+ text-align: center
1129
+ animation: ui-file-input-in 240ms var(--easeOutExpo)
1130
+
1131
+ .badge
1132
+ width: 40px
1133
+ height: 40px
1134
+ border-radius: 50%
1135
+ background: var(--bgSoft)
1136
+ color: var(--highlight)
1137
+ display: grid
1138
+ place-items: center
1139
+ transition: transform 300ms var(--easeOutBack), background 300ms
1140
+
1141
+ .words
1142
+ display: flex
1143
+ flex-direction: column
1144
+ min-width: 0
1145
+ max-width: 100%
1146
+
1147
+ .lead
1148
+ @extend .t-xs
1149
+ color: var(--highlight)
1150
+ font-weight: 500
1151
+ overflow-wrap: anywhere
1152
+
1153
+ .hint
1154
+ @extend .t-xxs
1155
+ color: var(--textSoft)
1156
+
1157
+ .actions
1158
+ display: flex
1159
+ flex-wrap: wrap
1160
+ justify-content: center
1161
+ gap: 8px
1162
+
1163
+ // The field and its buttons share one height.
1164
+ .link-row
1165
+ width: 100%
1166
+ display: flex
1167
+ align-items: center
1168
+ gap: 8px
1169
+
1170
+ .ui-text-input
1171
+ flex: 1
1172
+ min-width: 0
1173
+
1174
+ // Browse opens it; it never shows.
1175
+ input[type="file"]
1176
+ display: none
1177
+
1178
+ @media (prefers-reduced-motion: reduce)
1179
+ .stage,
1180
+ &.dragging .badge .ui-icon
1181
+ animation: none
1182
+
1183
+ @keyframes ui-file-input-in
1184
+ from
1185
+ opacity: 0
1186
+ transform: translateY(4px)
1187
+
1188
+ @keyframes ui-file-input-lift
1189
+ to
1190
+ transform: translateY(-3px)
1191
+ /* End: FILE UPLOAD */
1192
+
1193
+ /* SIGN IN — the portal's and Octopus's: the card inside the brand photo on a
1194
+ desktop, the native app's plain screen on a phone (the wordmark in the
1195
+ upper half, the field at mid screen, the terms and a full-width pill at
1196
+ the bottom). */
1197
+ .ui-sign-in
1198
+ width: 100%
1199
+ height: 100%
1200
+ background: var(--bgPrimary)
1201
+ display: flex
1202
+ align-items: center
1203
+ justify-content: center
1204
+
1205
+ // The desktop frame: the brand photo around the card.
1206
+ > .frame
1207
+ width: 800px
1208
+ height: 600px
1209
+ border-radius: 24px
1210
+ padding: 8px
1211
+ background: url('/images/login/bg.png') center
1212
+ background-size: cover
1213
+
1214
+ .card
1215
+ position: relative
1216
+ width: 50%
1217
+ height: 100%
1218
+ border-radius: 16px
1219
+ padding: 40px
1220
+ background: var(--bgPrimary)
1221
+ display: flex
1222
+ flex-direction: column
1223
+
1224
+ .corner
1225
+ position: absolute
1226
+ top: 40px
1227
+ right: 40px
1228
+
1229
+ a
1230
+ text-decoration: underline
1231
+ text-underline-offset: 3px
1232
+
1233
+ .logo
1234
+ align-self: flex-start
1235
+ margin-bottom: 64px
1236
+
1237
+ // An agency's mark on the 66px tile Nicer's own logo is drawn on.
1238
+ .logo.agency
1239
+ width: 66px
1240
+ height: 66px
1241
+ border: 1px solid var(--borderSoft)
1242
+ border-radius: 16px
1243
+ overflow: hidden
1244
+
1245
+ h1
1246
+ margin-bottom: 40px
1247
+ font-weight: normal
1248
+
1249
+ .wordmark
1250
+ display: none
1251
+
1252
+ .links
1253
+ display: flex
1254
+ flex-wrap: wrap
1255
+ gap: 12px
1256
+ margin-top: 12px
1257
+
1258
+ button
1259
+ color: inherit
1260
+ text-decoration: underline
1261
+ text-underline-offset: 3px
1262
+ cursor: pointer
1263
+
1264
+ .terms
1265
+ margin: auto 0 24px
1266
+ color: var(--textSoft)
1267
+
1268
+ a
1269
+ text-decoration: underline
1270
+ text-underline-offset: 3px
1271
+
1272
+ .ui-button
1273
+ width: 100%
1274
+
1275
+ @media (max-width: 768px)
1276
+ > .frame
1277
+ width: 100%
1278
+ height: 100%
1279
+ border-radius: 0
1280
+ padding: 0
1281
+ background: none
1282
+
1283
+ .card
1284
+ width: 100%
1285
+ border-radius: 0
1286
+ padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px))
1287
+
1288
+ .corner
1289
+ top: calc(16px + env(safe-area-inset-top, 0px))
1290
+ right: 16px
1291
+
1292
+ .logo,
1293
+ h1
1294
+ display: none
1295
+
1296
+ // The upper half, the wordmark centred in it; the terms below grow to
1297
+ // match, so the field lands at mid screen.
1298
+ .wordmark
1299
+ display: flex
1300
+ flex: 1
1301
+ align-items: center
1302
+ justify-content: center
1303
+
1304
+ img
1305
+ width: 171px
1306
+ height: 40px
1307
+
1308
+ // The native field: 48px, radius 8, a hairline border.
1309
+ .contact
1310
+ input,
1311
+ .ui-select
1312
+ height: 48px
1313
+ border-radius: 8px
1314
+ box-shadow: inset 0 0 0 1px var(--borderSoft)
1315
+
1316
+ &:focus
1317
+ box-shadow: inset 0 0 0 1px var(--borderHighlight)
1318
+
1319
+ // The dial code sits for a 40px field; recentre it in this one.
1320
+ .ui-phone-input button
1321
+ top: 50%
1322
+ left: 10px
1323
+ transform: translateY(-50%)
1324
+ color: var(--textNormal)
1325
+
1326
+ .terms
1327
+ flex: 1
1328
+ display: flex
1329
+ align-items: flex-end
1330
+ justify-content: center
1331
+ margin: 0 0 16px
1332
+ text-align: center
1333
+
1334
+ // The native pill: pale gold to continue, the brand's dark to sign in.
1335
+ .ui-button
1336
+ height: 56px
1337
+ border-radius: 12px
1338
+ background: var(--gold200)
1339
+ color: var(--brandBg)
1340
+
1341
+ &.code-step .ui-button
1342
+ background: var(--brandBg)
1343
+ color: var(--brandHighlight)
1344
+
1345
+ // The wordmark is drawn in dark ink; the dark theme turns it light.
1346
+ .dark .ui-sign-in .wordmark img
1347
+ filter: invert(1)
1348
+ /* End: SIGN IN */
1349
+
1350
+ /* AGENCY MARK — an agency's logo over a neutral tile with its initial; the
1351
+ logo shows once it has loaded, so a broken one leaves the initial. */
1352
+ .ui-agency-mark
1353
+ position: relative
1354
+ flex-shrink: 0
1355
+ width: 32px
1356
+ height: 32px
1357
+ border-radius: 8px
1358
+ overflow: hidden
1359
+ background: var(--bgSoft)
1360
+ color: var(--textSoft)
1361
+ display: flex
1362
+ align-items: center
1363
+ justify-content: center
1364
+
1365
+ .initial
1366
+ font-weight: 600
1367
+
1368
+ img
1369
+ position: absolute
1370
+ inset: 0
1371
+ width: 100%
1372
+ height: 100%
1373
+ object-fit: contain
1374
+ background: var(--bgPrimary)
1375
+ opacity: 0
1376
+ transition: opacity 300ms var(--easeOutExpo)
1377
+
1378
+ &.loaded
1379
+ opacity: 1
1380
+
1381
+ &.s
1382
+ width: 24px
1383
+ height: 24px
1384
+ border-radius: 6px
1385
+
1386
+ // The whole of a tile the host frames (and rounds).
1387
+ &.fill
1388
+ width: 100%
1389
+ height: 100%
1390
+ border-radius: 0
1391
+ /* End: AGENCY MARK */
1392
+
1393
+ /* SIDE NAV — the apps' left rail (SideNav): 72px, open over the page on
1394
+ hover with the pages' names, and Edit menu's rows while editing. */
1395
+ .ui-side-nav-overlay
1396
+ width: 100vw
1397
+ height: 100vh
1398
+ // The modal veil's grey in every brand: --bgHard takes the agency's tint,
1399
+ // which turned this veil the brand's colour.
1400
+ background: var(--gray150)
1401
+ opacity: 0
1402
+ position: fixed
1403
+ z-index: 998
1404
+ top: 0
1405
+ left: 0
1406
+ pointer-events: none
1407
+ transition: opacity 300ms
1408
+
1409
+ .ui-side-nav
1410
+ width: 72px
1411
+ height: 100%
1412
+ overflow-y: auto
1413
+ overflow-x: hidden
1414
+ border-right: 1px solid var(--borderSoft)
1415
+ padding: 20px 19px 92px 20px
1416
+ background: var(--bgPrimary)
1417
+ position: fixed
1418
+ z-index: 999
1419
+ top: 0
1420
+ left: 0
1421
+ transition: width 300ms
1422
+
1423
+ // The agency, and Edit menu's button after its chevron: the open
1424
+ // sidebar is wider by the button and its gap, so the agency's name keeps
1425
+ // the room it had (Avenue Two Travel whole).
1426
+ .side-nav-logo
1427
+ width: 100%
1428
+ display: flex
1429
+ align-items: center
1430
+ gap: 4px
1431
+ margin-bottom: 60px
1432
+
1433
+ // The logo's row up to Edit menu: the switcher's button, or a link with
1434
+ // the mark and its name, a page's gap between them.
1435
+ .side-nav-brand
1436
+ flex: 1
1437
+ min-width: 0
1438
+ display: flex
1439
+ align-items: center
1440
+
1441
+ > button:first-child
1442
+ flex: 1
1443
+ min-width: 0
1444
+
1445
+ > a
1446
+ flex: 1
1447
+ min-width: 0
1448
+ display: flex
1449
+ align-items: center
1450
+ gap: 20px
1451
+
1452
+ .label
1453
+ flex: 1
1454
+ min-width: 0
1455
+ overflow: hidden
1456
+ text-overflow: ellipsis
1457
+ white-space: nowrap
1458
+ color: var(--textNormal)
1459
+
1460
+ // There with the labels only, as the sidebar opens, or while the
1461
+ // keyboard is on it. Not a click's focus: Done kept it, and the
1462
+ // closed rail showed the button over the agency's logo.
1463
+ .nav-edit-toggle
1464
+ display: flex
1465
+ flex-shrink: 0
1466
+ margin-left: auto
1467
+ opacity: 0
1468
+ transition: opacity 300ms
1469
+
1470
+ &:has(:focus-visible)
1471
+ opacity: 1
1472
+
1473
+ // Bare beside the chevron, the kit's soft ground under the pointer;
1474
+ // its ring only as Done, so the check doesn't read as the chevron's.
1475
+ .ui-icon-button:not([aria-pressed="true"])
1476
+ box-shadow: none
1477
+
1478
+ // The lone logo only: the agency switcher frames its own, and this rule
1479
+ // rounded the logo inside that frame past the frame's corners.
1480
+ .side-nav-brand > a > img,
1481
+ .side-nav-brand > a > .ui-agency-mark
1482
+ border-radius: 8px
1483
+ box-shadow: 0 16px 16px -8px rgba(0, 0, 0, .4)
1484
+
1485
+ // While editing, the hint and Reset: in the room under the logo, over
1486
+ // the pages' end, so the pages start where they did.
1487
+ .nav-tools
1488
+ height: 28px
1489
+ margin: -44px 0 16px
1490
+ display: flex
1491
+ align-items: center
1492
+ justify-content: flex-end
1493
+ gap: 4px
1494
+
1495
+ .hint
1496
+ flex: 1
1497
+ min-width: 0
1498
+ color: var(--textSoft)
1499
+ white-space: nowrap
1500
+
1501
+ .tool
1502
+ display: flex
1503
+
1504
+ #menu
1505
+ display: flex
1506
+ flex-direction: column
1507
+ gap: 24px
1508
+
1509
+ .disabled
1510
+ opacity: .25
1511
+ pointer-events: none
1512
+
1513
+ // A page while editing: taken anywhere but its eye and dragged where
1514
+ // it stands; a hidden one softer.
1515
+ .nav-row
1516
+ cursor: grab
1517
+ touch-action: none
1518
+ user-select: none
1519
+
1520
+ .nav-grip
1521
+ position: absolute
1522
+ top: 50%
1523
+ left: 5px
1524
+ transform: translateY(-50%)
1525
+ display: flex
1526
+ color: var(--textSoft)
1527
+ transition: color 150ms
1528
+
1529
+ &:hover .nav-grip,
1530
+ &.held .nav-grip
1531
+ color: var(--highlight)
1532
+
1533
+ // The page's mark and name take the row, its eye at the end (the
1534
+ // eye's tooltip wraps it in its own box).
1535
+ .nav-content
1536
+ flex: 1
1537
+
1538
+ .eye
1539
+ display: flex
1540
+ flex-shrink: 0
1541
+
1542
+ &.off .nav-content
1543
+ opacity: .4
1544
+
1545
+ // In hand: its copy follows the pointer (liftRow), and the row
1546
+ // shows as the empty place it will drop into, as a board's slot.
1547
+ // Both take 8px of the gap above and below (SideNav's NAV_ROW_PAD),
1548
+ // the room the row's mark is drawn without, so the rows around
1549
+ // stay where they are.
1550
+ &.held
1551
+ height: 48px
1552
+ margin-block: -8px
1553
+ border-radius: 8px
1554
+ background: var(--bgSoft)
1555
+ outline: 1px dashed var(--borderHard)
1556
+ outline-offset: -1px
1557
+ cursor: grabbing
1558
+
1559
+ > *
1560
+ visibility: hidden
1561
+
1562
+ // While a page is in hand, only it reads as held.
1563
+ &.sorting .nav-row:not(.held):hover p
1564
+ color: var(--textSoft)
1565
+
1566
+ a,
1567
+ .nav-row
1568
+ width: calc(100% + 20px)
1569
+ height: 32px
1570
+ overflow: hidden
1571
+ padding-right: 20px
1572
+ display: flex
1573
+ align-items: center
1574
+ gap: 20px
1575
+ position: relative
1576
+
1577
+ .nav-content
1578
+ display: inline-flex
1579
+ align-items: center
1580
+ gap: 20px
1581
+ min-width: 0
1582
+
1583
+ .nav-icon-wrapper
1584
+ position: relative
1585
+ flex-shrink: 0
1586
+
1587
+ .nav-badge
1588
+ position: absolute
1589
+ top: -4px
1590
+ right: -4px
1591
+ min-width: 16px
1592
+ height: 16px
1593
+ padding: 0 4px
1594
+ border-radius: 8px
1595
+ background: var(--negative500)
1596
+ border: 1px solid var(--bgPrimary)
1597
+ color: var(--gray50)
1598
+ font-weight: 700
1599
+ line-height: 12px
1600
+ display: flex
1601
+ align-items: center
1602
+ justify-content: center
1603
+
1604
+ .ui-icon
1605
+ flex-shrink: 0
1606
+ margin: 4px
1607
+
1608
+ p
1609
+ flex: 1
1610
+ padding-right: 8px
1611
+ color: var(--textSoft)
1612
+ white-space: nowrap
1613
+ display: flex
1614
+ align-items: center
1615
+ justify-content: space-between
1616
+ gap: 8px
1617
+ transition: color 300ms
1618
+
1619
+ &:hover
1620
+ p
1621
+ color: var(--highlight)
1622
+
1623
+ &.active
1624
+ p
1625
+ color: var(--highlight)
1626
+
1627
+ &::after
1628
+ content: ''
1629
+ width: 2px
1630
+ height: 100%
1631
+ border-radius: 1px
1632
+ background: var(--highlight)
1633
+ position: absolute
1634
+ top: 0
1635
+ right: 0
1636
+
1637
+ // Editing, a row reaches into the sidebar's left margin with its grip
1638
+ // there, so the pages' marks stay where they were. After the rule
1639
+ // above, whose width it widens.
1640
+ .nav-row
1641
+ margin-left: -18px
1642
+ padding-left: 18px
1643
+ width: calc(100% + 38px)
1644
+
1645
+ figure
1646
+ width: 100%
1647
+ height: 1px
1648
+ background-color: var(--borderSoft)
1649
+
1650
+ .ui-spinner
1651
+ background-color: transparent
1652
+
1653
+ // Open, it lies over the page (the layout keeps the closed rail's room),
1654
+ // so its width moves nothing else. 240px, and Edit menu's button and gap.
1655
+ &:hover,
1656
+ &.expanded
1657
+ width: 272px
1658
+
1659
+ .side-nav-logo .nav-edit-toggle
1660
+ opacity: 1
1661
+
1662
+ & + .ui-side-nav-overlay
1663
+ opacity: .8
1664
+
1665
+ // Dark: the dark grey --bgHard is without a brand.
1666
+ .dark .ui-side-nav-overlay
1667
+ background: var(--gray800)
1668
+ /* End: SIDE NAV */
1669
+
1670
+ /* INPUTS */
1671
+ // Text input (base)
1672
+ .ui-text-input
1673
+ position: relative
1674
+
1675
+ input,
1676
+ textarea
1677
+ @extend .t-xs
1678
+ // Form controls don't inherit the page's font: a textarea fell back to
1679
+ // the browser's monospace.
1680
+ font-family: inherit
1681
+ width: 100%
1682
+ height: 40px
1683
+ border-radius: 8px
1684
+ padding: 0 16px
1685
+ background: var(--bgPrimary)
1686
+ box-shadow: inset 0 0 0 1px var(--borderSoft)
1687
+ color: var(--highlight)
1688
+
1689
+ &::placeholder
1690
+ color: var(--highlight)
1691
+ opacity: .5
1692
+
1693
+ &:focus
1694
+ box-shadow: 0 0 0 2px var(--borderMedium)
1695
+
1696
+ &:not(:placeholder-shown) + label
1697
+ @extend .t-xxxs
1698
+ max-width: calc(100% - 24px)
1699
+ padding: 0 4px
1700
+ background: var(--bgPrimary)
1701
+ opacity: 1
1702
+ top: -8px
1703
+ left: 12px
1704
+
1705
+ &:disabled
1706
+ background: var(--bgMedium)
1707
+ box-shadow: none
1708
+ color: var(--textSoft)
1709
+
1710
+ & + label
1711
+ display: none
1712
+
1713
+ // One line inside the field: a label longer than a narrow field ends in an
1714
+ // ellipsis instead of wrapping out of it.
1715
+ > label
1716
+ @extend .t-xs
1717
+ max-width: calc(100% - 32px)
1718
+ overflow: hidden
1719
+ text-overflow: ellipsis
1720
+ white-space: nowrap
1721
+ opacity: .5
1722
+ position: absolute
1723
+ top: 8px
1724
+ left: 16px
1725
+ pointer-events: none
1726
+ transition: all 150ms
1727
+
1728
+ .ui-spinner
1729
+ position: absolute
1730
+ top: 12px
1731
+ right: 12px
1732
+
1733
+ &.icon
1734
+ input
1735
+ padding-left: 40px
1736
+
1737
+ &:not(:placeholder-shown) + label
1738
+ left: 36px
1739
+
1740
+ > label
1741
+ max-width: calc(100% - 56px)
1742
+ left: 40px
1743
+
1744
+ .ui-icon
1745
+ opacity: .5
1746
+ position: absolute
1747
+ top: 12px
1748
+ left: 12px
1749
+ pointer-events: none
1750
+
1751
+ > .error
1752
+ padding-top: 8px
1753
+ display: flex
1754
+ align-items: center
1755
+ padding: 8px
1756
+
1757
+ .ui-icon,
1758
+ p
1759
+ color: var(--textNegative)
1760
+
1761
+ // Phone input
1762
+ .ui-phone-input
1763
+ @extend .ui-text-input
1764
+
1765
+ // A named phone field: its name rests on the top border from the start,
1766
+ // where a filled TextInput's label floats, since the dial code takes the
1767
+ // spot inside.
1768
+ &.labelled > label
1769
+ @extend .t-xxxs
1770
+ padding: 0 4px
1771
+ background: var(--bgPrimary)
1772
+ opacity: 1
1773
+ top: -8px
1774
+ left: 12px
1775
+
1776
+ // Disabled keeps its chevron, softened like a disabled date input's icon,
1777
+ // so the number stays where it was.
1778
+ input:disabled + button
1779
+ color: var(--textSoft)
1780
+ pointer-events: none
1781
+
1782
+ button
1783
+ height: 24px
1784
+ border-radius: 4px
1785
+ padding: 0 8px
1786
+ color: var(--highlight)
1787
+ display: flex
1788
+ align-items: center
1789
+ gap: 8px
1790
+ position: absolute
1791
+ top: 8px
1792
+ left: 8px
1793
+ cursor: pointer
1794
+ transition: background 300ms
1795
+
1796
+ .ui-icon
1797
+ opacity: .5
1798
+
1799
+ &:hover
1800
+ background: var(--bgSoft)
1801
+
1802
+ // Date input
1803
+ .ui-date-input
1804
+ @extend .ui-text-input
1805
+
1806
+ input
1807
+ cursor: text
1808
+
1809
+ &:disabled + button
1810
+ pointer-events: none
1811
+
1812
+ .ui-icon
1813
+ color: var(--textSoft)
1814
+
1815
+ > label
1816
+ @extend .t-xxxs
1817
+ padding: 0 4px
1818
+ background: var(--bgPrimary)
1819
+ opacity: 1
1820
+ top: -8px
1821
+ left: 12px
1822
+
1823
+ > button
1824
+ width: 32px
1825
+ height: 32px
1826
+ border-radius: 4px
1827
+ position: absolute
1828
+ top: 4px
1829
+ right: 4px
1830
+ cursor: pointer
1831
+ transition: background 300ms
1832
+
1833
+ &:hover
1834
+ background: var(--bgSoft)
1835
+
1836
+ .ui-calendar
1837
+ position: absolute
1838
+ top: 50%
1839
+ left: 50%
1840
+ transform: translate(-50%, -50%)
1841
+
1842
+ // Time input
1843
+ .ui-time-input
1844
+ @extend .ui-text-input
1845
+
1846
+ input
1847
+ display: flex
1848
+ align-items: center
1849
+
1850
+ &::-webkit-datetime-edit,
1851
+ &::-webkit-datetime-edit-hour-field,
1852
+ &::-webkit-datetime-edit-minute-field
1853
+ padding: 0
1854
+
1855
+ &::-webkit-datetime-edit-ampm-field,
1856
+ &::-webkit-calendar-picker-indicator
1857
+ display: none
1858
+
1859
+ .ui-toggle
1860
+ width: 80px
1861
+ position: absolute
1862
+ top: 8px
1863
+ right: 8px
1864
+
1865
+ // Number input
1866
+ .ui-number-input
1867
+ @extend .ui-text-input
1868
+
1869
+ input
1870
+ padding-inline: 40px
1871
+ text-align: center
1872
+
1873
+ // The stepper buttons overlap the field's edges, so the text input's
1874
+ // OUTER focus ring bled out from behind them — keep this one's inset.
1875
+ &:focus
1876
+ box-shadow: inset 0 0 0 2px var(--borderMedium)
1877
+
1878
+ &:disabled
1879
+ & + .ui-nav-button,
1880
+ & + .ui-nav-button + .ui-nav-button
1881
+ display: none
1882
+
1883
+ .ui-nav-button
1884
+ position: absolute
1885
+ z-index: 1
1886
+ top: 10px
1887
+
1888
+ &:first-of-type
1889
+ left: 10px
1890
+
1891
+ &:last-of-type
1892
+ right: 10px
1893
+
1894
+ // An empty field reads its label inside, past the minus button; with a
1895
+ // number it moves to the border, as a text input's.
1896
+ > label
1897
+ max-width: calc(100% - 88px)
1898
+ left: 44px
1899
+
1900
+ // Price input
1901
+ .ui-price-input
1902
+ @extend .ui-text-input
1903
+
1904
+ input
1905
+ text-align: right
1906
+
1907
+ &:disabled + .ui-select
1908
+ padding-right: 8px
1909
+ background: transparent
1910
+ color: var(--textSoft)
1911
+ pointer-events: none
1912
+
1913
+ b
1914
+ @extend .t-xs
1915
+ position: absolute
1916
+ top: 8px
1917
+ left: 16px
1918
+ pointer-events: none
1919
+
1920
+ // The currency, a compact select inside the field's left edge.
1921
+ .ui-select
1922
+ @extend .t-xs
1923
+ width: auto
1924
+ height: 24px
1925
+ border-radius: 4px
1926
+ padding: 0 24px 0 8px
1927
+ background: url('../assets/dropdown-black.svg') right 8px top 8px no-repeat
1928
+ box-shadow: none
1929
+ position: absolute
1930
+ top: 8px
1931
+ left: 8px
1932
+ transition: background-color 300ms
1933
+
1934
+ &:hover
1935
+ background-color: var(--bgSoft)
1936
+
1937
+ .dark
1938
+ .ui-price-input
1939
+ .ui-select
1940
+ background-image: url('../assets/dropdown-white.svg')
1941
+
1942
+ // Payment input
1943
+ .ui-card-input
1944
+ width: 100%
1945
+ height: 40px
1946
+ border-radius: 8px
1947
+ overflow: hidden
1948
+ background: var(--bgPrimary)
1949
+ box-shadow: inset 0 0 0 1px var(--borderSoft)
1950
+ color: var(--highlight)
1951
+ display: flex
1952
+ position: relative
1953
+
1954
+ &::placeholder
1955
+ color: var(--highlight)
1956
+ opacity: .5
1957
+
1958
+ &.focus
1959
+ box-shadow: 0 0 0 2px var(--borderMedium)
1960
+
1961
+ img
1962
+ width: 24px
1963
+ height: 16px
1964
+ position: absolute
1965
+ top: 12px
1966
+ left: 12px
1967
+
1968
+ input
1969
+ @extend .t-xs
1970
+ height: 100%
1971
+ background: transparent
1972
+
1973
+ &:nth-child(2)
1974
+ width: 60%
1975
+ padding-left: 48px
1976
+
1977
+ &:nth-child(3),
1978
+ &:last-child
1979
+ width: 20%
1980
+
1981
+ &.without-cvv input:last-child
1982
+ width: 40%
1983
+
1984
+ &.disabled
1985
+ background: var(--bgMedium)
1986
+ box-shadow: none
1987
+ color: var(--textSoft)
1988
+ pointer-events: none
1989
+
1990
+ // Autocomplete
1991
+ .ui-autocomplete
1992
+ position: relative
1993
+
1994
+ .ui-spinner
1995
+ position: absolute
1996
+ top: 12px
1997
+ right: 12px
1998
+
1999
+ // Text area
2000
+ .ui-text-area
2001
+ @extend .ui-text-input
2002
+
2003
+ textarea
2004
+ @extend .no-scrollbar
2005
+ height: 120px
2006
+ resize: none
2007
+ padding: 8px 16px
2008
+
2009
+ // Grows with its text (TextArea's autoGrow sets the height): from about
2010
+ // two lines to 300px, then it scrolls.
2011
+ &.auto-grow textarea
2012
+ min-height: 72px
2013
+ max-height: 300px
2014
+ overflow-y: auto
2015
+ /* End: INPUTS */
2016
+
2017
+ /* MODAL */
2018
+ .ui-modal
2019
+ @extend .no-scrollbar
2020
+ width: 400px
2021
+ // Long content (forms, lists) scrolls inside the box instead of pushing
2022
+ // it past the viewport — desktop had no ceiling at all.
2023
+ max-height: calc(100dvh - 96px)
2024
+ border-radius: 24px
2025
+ overflow-y: auto
2026
+ overflow-x: hidden
2027
+ border: 1px solid var(--borderMedium)
2028
+ padding: 15px
2029
+ background: var(--bgPrimary)
2030
+ display: flex
2031
+ flex-direction: column
2032
+ gap: 48px
2033
+
2034
+ &.no-content
2035
+ gap: 10px
2036
+
2037
+ > header
2038
+ padding: 8px 8px 0
2039
+ display: flex
2040
+ gap: 16px
2041
+
2042
+ h6
2043
+ flex: 1
2044
+ word-break: break-all
2045
+
2046
+ .ui-nav-button
2047
+ flex-shrink: 0
2048
+ margin-top: 4px
2049
+
2050
+ > div
2051
+ flex-grow: 1
2052
+ min-height: 0
2053
+ padding: 0 8px
2054
+
2055
+ > .ui-button
2056
+ width: 100%
2057
+
2058
+ // Phone-sized: the fixed 400px box overflowed a 375px screen and sat flush
2059
+ // against the edges, and 48px of gap made every modal feel oversized.
2060
+ // Nothing to opt into — the modal adapts to the viewport it's in.
2061
+ @media (max-width: 600px)
2062
+ width: 100%
2063
+ max-width: calc(100vw - 32px)
2064
+ max-height: calc(100dvh - 96px)
2065
+ border-radius: 20px
2066
+ gap: 28px
2067
+ padding: 12px
2068
+
2069
+ > header
2070
+ padding: 6px 6px 0
2071
+
2072
+ h6
2073
+ word-break: normal
2074
+ overflow-wrap: anywhere
2075
+
2076
+ > div
2077
+ padding: 0 6px
2078
+ /* End: MODAL */
2079
+
2080
+ /* NAV BUTTON */
2081
+ .ui-nav-button
2082
+ border-radius: 50%
2083
+ background: var(--bgSoft)
2084
+ color: var(--highlight)
2085
+ display: flex
2086
+ align-items: center
2087
+ justify-content: center
2088
+ cursor: pointer
2089
+ transition: background 300ms
2090
+
2091
+ &.l
2092
+ width: 40px
2093
+ height: 40px
2094
+
2095
+ &.s
2096
+ width: 20px
2097
+ height: 20px
2098
+
2099
+ &:hover
2100
+ background: var(--bgMedium)
2101
+ /* End: NAV BUTTON */
2102
+
2103
+ /* OVERLAY */
2104
+ .ui-overlay
2105
+ width: 100vw
2106
+ height: 100vh
2107
+ background: rgba(217, 217, 217, .9)
2108
+ display: flex
2109
+ align-items: center
2110
+ justify-content: center
2111
+ position: fixed
2112
+ z-index: 1000
2113
+ top: 0
2114
+ left: 0
2115
+ animation: overlay 300ms var(--easeOutBack) forwards
2116
+
2117
+ @keyframes overlay
2118
+ from
2119
+ transform: scale(0.75)
2120
+ opacity: 0
2121
+
2122
+ to
2123
+ transform: none
2124
+ opacity: 1
2125
+
2126
+ > figure
2127
+ width: 100%
2128
+ height: 100%
2129
+ position: absolute
2130
+ z-index: -1
2131
+ top: 0
2132
+ left: 0
2133
+
2134
+ .dark
2135
+ .ui-overlay
2136
+ background: rgba(64, 64, 64, .9)
2137
+ /* End: OVERLAY */
2138
+
2139
+ /* PAGINATOR */
2140
+ .ui-paginator
2141
+ @extend .t-xxs
2142
+ color: var(--textNormal)
2143
+ display: flex
2144
+ gap: 24px
2145
+
2146
+ p
2147
+ white-space: nowrap
2148
+
2149
+ > :first-child
2150
+ display: flex
2151
+ gap: 8px
2152
+
2153
+ // The page stays the device's own select: the paginator floats at the
2154
+ // screen's bottom, where a list would open off it, and a page is never
2155
+ // searched for.
2156
+ select
2157
+ @extend .t-xxs
2158
+ height: 20px
2159
+ border-radius: 10px
2160
+ background: var(--bgSoft) url('../assets/dropdown-black.svg') right 8px center no-repeat
2161
+ padding-inline: 8px 20px
2162
+ cursor: pointer
2163
+ transition: 300ms
2164
+
2165
+ &:hover
2166
+ background-color: var(--bgMedium)
2167
+
2168
+ > :last-child
2169
+ display: flex
2170
+ gap: 12px
2171
+
2172
+ .dark
2173
+ .ui-paginator
2174
+ > :first-child
2175
+ select
2176
+ background-image: url('../assets/dropdown-white.svg')
2177
+ /* End: PAGINATOR */
2178
+
2179
+ /* SELECT */
2180
+ .ui-select
2181
+ @extend .t-xs
2182
+ width: 100%
2183
+ height: 40px
2184
+ border-radius: 8px
2185
+ padding: 0 16px
2186
+ background: var(--bgPrimary) url('../assets/dropdown-black.svg') right 15px top 15px no-repeat
2187
+ box-shadow: inset 0 0 0 1px var(--borderSoft)
2188
+ cursor: pointer
2189
+ transition: border-color 150ms
2190
+
2191
+ &:focus
2192
+ box-shadow: 0 0 0 2px var(--borderMedium)
2193
+
2194
+ // Unanswered, it shows its placeholder muted like an input's, so the
2195
+ // question never reads as its own answer.
2196
+ &:has(> option:disabled:checked)
2197
+ color: var(--textSoft)
2198
+
2199
+ option
2200
+ color: var(--highlight)
2201
+
2202
+ &:disabled
2203
+ color: var(--textSoft)
2204
+
2205
+ &:disabled
2206
+ background: var(--bgMedium) !important
2207
+ box-shadow: none
2208
+ color: var(--textSoft)
2209
+ pointer-events: none
2210
+
2211
+ // A select drawn as a button that opens the app's own list (Select's
2212
+ // ListSelect): the same box, the choice trailing off before the chevron,
2213
+ // the placeholder muted until answered.
2214
+ .ui-select.list-select
2215
+ border: none
2216
+ padding-right: 40px
2217
+ color: var(--highlight)
2218
+ font-family: inherit
2219
+ text-align: left
2220
+ display: flex
2221
+ align-items: center
2222
+
2223
+ &.unanswered
2224
+ color: var(--textSoft)
2225
+
2226
+ &.read-only
2227
+ pointer-events: none
2228
+
2229
+ &[aria-expanded="true"]
2230
+ box-shadow: 0 0 0 2px var(--borderMedium)
2231
+
2232
+ .list-select-text
2233
+ min-width: 0
2234
+ overflow: hidden
2235
+ text-overflow: ellipsis
2236
+ white-space: nowrap
2237
+
2238
+ // What a list select posts with its form, and what keeps a required one
2239
+ // from posting empty: in the page for the browser to point at, never seen.
2240
+ .list-select-value
2241
+ position: absolute
2242
+ width: 1px
2243
+ height: 1px
2244
+ opacity: 0
2245
+ pointer-events: none
2246
+
2247
+ // A toolbar's select ("Sorted by", "Currency"): its choice underlined, the
2248
+ // chevron after it, as wide as what it reads. Native or the app's list.
2249
+ .ui-select.standard
2250
+ @extend .t-xxs
2251
+ width: auto
2252
+ height: auto
2253
+ border-radius: 0
2254
+ padding: 0 12px 0 0
2255
+ border-bottom: 1px solid var(--highlight)
2256
+ background: url('../assets/dropdown-black.svg') right center no-repeat
2257
+ box-shadow: none
2258
+ color: var(--highlight)
2259
+ field-sizing: content
2260
+
2261
+ &:focus,
2262
+ &[aria-expanded="true"]
2263
+ box-shadow: none
2264
+
2265
+ &.list-select
2266
+ display: inline-flex
2267
+ border-bottom: 1px solid var(--highlight)
2268
+
2269
+ // Busy or off: the same text and chevron, muted, never the form's grey box.
2270
+ &:disabled
2271
+ background: url('../assets/dropdown-black.svg') right center no-repeat !important
2272
+ border-bottom-color: var(--borderMedium)
2273
+ color: var(--textSoft)
2274
+
2275
+ .dark
2276
+ .ui-select.standard:disabled
2277
+ background-image: url('../assets/dropdown-white.svg') !important
2278
+
2279
+ .dark
2280
+ .ui-select
2281
+ background-image: url('../assets/dropdown-white.svg')
2282
+ /* End: SELECT */
2283
+
2284
+ /* SEPARATOR */
2285
+ .ui-separator
2286
+ background: var(--borderSoft)
2287
+
2288
+ &.vertical
2289
+ width: 1px !important
2290
+
2291
+ &.horizontal
2292
+ height: 1px !important
2293
+ /* End: SEPARATOR */
2294
+
2295
+ /* SLIDER */
2296
+ .ui-slider
2297
+ height: 20px
2298
+ position: relative
2299
+
2300
+ &::before
2301
+ content: ''
2302
+ width: 100%
2303
+ height: 4px
2304
+ border-radius: 4px
2305
+ background: var(--borderMedium)
2306
+ position: absolute
2307
+ top: 8px
2308
+ left: 0
2309
+
2310
+ figure
2311
+ height: 4px
2312
+ margin: 0
2313
+ border-radius: 2px
2314
+ background: var(--highlight)
2315
+ position: absolute
2316
+ top: 8px
2317
+
2318
+ input
2319
+ width: 100%
2320
+ height: 4px
2321
+ background: transparent
2322
+ position: absolute
2323
+ top: 8px
2324
+ left: 0
2325
+ margin: 0
2326
+ pointer-events: none
2327
+ // Without it WebKit keeps its native thumb and ignores the one below.
2328
+ -webkit-appearance: none
2329
+ appearance: none
2330
+
2331
+ &::-ms-track
2332
+ opacity: 0
2333
+
2334
+ &::-webkit-slider-thumb
2335
+ -webkit-appearance: none
2336
+ appearance: none
2337
+ width: 20px
2338
+ height: 20px
2339
+ border-radius: 50%
2340
+ border: 1px solid var(--borderHard)
2341
+ background: var(--bgPrimary)
2342
+ box-shadow: 0 4px 8px 0 rgba(0, 0, 0, .1)
2343
+ cursor: pointer
2344
+ pointer-events: all
2345
+
2346
+ &::-moz-range-thumb
2347
+ width: 20px
2348
+ height: 20px
2349
+ border-radius: 50%
2350
+ border: 1px solid var(--borderHard)
2351
+ background: var(--bgPrimary)
2352
+ box-shadow: 0 4px 8px 0 rgba(0, 0, 0, .1)
2353
+ cursor: pointer
2354
+ pointer-events: all
2355
+
2356
+ &::-ms-thumb
2357
+ width: 20px
2358
+ height: 20px
2359
+ border-radius: 50%
2360
+ border: 1px solid var(--borderHard)
2361
+ background: var(--bgPrimary)
2362
+ box-shadow: 0 4px 8px 0 rgba(0, 0, 0, .1)
2363
+ cursor: pointer
2364
+ pointer-events: all
2365
+ /* End: SLIDER */
2366
+
2367
+ /* SPINNER */
2368
+ .ui-spinner
2369
+ width: 24px
2370
+ height: 24px
2371
+ background-color: currentColor
2372
+ -webkit-mask-image: url(../assets/spinner-black.png)
2373
+ -webkit-mask-repeat: no-repeat
2374
+ -webkit-mask-size: contain
2375
+ mask-image: url(../assets/spinner-black.png)
2376
+ mask-repeat: no-repeat
2377
+ mask-size: contain
2378
+ animation: spinner linear 300ms infinite
2379
+
2380
+ @keyframes spinner
2381
+ to
2382
+ transform: rotate(360deg)
2383
+
2384
+ /* End: SPINNER */
2385
+
2386
+ /* SWITCH */
2387
+ .ui-switch
2388
+ background: var(--bgSoft)
2389
+ box-shadow: inset 0 0 0 1px var(--bgHard)
2390
+ position: relative
2391
+ cursor: pointer
2392
+ transition: background 300ms
2393
+
2394
+ &::after
2395
+ content: ''
2396
+ border-radius: 50%
2397
+ background: white
2398
+ position: absolute
2399
+ transition: left 300ms var(--easeOutBack)
2400
+
2401
+ &.l
2402
+ width: 48px
2403
+ height: 32px
2404
+ border-radius: 16px
2405
+
2406
+ &::after
2407
+ width: 16px
2408
+ height: 16px
2409
+ box-shadow: 0 4px 8px 0 rgba(0, 0, 0, .2)
2410
+ top: 8px
2411
+ left: 8px
2412
+
2413
+ &.checked::after
2414
+ left: 24px
2415
+
2416
+ &.s
2417
+ width: 36px
2418
+ height: 24px
2419
+ border-radius: 12px
2420
+
2421
+ &::after
2422
+ width: 12px
2423
+ height: 12px
2424
+ box-shadow: 0 3px 6px 0 rgba(0, 0, 0, .2)
2425
+ top: 6px
2426
+ left: 6px
2427
+
2428
+ &.checked::after
2429
+ left: 18px
2430
+
2431
+ &:hover
2432
+ background: var(--bgMedium)
2433
+
2434
+ &:focus
2435
+ box-shadow: 0 0 0 2px var(--borderMedium)
2436
+
2437
+ &.checked
2438
+ background: var(--brandBg)
2439
+ box-shadow: none
2440
+
2441
+ &:disabled
2442
+ background: var(--bgHard)
2443
+ box-shadow: none
2444
+ pointer-events: none
2445
+
2446
+ &::after
2447
+ background: var(--textSoft)
2448
+ box-shadow: none
2449
+ /* End: SWITCH */
2450
+
2451
+ /* TABLE */
2452
+ .ui-table
2453
+ > header
2454
+ border-bottom: 1px solid var(--borderSoft)
2455
+ padding: 10px 20px
2456
+ display: flex
2457
+
2458
+ p,
2459
+ b
2460
+ @extend .t-xxs
2461
+ font-weight: normal !important
2462
+ flex: 1
2463
+
2464
+ &.right
2465
+ text-align: right
2466
+
2467
+ > ul
2468
+ list-style: none
2469
+
2470
+ > li
2471
+ @extend .t-xs
2472
+ min-height: 64px
2473
+ border-bottom: 1px solid var(--borderSoft)
2474
+ padding: 20px
2475
+ display: flex
2476
+ flex-direction: column
2477
+ justify-content: center
2478
+ gap: 8px
2479
+
2480
+ &.dropdown
2481
+ @extend .t-xxs
2482
+ padding-block: 8px
2483
+ background: var(--bgSoft)
2484
+ gap: 4px
2485
+
2486
+ .row
2487
+ display: flex
2488
+ align-items: center
2489
+
2490
+ > div
2491
+ flex: 1
2492
+ color: var(--textNormal)
2493
+ display: flex
2494
+ align-items: center
2495
+ gap: 20px
2496
+
2497
+ &.right
2498
+ justify-content: flex-end
2499
+
2500
+ .actions
2501
+ position: relative
2502
+
2503
+ .ui-actions
2504
+ top: calc(100% + 4px)
2505
+ right: 0
2506
+ /* TABLE */
2507
+
2508
+ /* TABS */
2509
+ .ui-tabs
2510
+ display: flex
2511
+ position: relative
2512
+
2513
+ p
2514
+ position: relative
2515
+ padding: 0 20px 12px
2516
+
2517
+ .count
2518
+ margin-left: 8px
2519
+ padding: 1px 7px
2520
+ border-radius: 999px
2521
+ background: var(--bgSoft)
2522
+ color: var(--textSoft)
2523
+
2524
+ // Something in the tab waits, unsaved: the brand's dot. It sits in the
2525
+ // tab's own right padding, centred on the label's line, so showing it
2526
+ // moves neither the tabs after it nor the underline.
2527
+ .mark
2528
+ position: absolute
2529
+ top: calc(50% - 9px)
2530
+ right: 8px
2531
+ width: 6px
2532
+ height: 6px
2533
+ border-radius: 50%
2534
+ background: var(--brandBg)
2535
+ color: var(--textNormal)
2536
+ cursor: pointer
2537
+ transition: color 300ms
2538
+
2539
+ &:hover,
2540
+ &.active
2541
+ color: var(--highlight)
2542
+
2543
+ figure
2544
+ height: 2px
2545
+ background: var(--highlight)
2546
+ position: absolute
2547
+ bottom: 0
2548
+ transition: all 300ms var(--easeOutExpo)
2549
+ /* End: TABS */
2550
+
2551
+ /* TAG */
2552
+ .ui-tag
2553
+ @extend .t-xxs
2554
+ border-radius: 4px
2555
+ padding-inline: 8px
2556
+ white-space: nowrap
2557
+ display: inline-flex
2558
+ align-items: center
2559
+ gap: 8px
2560
+
2561
+ button
2562
+ display: flex
2563
+ opacity: .5
2564
+ cursor: pointer
2565
+ transition: opacity 150ms
2566
+
2567
+ &:hover
2568
+ opacity: 1
2569
+
2570
+ &.default
2571
+ background: var(--bgSoft)
2572
+ color: var(--textNormal)
2573
+
2574
+ &.positive
2575
+ background: var(--bgPositive)
2576
+ color: var(--textPositive)
2577
+
2578
+ &.warning
2579
+ background: var(--bgWarning)
2580
+ color: var(--textWarning)
2581
+
2582
+ &.negative
2583
+ background: var(--bgNegative)
2584
+ color: var(--textNegative)
2585
+
2586
+ &.disabled
2587
+ background: var(--bgSoft)
2588
+ color: var(--textSoft)
2589
+ /* End: TAG */
2590
+
2591
+ /* TOAST */
2592
+ .ui-toast
2593
+ height: 40px
2594
+ border-radius: 12px
2595
+ border: 1px solid var(--borderHard)
2596
+ padding-inline: 7px
2597
+ background: var(--bgPrimary)
2598
+ box-shadow: 0 8px 16px 0 rgba(0, 0, 0, .1)
2599
+ display: flex
2600
+ align-items: center
2601
+ gap: 16px
2602
+ position: fixed
2603
+ z-index: 1000
2604
+ bottom: 40px
2605
+ left: 50%
2606
+ animation: toast 600ms var(--easeOutBack) forwards
2607
+
2608
+ // A phone gets the full width: sized to its one-line content the toast
2609
+ // squeezed long copy into a tall three-line sliver.
2610
+ @media (max-width: 768px)
2611
+ width: calc(100vw - 32px)
2612
+ height: auto
2613
+ min-height: 40px
2614
+ padding-block: 8px
2615
+
2616
+ p
2617
+ flex: 1
2618
+
2619
+ @keyframes toast
2620
+ from
2621
+ opacity: 0
2622
+ transform: translate(-50%, 100%)
2623
+
2624
+ to
2625
+ opacity: 1
2626
+ transform: translateX(-50%)
2627
+
2628
+ figure,
2629
+ button
2630
+ width: 24px
2631
+ height: 24px
2632
+ border-radius: 4px
2633
+ display: flex
2634
+ align-items: center
2635
+ justify-content: center
2636
+
2637
+ p
2638
+ @extend .t-xxs
2639
+
2640
+ svg
2641
+ width: 24px
2642
+ height: 24px
2643
+
2644
+ path
2645
+ fill: none
2646
+ stroke: var(--highlight)
2647
+ stroke-linecap: round
2648
+ stroke-width: 2px
2649
+ stroke-dashoffset: 44px
2650
+ animation: toggleSVGPath 5s linear forwards
2651
+
2652
+ @keyframes toggleSVGPath
2653
+ from
2654
+ stroke-dasharray: 44px
2655
+
2656
+ to
2657
+ stroke-dasharray: 88px
2658
+
2659
+ button
2660
+ cursor: pointer
2661
+ transition: background 150ms
2662
+
2663
+ &:hover
2664
+ background: rgba(0, 0, 0, .05)
2665
+
2666
+ // Undo and its like: the label underlined after the message, before the
2667
+ // ring.
2668
+ button.action
2669
+ @extend .t-xxs
2670
+ width: auto
2671
+ padding: 0 6px
2672
+ gap: 6px
2673
+ color: var(--highlight)
2674
+ font-weight: 600
2675
+ text-decoration: underline
2676
+ text-underline-offset: 3px
2677
+ white-space: nowrap
2678
+
2679
+ &.info figure
2680
+ background: var(--bgMedium)
2681
+
2682
+ &.success figure
2683
+ background: var(--bgPositive)
2684
+ color: var(--textPositive)
2685
+
2686
+ &.warning figure
2687
+ background: var(--bgWarning)
2688
+ color: var(--textWarning)
2689
+
2690
+ &.error figure
2691
+ background: var(--bgNegative)
2692
+ color: var(--textNegative)
2693
+ /* End: TOAST */
2694
+
2695
+ /* TOOGLE */
2696
+ // Equal columns, each as wide as the longest label: the sliding figure is
2697
+ // one column wide, so a longer label (Agency next to Mine) used to push
2698
+ // its button past the figure and leave both labels off-centre.
2699
+ .ui-toggle
2700
+ overflow: hidden
2701
+ background: var(--bgSoft)
2702
+ // Equal columns: the highlight is one equal part, whatever each label measures.
2703
+ display: grid
2704
+ grid-auto-flow: column
2705
+ grid-auto-columns: 1fr
2706
+ position: relative
2707
+ z-index: 1
2708
+
2709
+ figure
2710
+ background: var(--bgPrimary)
2711
+ box-shadow: 0 0 2px 0 rgba(0, 0, 0, .2)
2712
+ position: absolute
2713
+ z-index: -1
2714
+ transition: transform 300ms var(--easeOutExpo)
2715
+
2716
+ button
2717
+ @extend .t-xxs
2718
+ cursor: pointer
2719
+ transition: color 150ms
2720
+ white-space: nowrap
2721
+ padding-inline: 12px
2722
+
2723
+ &.active
2724
+ pointer-events: none
2725
+
2726
+ &:not(.active)
2727
+ color: var(--textSoft)
2728
+
2729
+ &:hover
2730
+ color: var(--highlight)
2731
+
2732
+ // A view's icon before its name.
2733
+ &.with-icon
2734
+ display: inline-flex
2735
+ align-items: center
2736
+ justify-content: center
2737
+ gap: 6px
2738
+
2739
+ &.xl
2740
+ width: 100%
2741
+ height: 40px
2742
+ border-radius: 12px
2743
+ padding: 4px
2744
+
2745
+ figure
2746
+ height: 32px
2747
+ border-radius: 8px
2748
+ top: 4px
2749
+ left: 4px
2750
+
2751
+ &.l
2752
+ height: 40px
2753
+ border-radius: 12px
2754
+ padding: 4px
2755
+
2756
+ figure
2757
+ height: 32px
2758
+ border-radius: 8px
2759
+ top: 4px
2760
+ left: 4px
2761
+
2762
+ &.s
2763
+ height: 24px
2764
+ border-radius: 6px
2765
+ padding: 2px
2766
+
2767
+ figure
2768
+ height: 20px
2769
+ border-radius: 4px
2770
+ top: 2px
2771
+ left: 2px
2772
+
2773
+ &.disabled
2774
+ background: var(--bgHard)
2775
+ pointer-events: none
2776
+
2777
+ figure
2778
+ background: var(--bgMedium)
2779
+ box-shadow: none
2780
+
2781
+ button
2782
+ &.active
2783
+ color: var(--textNormal)
2784
+ /* End: TOOGLE */
2785
+
2786
+ // REVISAR
2787
+ /* DRAWER */
2788
+ .ui-drawer
2789
+ width: 100vw
2790
+ height: 100vh
2791
+ display: flex
2792
+ flex-direction: column
2793
+ position: fixed
2794
+ z-index: 1000
2795
+ top: 0
2796
+ left: 0
2797
+ animation: drawer 600ms var(--easeOutExpo) forwards
2798
+
2799
+ @keyframes drawer
2800
+ from
2801
+ background: transparent
2802
+
2803
+ to
2804
+ background: rgba(230, 230, 230, .8)
2805
+
2806
+ > figure
2807
+ flex: 1
2808
+ min-height: 80px
2809
+
2810
+ > div
2811
+ border-radius: 16px 16px 0 0
2812
+ padding: 16px 16px 0
2813
+ background: white
2814
+ display: flex
2815
+ flex-direction: column
2816
+ align-items: center
2817
+ gap: 16px
2818
+ animation: drawerDiv 600ms var(--easeOutExpo) forwards
2819
+
2820
+ @keyframes drawerDiv
2821
+ from
2822
+ transform: translateY(100%)
2823
+
2824
+ to
2825
+ transform: none
2826
+
2827
+ &::before
2828
+ flex-shrink: 0
2829
+ content: ''
2830
+ width: 20px
2831
+ height: 1px
2832
+ border-radius: .5px
2833
+ background: var(--gray200)
2834
+
2835
+ > div
2836
+ width: 100%
2837
+
2838
+ &.scrolleable
2839
+ > figure
2840
+ flex: 0
2841
+
2842
+ > div
2843
+ @extend .no-scrollbar
2844
+ flex: 1
2845
+ overflow-y: auto
2846
+
2847
+ // Dark
2848
+ .dark
2849
+ .ui-drawer
2850
+ animation-name: darkDrawer
2851
+
2852
+ @keyframes darkDrawer
2853
+ from
2854
+ background: transparent
2855
+
2856
+ to
2857
+ background: rgba(26, 26, 26, .8)
2858
+
2859
+ > div
2860
+ background: black
2861
+
2862
+ &::before
2863
+ background: var(--gray800)
2864
+ /* End: DRAWER */
2865
+
2866
+ /* TOOLTIP */
2867
+ .ui-tooltip
2868
+ position: relative
2869
+ cursor: help
2870
+
2871
+ &.disabled
2872
+ cursor: inherit
2873
+
2874
+ // On body, fixed: placed by the component in viewport coordinates.
2875
+ .ui-tooltip-bubble
2876
+ position: fixed
2877
+ // Above every popover and card: nothing is meant to sit over a hint.
2878
+ z-index: 1300
2879
+ width: max-content
2880
+ padding: 4px
2881
+ // The border tokens, so an agency's brand tints it like every card and
2882
+ // input; Nicer's own theme keeps gray200 here and gray800 in dark.
2883
+ border: 1px solid var(--borderHard)
2884
+ border-radius: 4px
2885
+ background: var(--bgPrimary)
2886
+ color: var(--highlight)
2887
+ line-height: 1.4
2888
+ overflow-wrap: break-word
2889
+ white-space: normal
2890
+ pointer-events: none
2891
+
2892
+ // Its arrow, pointing at what it is about: a square turned on its corner,
2893
+ // in the bubble's own fill and border, across the gap to the anchor.
2894
+ &[data-side]::before
2895
+ content: ""
2896
+ width: 8px
2897
+ height: 8px
2898
+ border-style: solid
2899
+ border-color: inherit
2900
+ background: inherit
2901
+ position: absolute
2902
+ left: calc(var(--arrow-x) - 5px)
2903
+ rotate: 45deg
2904
+
2905
+ &[data-side="below"]::before
2906
+ top: -5px
2907
+ border-width: 1px 0 0 1px
2908
+
2909
+ &[data-side="above"]::before
2910
+ bottom: -5px
2911
+ border-width: 0 1px 1px 0
2912
+
2913
+ // Dark
2914
+ .dark
2915
+ .ui-tooltip-bubble
2916
+ border-color: var(--borderMedium)
2917
+ /* End: TOOLTIP */