@nicertravel/ui 0.0.0 → 1.3.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,2960 @@
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
+
1752
+ // Field error: what is wrong with a field, the same under every field and
1753
+ // in a field's bubble. The icon sits on the first line when the words wrap.
1754
+ .ui-field-error
1755
+ display: flex
1756
+ align-items: flex-start
1757
+ gap: 4px
1758
+ padding: 8px
1759
+
1760
+ .ui-icon
1761
+ flex: none
1762
+ margin-top: 4px
1763
+
1764
+ .ui-icon,
1765
+ p
1766
+ color: var(--textNegative)
1767
+
1768
+ // Phone input
1769
+ .ui-phone-input
1770
+ @extend .ui-text-input
1771
+
1772
+ // A named phone field: its name rests on the top border from the start,
1773
+ // where a filled TextInput's label floats, since the dial code takes the
1774
+ // spot inside.
1775
+ &.labelled > label
1776
+ @extend .t-xxxs
1777
+ padding: 0 4px
1778
+ background: var(--bgPrimary)
1779
+ opacity: 1
1780
+ top: -8px
1781
+ left: 12px
1782
+
1783
+ // Disabled keeps its chevron, softened like a disabled date input's icon,
1784
+ // so the number stays where it was.
1785
+ input:disabled + button
1786
+ color: var(--textSoft)
1787
+ pointer-events: none
1788
+
1789
+ button
1790
+ height: 24px
1791
+ border-radius: 4px
1792
+ padding: 0 8px
1793
+ color: var(--highlight)
1794
+ display: flex
1795
+ align-items: center
1796
+ gap: 8px
1797
+ position: absolute
1798
+ top: 8px
1799
+ left: 8px
1800
+ cursor: pointer
1801
+ transition: background 300ms
1802
+
1803
+ .ui-icon
1804
+ opacity: .5
1805
+
1806
+ &:hover
1807
+ background: var(--bgSoft)
1808
+
1809
+ // Date input
1810
+ .ui-date-input
1811
+ @extend .ui-text-input
1812
+
1813
+ input
1814
+ cursor: text
1815
+
1816
+ &:disabled + button
1817
+ pointer-events: none
1818
+
1819
+ .ui-icon
1820
+ color: var(--textSoft)
1821
+
1822
+ > label
1823
+ @extend .t-xxxs
1824
+ padding: 0 4px
1825
+ background: var(--bgPrimary)
1826
+ opacity: 1
1827
+ top: -8px
1828
+ left: 12px
1829
+
1830
+ > button
1831
+ width: 32px
1832
+ height: 32px
1833
+ border-radius: 4px
1834
+ position: absolute
1835
+ top: 4px
1836
+ right: 4px
1837
+ cursor: pointer
1838
+ transition: background 300ms
1839
+
1840
+ &:hover
1841
+ background: var(--bgSoft)
1842
+
1843
+ .ui-calendar
1844
+ position: absolute
1845
+ top: 50%
1846
+ left: 50%
1847
+ transform: translate(-50%, -50%)
1848
+
1849
+ // The format while the field has the cursor, in its placeholder's tone:
1850
+ // what is typed covers it from the left (12-DD-YYYY). The component
1851
+ // places it over the text, in the field's own type.
1852
+ > .format
1853
+ display: flex
1854
+ align-items: center
1855
+ color: var(--highlight)
1856
+ opacity: .5
1857
+ white-space: pre
1858
+ position: absolute
1859
+ pointer-events: none
1860
+
1861
+ > span
1862
+ color: transparent
1863
+
1864
+ // Time input
1865
+ .ui-time-input
1866
+ @extend .ui-text-input
1867
+
1868
+ input
1869
+ display: flex
1870
+ align-items: center
1871
+
1872
+ &::-webkit-datetime-edit,
1873
+ &::-webkit-datetime-edit-hour-field,
1874
+ &::-webkit-datetime-edit-minute-field
1875
+ padding: 0
1876
+
1877
+ &::-webkit-datetime-edit-ampm-field,
1878
+ &::-webkit-calendar-picker-indicator
1879
+ display: none
1880
+
1881
+ .ui-toggle
1882
+ width: 80px
1883
+ position: absolute
1884
+ top: 8px
1885
+ right: 8px
1886
+
1887
+ // Number input
1888
+ .ui-number-input
1889
+ @extend .ui-text-input
1890
+
1891
+ input
1892
+ padding-inline: 40px
1893
+ text-align: center
1894
+
1895
+ // The stepper buttons overlap the field's edges, so the text input's
1896
+ // OUTER focus ring bled out from behind them — keep this one's inset.
1897
+ &:focus
1898
+ box-shadow: inset 0 0 0 2px var(--borderMedium)
1899
+
1900
+ &:disabled
1901
+ & + .ui-nav-button,
1902
+ & + .ui-nav-button + .ui-nav-button
1903
+ display: none
1904
+
1905
+ .ui-nav-button
1906
+ position: absolute
1907
+ z-index: 1
1908
+ top: 10px
1909
+
1910
+ &:first-of-type
1911
+ left: 10px
1912
+
1913
+ &:last-of-type
1914
+ right: 10px
1915
+
1916
+ // An empty field reads its label inside, past the minus button; with a
1917
+ // number it moves to the border, as a text input's.
1918
+ > label
1919
+ max-width: calc(100% - 88px)
1920
+ left: 44px
1921
+
1922
+ // Price input
1923
+ .ui-price-input
1924
+ @extend .ui-text-input
1925
+
1926
+ input
1927
+ text-align: right
1928
+
1929
+ &:disabled + .ui-select
1930
+ padding-right: 8px
1931
+ background: transparent
1932
+ color: var(--textSoft)
1933
+ pointer-events: none
1934
+
1935
+ b
1936
+ @extend .t-xs
1937
+ position: absolute
1938
+ top: 8px
1939
+ left: 16px
1940
+ pointer-events: none
1941
+
1942
+ // The currency, a compact select inside the field's left edge.
1943
+ .ui-select
1944
+ @extend .t-xs
1945
+ width: auto
1946
+ height: 24px
1947
+ border-radius: 4px
1948
+ padding: 0 24px 0 8px
1949
+ background: url('../assets/dropdown-black.svg') right 8px top 8px no-repeat
1950
+ box-shadow: none
1951
+ position: absolute
1952
+ top: 8px
1953
+ left: 8px
1954
+ transition: background-color 300ms
1955
+
1956
+ &:hover
1957
+ background-color: var(--bgSoft)
1958
+
1959
+ .dark
1960
+ .ui-price-input
1961
+ .ui-select
1962
+ background-image: url('../assets/dropdown-white.svg')
1963
+
1964
+ // Payment input
1965
+ .ui-card-input
1966
+ width: 100%
1967
+ height: 40px
1968
+ border-radius: 8px
1969
+ overflow: hidden
1970
+ background: var(--bgPrimary)
1971
+ box-shadow: inset 0 0 0 1px var(--borderSoft)
1972
+ color: var(--highlight)
1973
+ display: flex
1974
+ position: relative
1975
+
1976
+ &::placeholder
1977
+ color: var(--highlight)
1978
+ opacity: .5
1979
+
1980
+ &.focus
1981
+ box-shadow: 0 0 0 2px var(--borderMedium)
1982
+
1983
+ img
1984
+ width: 24px
1985
+ height: 16px
1986
+ position: absolute
1987
+ top: 12px
1988
+ left: 12px
1989
+
1990
+ input
1991
+ @extend .t-xs
1992
+ height: 100%
1993
+ background: transparent
1994
+
1995
+ &:nth-child(2)
1996
+ width: 60%
1997
+ padding-left: 48px
1998
+
1999
+ &:nth-child(3),
2000
+ &:last-child
2001
+ width: 20%
2002
+
2003
+ &.without-cvv input:last-child
2004
+ width: 40%
2005
+
2006
+ &.disabled
2007
+ background: var(--bgMedium)
2008
+ box-shadow: none
2009
+ color: var(--textSoft)
2010
+ pointer-events: none
2011
+
2012
+ // Autocomplete
2013
+ .ui-autocomplete
2014
+ position: relative
2015
+
2016
+ .ui-spinner
2017
+ position: absolute
2018
+ top: 12px
2019
+ right: 12px
2020
+
2021
+ // Text area
2022
+ .ui-text-area
2023
+ @extend .ui-text-input
2024
+
2025
+ textarea
2026
+ @extend .no-scrollbar
2027
+ height: 120px
2028
+ resize: none
2029
+ padding: 8px 16px
2030
+
2031
+ // Grows with its text (TextArea's autoGrow sets the height): from about
2032
+ // two lines to 300px, then it scrolls.
2033
+ &.auto-grow textarea
2034
+ min-height: 72px
2035
+ max-height: 300px
2036
+ overflow-y: auto
2037
+ /* End: INPUTS */
2038
+
2039
+ /* MODAL */
2040
+ .ui-modal
2041
+ @extend .no-scrollbar
2042
+ width: 400px
2043
+ // Long content (forms, lists) scrolls inside the box instead of pushing
2044
+ // it past the viewport — desktop had no ceiling at all.
2045
+ max-height: calc(100dvh - 96px)
2046
+ border-radius: 24px
2047
+ overflow-y: auto
2048
+ overflow-x: hidden
2049
+ border: 1px solid var(--borderMedium)
2050
+ padding: 15px
2051
+ background: var(--bgPrimary)
2052
+ display: flex
2053
+ flex-direction: column
2054
+ gap: 48px
2055
+
2056
+ &.no-content
2057
+ gap: 10px
2058
+
2059
+ > header
2060
+ padding: 8px 8px 0
2061
+ display: flex
2062
+ gap: 16px
2063
+
2064
+ h6
2065
+ flex: 1
2066
+ word-break: break-all
2067
+
2068
+ .ui-nav-button
2069
+ flex-shrink: 0
2070
+ margin-top: 4px
2071
+
2072
+ > div
2073
+ flex-grow: 1
2074
+ min-height: 0
2075
+ padding: 0 8px
2076
+
2077
+ > .ui-button
2078
+ width: 100%
2079
+
2080
+ // Phone-sized: the fixed 400px box overflowed a 375px screen and sat flush
2081
+ // against the edges, and 48px of gap made every modal feel oversized.
2082
+ // Nothing to opt into — the modal adapts to the viewport it's in.
2083
+ @media (max-width: 600px)
2084
+ width: 100%
2085
+ max-width: calc(100vw - 32px)
2086
+ max-height: calc(100dvh - 96px)
2087
+ border-radius: 20px
2088
+ gap: 28px
2089
+ padding: 12px
2090
+
2091
+ > header
2092
+ padding: 6px 6px 0
2093
+
2094
+ h6
2095
+ word-break: normal
2096
+ overflow-wrap: anywhere
2097
+
2098
+ > div
2099
+ padding: 0 6px
2100
+ /* End: MODAL */
2101
+
2102
+ /* NAV BUTTON */
2103
+ .ui-nav-button
2104
+ border-radius: 50%
2105
+ background: var(--bgSoft)
2106
+ color: var(--highlight)
2107
+ display: flex
2108
+ align-items: center
2109
+ justify-content: center
2110
+ cursor: pointer
2111
+ transition: background 300ms
2112
+
2113
+ &.l
2114
+ width: 40px
2115
+ height: 40px
2116
+
2117
+ &.s
2118
+ width: 20px
2119
+ height: 20px
2120
+
2121
+ &:hover
2122
+ background: var(--bgMedium)
2123
+ /* End: NAV BUTTON */
2124
+
2125
+ /* OVERLAY */
2126
+ .ui-overlay
2127
+ width: 100vw
2128
+ height: 100vh
2129
+ background: rgba(217, 217, 217, .9)
2130
+ display: flex
2131
+ align-items: center
2132
+ justify-content: center
2133
+ position: fixed
2134
+ z-index: 1000
2135
+ top: 0
2136
+ left: 0
2137
+ animation: overlay 300ms var(--easeOutBack) forwards
2138
+
2139
+ @keyframes overlay
2140
+ from
2141
+ transform: scale(0.75)
2142
+ opacity: 0
2143
+
2144
+ to
2145
+ transform: none
2146
+ opacity: 1
2147
+
2148
+ > figure
2149
+ width: 100%
2150
+ height: 100%
2151
+ position: absolute
2152
+ z-index: -1
2153
+ top: 0
2154
+ left: 0
2155
+
2156
+ .dark
2157
+ .ui-overlay
2158
+ background: rgba(64, 64, 64, .9)
2159
+ /* End: OVERLAY */
2160
+
2161
+ /* PAGINATOR */
2162
+ .ui-paginator
2163
+ @extend .t-xxs
2164
+ color: var(--textNormal)
2165
+ display: flex
2166
+ gap: 24px
2167
+
2168
+ p
2169
+ white-space: nowrap
2170
+
2171
+ > :first-child
2172
+ display: flex
2173
+ gap: 8px
2174
+
2175
+ // The page stays the device's own select: the paginator floats at the
2176
+ // screen's bottom, where a list would open off it, and a page is never
2177
+ // searched for.
2178
+ select
2179
+ @extend .t-xxs
2180
+ height: 20px
2181
+ border-radius: 10px
2182
+ background: var(--bgSoft) url('../assets/dropdown-black.svg') right 8px center no-repeat
2183
+ padding-inline: 8px 20px
2184
+ cursor: pointer
2185
+ transition: 300ms
2186
+
2187
+ &:hover
2188
+ background-color: var(--bgMedium)
2189
+
2190
+ > :last-child
2191
+ display: flex
2192
+ gap: 12px
2193
+
2194
+ .dark
2195
+ .ui-paginator
2196
+ > :first-child
2197
+ select
2198
+ background-image: url('../assets/dropdown-white.svg')
2199
+ /* End: PAGINATOR */
2200
+
2201
+ /* SELECT */
2202
+ .ui-select
2203
+ @extend .t-xs
2204
+ width: 100%
2205
+ height: 40px
2206
+ border-radius: 8px
2207
+ padding: 0 16px
2208
+ background: var(--bgPrimary) url('../assets/dropdown-black.svg') right 15px top 15px no-repeat
2209
+ box-shadow: inset 0 0 0 1px var(--borderSoft)
2210
+ cursor: pointer
2211
+ transition: border-color 150ms
2212
+
2213
+ &:focus
2214
+ box-shadow: 0 0 0 2px var(--borderMedium)
2215
+
2216
+ // Unanswered, it shows its placeholder muted like an input's, so the
2217
+ // question never reads as its own answer.
2218
+ &:has(> option:disabled:checked)
2219
+ color: var(--textSoft)
2220
+
2221
+ option
2222
+ color: var(--highlight)
2223
+
2224
+ &:disabled
2225
+ color: var(--textSoft)
2226
+
2227
+ &:disabled
2228
+ background: var(--bgMedium) !important
2229
+ box-shadow: none
2230
+ color: var(--textSoft)
2231
+ pointer-events: none
2232
+
2233
+ // A select drawn as a button that opens the app's own list (Select's
2234
+ // ListSelect): the same box, the choice trailing off before the chevron,
2235
+ // the placeholder muted until answered.
2236
+ .ui-select.list-select
2237
+ border: none
2238
+ padding-right: 40px
2239
+ color: var(--highlight)
2240
+ font-family: inherit
2241
+ text-align: left
2242
+ display: flex
2243
+ align-items: center
2244
+
2245
+ &.unanswered
2246
+ color: var(--textSoft)
2247
+
2248
+ &.read-only
2249
+ pointer-events: none
2250
+
2251
+ &[aria-expanded="true"]
2252
+ box-shadow: 0 0 0 2px var(--borderMedium)
2253
+
2254
+ .list-select-text
2255
+ min-width: 0
2256
+ overflow: hidden
2257
+ text-overflow: ellipsis
2258
+ white-space: nowrap
2259
+
2260
+ // What a list select posts with its form, and what keeps a required one
2261
+ // from posting empty: in the page for the browser to point at, never seen.
2262
+ .list-select-value
2263
+ position: absolute
2264
+ width: 1px
2265
+ height: 1px
2266
+ opacity: 0
2267
+ pointer-events: none
2268
+
2269
+ // A toolbar's select ("Sorted by", "Currency"): its choice underlined, the
2270
+ // chevron after it, as wide as what it reads. Native or the app's list.
2271
+ .ui-select.standard
2272
+ @extend .t-xxs
2273
+ width: auto
2274
+ height: auto
2275
+ border-radius: 0
2276
+ padding: 0 12px 0 0
2277
+ border-bottom: 1px solid var(--highlight)
2278
+ background: url('../assets/dropdown-black.svg') right center no-repeat
2279
+ box-shadow: none
2280
+ color: var(--highlight)
2281
+ field-sizing: content
2282
+
2283
+ &:focus,
2284
+ &[aria-expanded="true"]
2285
+ box-shadow: none
2286
+
2287
+ &.list-select
2288
+ display: inline-flex
2289
+ border-bottom: 1px solid var(--highlight)
2290
+
2291
+ // Busy or off: the same text and chevron, muted, never the form's grey box.
2292
+ &:disabled
2293
+ background: url('../assets/dropdown-black.svg') right center no-repeat !important
2294
+ border-bottom-color: var(--borderMedium)
2295
+ color: var(--textSoft)
2296
+
2297
+ .dark
2298
+ .ui-select.standard:disabled
2299
+ background-image: url('../assets/dropdown-white.svg') !important
2300
+
2301
+ .dark
2302
+ .ui-select
2303
+ background-image: url('../assets/dropdown-white.svg')
2304
+ /* End: SELECT */
2305
+
2306
+ /* SEPARATOR */
2307
+ .ui-separator
2308
+ background: var(--borderSoft)
2309
+
2310
+ &.vertical
2311
+ width: 1px !important
2312
+
2313
+ &.horizontal
2314
+ height: 1px !important
2315
+ /* End: SEPARATOR */
2316
+
2317
+ /* SLIDER */
2318
+ .ui-slider
2319
+ height: 20px
2320
+ position: relative
2321
+
2322
+ &::before
2323
+ content: ''
2324
+ width: 100%
2325
+ height: 4px
2326
+ border-radius: 4px
2327
+ background: var(--borderMedium)
2328
+ position: absolute
2329
+ top: 8px
2330
+ left: 0
2331
+
2332
+ figure
2333
+ height: 4px
2334
+ margin: 0
2335
+ border-radius: 2px
2336
+ background: var(--highlight)
2337
+ position: absolute
2338
+ top: 8px
2339
+
2340
+ input
2341
+ width: 100%
2342
+ height: 4px
2343
+ background: transparent
2344
+ position: absolute
2345
+ top: 8px
2346
+ left: 0
2347
+ margin: 0
2348
+ pointer-events: none
2349
+ // Without it WebKit keeps its native thumb and ignores the one below.
2350
+ -webkit-appearance: none
2351
+ appearance: none
2352
+
2353
+ &::-ms-track
2354
+ opacity: 0
2355
+
2356
+ &::-webkit-slider-thumb
2357
+ -webkit-appearance: none
2358
+ appearance: none
2359
+ width: 20px
2360
+ height: 20px
2361
+ border-radius: 50%
2362
+ border: 1px solid var(--borderHard)
2363
+ background: var(--bgPrimary)
2364
+ box-shadow: 0 4px 8px 0 rgba(0, 0, 0, .1)
2365
+ cursor: pointer
2366
+ pointer-events: all
2367
+
2368
+ &::-moz-range-thumb
2369
+ width: 20px
2370
+ height: 20px
2371
+ border-radius: 50%
2372
+ border: 1px solid var(--borderHard)
2373
+ background: var(--bgPrimary)
2374
+ box-shadow: 0 4px 8px 0 rgba(0, 0, 0, .1)
2375
+ cursor: pointer
2376
+ pointer-events: all
2377
+
2378
+ &::-ms-thumb
2379
+ width: 20px
2380
+ height: 20px
2381
+ border-radius: 50%
2382
+ border: 1px solid var(--borderHard)
2383
+ background: var(--bgPrimary)
2384
+ box-shadow: 0 4px 8px 0 rgba(0, 0, 0, .1)
2385
+ cursor: pointer
2386
+ pointer-events: all
2387
+ /* End: SLIDER */
2388
+
2389
+ /* SPINNER */
2390
+ .ui-spinner
2391
+ width: 24px
2392
+ height: 24px
2393
+ background-color: currentColor
2394
+ -webkit-mask-image: url(../assets/spinner-black.png)
2395
+ -webkit-mask-repeat: no-repeat
2396
+ -webkit-mask-size: contain
2397
+ mask-image: url(../assets/spinner-black.png)
2398
+ mask-repeat: no-repeat
2399
+ mask-size: contain
2400
+ animation: spinner linear 300ms infinite
2401
+
2402
+ @keyframes spinner
2403
+ to
2404
+ transform: rotate(360deg)
2405
+
2406
+ /* End: SPINNER */
2407
+
2408
+ /* SWITCH */
2409
+ .ui-switch
2410
+ background: var(--bgSoft)
2411
+ box-shadow: inset 0 0 0 1px var(--bgHard)
2412
+ position: relative
2413
+ cursor: pointer
2414
+ transition: background 300ms
2415
+
2416
+ &::after
2417
+ content: ''
2418
+ border-radius: 50%
2419
+ background: white
2420
+ position: absolute
2421
+ transition: left 300ms var(--easeOutBack)
2422
+
2423
+ &.l
2424
+ width: 48px
2425
+ height: 32px
2426
+ border-radius: 16px
2427
+
2428
+ &::after
2429
+ width: 16px
2430
+ height: 16px
2431
+ box-shadow: 0 4px 8px 0 rgba(0, 0, 0, .2)
2432
+ top: 8px
2433
+ left: 8px
2434
+
2435
+ &.checked::after
2436
+ left: 24px
2437
+
2438
+ &.s
2439
+ width: 36px
2440
+ height: 24px
2441
+ border-radius: 12px
2442
+
2443
+ &::after
2444
+ width: 12px
2445
+ height: 12px
2446
+ box-shadow: 0 3px 6px 0 rgba(0, 0, 0, .2)
2447
+ top: 6px
2448
+ left: 6px
2449
+
2450
+ &.checked::after
2451
+ left: 18px
2452
+
2453
+ &:hover
2454
+ background: var(--bgMedium)
2455
+
2456
+ &:focus
2457
+ box-shadow: 0 0 0 2px var(--borderMedium)
2458
+
2459
+ &.checked
2460
+ background: var(--brandBg)
2461
+ box-shadow: none
2462
+
2463
+ &:disabled
2464
+ background: var(--bgHard)
2465
+ box-shadow: none
2466
+ pointer-events: none
2467
+
2468
+ &::after
2469
+ background: var(--textSoft)
2470
+ box-shadow: none
2471
+ /* End: SWITCH */
2472
+
2473
+ /* TABLE */
2474
+ .ui-table
2475
+ > header
2476
+ border-bottom: 1px solid var(--borderSoft)
2477
+ padding: 10px 20px
2478
+ display: flex
2479
+
2480
+ p,
2481
+ b
2482
+ @extend .t-xxs
2483
+ font-weight: normal !important
2484
+ flex: 1
2485
+
2486
+ &.right
2487
+ text-align: right
2488
+
2489
+ > ul
2490
+ list-style: none
2491
+
2492
+ > li
2493
+ @extend .t-xs
2494
+ min-height: 64px
2495
+ border-bottom: 1px solid var(--borderSoft)
2496
+ padding: 20px
2497
+ display: flex
2498
+ flex-direction: column
2499
+ justify-content: center
2500
+ gap: 8px
2501
+
2502
+ &.dropdown
2503
+ @extend .t-xxs
2504
+ padding-block: 8px
2505
+ background: var(--bgSoft)
2506
+ gap: 4px
2507
+
2508
+ .row
2509
+ display: flex
2510
+ align-items: center
2511
+
2512
+ > div
2513
+ flex: 1
2514
+ color: var(--textNormal)
2515
+ display: flex
2516
+ align-items: center
2517
+ gap: 20px
2518
+
2519
+ &.right
2520
+ justify-content: flex-end
2521
+
2522
+ .actions
2523
+ position: relative
2524
+
2525
+ .ui-actions
2526
+ top: calc(100% + 4px)
2527
+ right: 0
2528
+ /* TABLE */
2529
+
2530
+ /* TABS */
2531
+ .ui-tabs
2532
+ display: flex
2533
+ position: relative
2534
+
2535
+ p
2536
+ position: relative
2537
+ padding: 0 20px 12px
2538
+
2539
+ .count
2540
+ margin-left: 8px
2541
+ padding: 1px 7px
2542
+ border-radius: 999px
2543
+ background: var(--bgSoft)
2544
+ color: var(--textSoft)
2545
+
2546
+ // Something in the tab waits, unsaved: the brand's dot. It sits in the
2547
+ // tab's own right padding, centred on the label's line, so showing it
2548
+ // moves neither the tabs after it nor the underline.
2549
+ .mark
2550
+ position: absolute
2551
+ top: calc(50% - 9px)
2552
+ right: 8px
2553
+ width: 6px
2554
+ height: 6px
2555
+ border-radius: 50%
2556
+ background: var(--brandBg)
2557
+ color: var(--textNormal)
2558
+ cursor: pointer
2559
+ transition: color 300ms
2560
+
2561
+ &:hover,
2562
+ &.active
2563
+ color: var(--highlight)
2564
+
2565
+ figure
2566
+ height: 2px
2567
+ background: var(--highlight)
2568
+ position: absolute
2569
+ bottom: 0
2570
+ transition: all 300ms var(--easeOutExpo)
2571
+ /* End: TABS */
2572
+
2573
+ /* TAG */
2574
+ .ui-tag
2575
+ @extend .t-xxs
2576
+ border-radius: 4px
2577
+ padding-inline: 8px
2578
+ white-space: nowrap
2579
+ display: inline-flex
2580
+ align-items: center
2581
+ gap: 8px
2582
+
2583
+ button
2584
+ display: flex
2585
+ opacity: .5
2586
+ cursor: pointer
2587
+ transition: opacity 150ms
2588
+
2589
+ &:hover
2590
+ opacity: 1
2591
+
2592
+ &.default
2593
+ background: var(--bgSoft)
2594
+ color: var(--textNormal)
2595
+
2596
+ &.positive
2597
+ background: var(--bgPositive)
2598
+ color: var(--textPositive)
2599
+
2600
+ &.warning
2601
+ background: var(--bgWarning)
2602
+ color: var(--textWarning)
2603
+
2604
+ &.negative
2605
+ background: var(--bgNegative)
2606
+ color: var(--textNegative)
2607
+
2608
+ &.disabled
2609
+ background: var(--bgSoft)
2610
+ color: var(--textSoft)
2611
+ /* End: TAG */
2612
+
2613
+ /* TOAST */
2614
+ .ui-toast
2615
+ height: 40px
2616
+ border-radius: 12px
2617
+ border: 1px solid var(--borderHard)
2618
+ padding-inline: 7px
2619
+ background: var(--bgPrimary)
2620
+ box-shadow: 0 8px 16px 0 rgba(0, 0, 0, .1)
2621
+ display: flex
2622
+ align-items: center
2623
+ gap: 16px
2624
+ position: fixed
2625
+ z-index: 1000
2626
+ bottom: 40px
2627
+ left: 50%
2628
+ animation: toast 600ms var(--easeOutBack) forwards
2629
+
2630
+ // A phone gets the full width: sized to its one-line content the toast
2631
+ // squeezed long copy into a tall three-line sliver.
2632
+ @media (max-width: 768px)
2633
+ width: calc(100vw - 32px)
2634
+ height: auto
2635
+ min-height: 40px
2636
+ padding-block: 8px
2637
+
2638
+ p
2639
+ flex: 1
2640
+
2641
+ @keyframes toast
2642
+ from
2643
+ opacity: 0
2644
+ transform: translate(-50%, 100%)
2645
+
2646
+ to
2647
+ opacity: 1
2648
+ transform: translateX(-50%)
2649
+
2650
+ figure,
2651
+ button
2652
+ width: 24px
2653
+ height: 24px
2654
+ border-radius: 4px
2655
+ display: flex
2656
+ align-items: center
2657
+ justify-content: center
2658
+
2659
+ p
2660
+ @extend .t-xxs
2661
+
2662
+ svg
2663
+ width: 24px
2664
+ height: 24px
2665
+
2666
+ path
2667
+ fill: none
2668
+ stroke: var(--highlight)
2669
+ stroke-linecap: round
2670
+ stroke-width: 2px
2671
+ stroke-dashoffset: 44px
2672
+ animation: toggleSVGPath 5s linear forwards
2673
+
2674
+ @keyframes toggleSVGPath
2675
+ from
2676
+ stroke-dasharray: 44px
2677
+
2678
+ to
2679
+ stroke-dasharray: 88px
2680
+
2681
+ button
2682
+ cursor: pointer
2683
+ transition: background 150ms
2684
+
2685
+ &:hover
2686
+ background: rgba(0, 0, 0, .05)
2687
+
2688
+ // Undo and its like: the label underlined after the message, before the
2689
+ // ring.
2690
+ button.action
2691
+ @extend .t-xxs
2692
+ width: auto
2693
+ padding: 0 6px
2694
+ gap: 6px
2695
+ color: var(--highlight)
2696
+ font-weight: 600
2697
+ text-decoration: underline
2698
+ text-underline-offset: 3px
2699
+ white-space: nowrap
2700
+
2701
+ &.info figure
2702
+ background: var(--bgMedium)
2703
+
2704
+ &.success figure
2705
+ background: var(--bgPositive)
2706
+ color: var(--textPositive)
2707
+
2708
+ &.warning figure
2709
+ background: var(--bgWarning)
2710
+ color: var(--textWarning)
2711
+
2712
+ &.error figure
2713
+ background: var(--bgNegative)
2714
+ color: var(--textNegative)
2715
+ /* End: TOAST */
2716
+
2717
+ /* TOOGLE */
2718
+ // Equal columns, each as wide as the longest label: the sliding figure is
2719
+ // one column wide, so a longer label (Agency next to Mine) used to push
2720
+ // its button past the figure and leave both labels off-centre.
2721
+ .ui-toggle
2722
+ overflow: hidden
2723
+ background: var(--bgSoft)
2724
+ // Equal columns: the highlight is one equal part, whatever each label measures.
2725
+ display: grid
2726
+ grid-auto-flow: column
2727
+ grid-auto-columns: 1fr
2728
+ position: relative
2729
+ z-index: 1
2730
+
2731
+ figure
2732
+ background: var(--bgPrimary)
2733
+ box-shadow: 0 0 2px 0 rgba(0, 0, 0, .2)
2734
+ position: absolute
2735
+ z-index: -1
2736
+ transition: transform 300ms var(--easeOutExpo)
2737
+
2738
+ button
2739
+ @extend .t-xxs
2740
+ cursor: pointer
2741
+ transition: color 150ms
2742
+ white-space: nowrap
2743
+ padding-inline: 12px
2744
+
2745
+ &.active
2746
+ pointer-events: none
2747
+
2748
+ &:not(.active)
2749
+ color: var(--textSoft)
2750
+
2751
+ &:hover
2752
+ color: var(--highlight)
2753
+
2754
+ // A view's icon before its name.
2755
+ &.with-icon
2756
+ display: inline-flex
2757
+ align-items: center
2758
+ justify-content: center
2759
+ gap: 6px
2760
+
2761
+ &.xl
2762
+ width: 100%
2763
+ height: 40px
2764
+ border-radius: 12px
2765
+ padding: 4px
2766
+
2767
+ figure
2768
+ height: 32px
2769
+ border-radius: 8px
2770
+ top: 4px
2771
+ left: 4px
2772
+
2773
+ &.l
2774
+ height: 40px
2775
+ border-radius: 12px
2776
+ padding: 4px
2777
+
2778
+ figure
2779
+ height: 32px
2780
+ border-radius: 8px
2781
+ top: 4px
2782
+ left: 4px
2783
+
2784
+ &.s
2785
+ height: 24px
2786
+ border-radius: 6px
2787
+ padding: 2px
2788
+
2789
+ figure
2790
+ height: 20px
2791
+ border-radius: 4px
2792
+ top: 2px
2793
+ left: 2px
2794
+
2795
+ &.disabled
2796
+ background: var(--bgHard)
2797
+ pointer-events: none
2798
+
2799
+ figure
2800
+ background: var(--bgMedium)
2801
+ box-shadow: none
2802
+
2803
+ button
2804
+ &.active
2805
+ color: var(--textNormal)
2806
+ /* End: TOOGLE */
2807
+
2808
+ // REVISAR
2809
+ /* DRAWER */
2810
+ .ui-drawer
2811
+ width: 100vw
2812
+ height: 100vh
2813
+ display: flex
2814
+ flex-direction: column
2815
+ position: fixed
2816
+ z-index: 1000
2817
+ top: 0
2818
+ left: 0
2819
+ animation: drawer 600ms var(--easeOutExpo) forwards
2820
+
2821
+ @keyframes drawer
2822
+ from
2823
+ background: transparent
2824
+
2825
+ to
2826
+ background: rgba(230, 230, 230, .8)
2827
+
2828
+ > figure
2829
+ flex: 1
2830
+ min-height: 80px
2831
+
2832
+ > div
2833
+ border-radius: 16px 16px 0 0
2834
+ padding: 16px 16px 0
2835
+ background: white
2836
+ display: flex
2837
+ flex-direction: column
2838
+ align-items: center
2839
+ gap: 16px
2840
+ animation: drawerDiv 600ms var(--easeOutExpo) forwards
2841
+
2842
+ @keyframes drawerDiv
2843
+ from
2844
+ transform: translateY(100%)
2845
+
2846
+ to
2847
+ transform: none
2848
+
2849
+ &::before
2850
+ flex-shrink: 0
2851
+ content: ''
2852
+ width: 20px
2853
+ height: 1px
2854
+ border-radius: .5px
2855
+ background: var(--gray200)
2856
+
2857
+ > div
2858
+ width: 100%
2859
+
2860
+ &.scrolleable
2861
+ > figure
2862
+ flex: 0
2863
+
2864
+ > div
2865
+ @extend .no-scrollbar
2866
+ flex: 1
2867
+ overflow-y: auto
2868
+
2869
+ // Dark
2870
+ .dark
2871
+ .ui-drawer
2872
+ animation-name: darkDrawer
2873
+
2874
+ @keyframes darkDrawer
2875
+ from
2876
+ background: transparent
2877
+
2878
+ to
2879
+ background: rgba(26, 26, 26, .8)
2880
+
2881
+ > div
2882
+ background: black
2883
+
2884
+ &::before
2885
+ background: var(--gray800)
2886
+ /* End: DRAWER */
2887
+
2888
+ /* TOOLTIP */
2889
+ .ui-tooltip
2890
+ position: relative
2891
+ cursor: help
2892
+
2893
+ &.disabled
2894
+ cursor: inherit
2895
+
2896
+ // On body, fixed: placed by the component in viewport coordinates.
2897
+ .ui-tooltip-bubble
2898
+ position: fixed
2899
+ // Above every popover and card: nothing is meant to sit over a hint.
2900
+ z-index: 1300
2901
+ width: max-content
2902
+ padding: 4px
2903
+ // The border tokens, so an agency's brand tints it like every card and
2904
+ // input; Nicer's own theme keeps gray200 here and gray800 in dark.
2905
+ border: 1px solid var(--borderHard)
2906
+ border-radius: 4px
2907
+ background: var(--bgPrimary)
2908
+ color: var(--highlight)
2909
+ line-height: 1.4
2910
+ overflow-wrap: break-word
2911
+ white-space: normal
2912
+ pointer-events: none
2913
+ // In from the anchor's side.
2914
+ --enter-y: -4px
2915
+ animation: ui-tooltip-in 200ms var(--easeOutExpo)
2916
+
2917
+ @media (prefers-reduced-motion: reduce)
2918
+ animation: none
2919
+
2920
+ &[data-side="above"]
2921
+ --enter-y: 4px
2922
+
2923
+ // A field's error: the field error's own line, a little roomier.
2924
+ &.error
2925
+ padding: 4px 8px
2926
+
2927
+ .ui-field-error
2928
+ padding: 0
2929
+
2930
+ // Its arrow, pointing at what it is about: a square turned on its corner,
2931
+ // in the bubble's own fill and border, across the gap to the anchor.
2932
+ &[data-side]::before
2933
+ content: ""
2934
+ width: 8px
2935
+ height: 8px
2936
+ border-style: solid
2937
+ border-color: inherit
2938
+ background: inherit
2939
+ position: absolute
2940
+ left: calc(var(--arrow-x) - 5px)
2941
+ rotate: 45deg
2942
+
2943
+ &[data-side="below"]::before
2944
+ top: -5px
2945
+ border-width: 1px 0 0 1px
2946
+
2947
+ &[data-side="above"]::before
2948
+ bottom: -5px
2949
+ border-width: 0 1px 1px 0
2950
+
2951
+ @keyframes ui-tooltip-in
2952
+ from
2953
+ opacity: 0
2954
+ translate: 0 var(--enter-y)
2955
+
2956
+ // Dark
2957
+ .dark
2958
+ .ui-tooltip-bubble
2959
+ border-color: var(--borderMedium)
2960
+ /* End: TOOLTIP */