@ecl/mega-menu 5.0.0-alpha.1

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.
package/mega-menu.scss ADDED
@@ -0,0 +1,1402 @@
1
+ /* stylelint-disable no-descending-specificity, length-zero-no-unit */
2
+
3
+ /**
4
+ * Menu
5
+ * @define menu
6
+ */
7
+
8
+ @use 'sass:map';
9
+ @use '@ecl/grid/mixins/breakpoints';
10
+
11
+ // Exposed variables
12
+ $theme: null !default;
13
+ $mega-menu: null !default;
14
+
15
+ @mixin with-scrollbar {
16
+ overflow-y: auto;
17
+ scrollbar-color: var(--c-n) rgba(0, 0, 0, 0);
18
+ scrollbar-width: thin;
19
+ }
20
+
21
+ /*
22
+ * Menu structure
23
+ */
24
+ .ecl-mega-menu {
25
+ background: map.get($mega-menu, 'mobile', 'menu-background');
26
+ box-shadow: map.get($mega-menu, 'global', 'shadow');
27
+ color: map.get($mega-menu, 'mobile', 'color');
28
+ margin: 0;
29
+ padding-bottom: var(--s-xs);
30
+ padding-top: var(--s-xs);
31
+
32
+ // We've got to override an EWPP css, yes.
33
+ a:focus {
34
+ text-decoration: none;
35
+ }
36
+
37
+ .ecl-container {
38
+ padding: 0;
39
+ }
40
+ }
41
+
42
+ .ecl-mega-menu__container {
43
+ display: flex;
44
+ min-height: map.get($theme, 'line-height', '2xl');
45
+ position: initial; // Needed for full screen overlay
46
+ }
47
+
48
+ .ecl-mega-menu__open {
49
+ align-items: center;
50
+ align-self: center;
51
+ box-sizing: border-box;
52
+ cursor: pointer;
53
+ color: currentcolor;
54
+ display: flex;
55
+ flex-direction: column;
56
+ font: var(--f-xs);
57
+ margin-inline-start: var(--s-xs);
58
+ order: 2;
59
+ padding: map.get($mega-menu, 'mobile', 'open-padding');
60
+ text-decoration: none;
61
+ z-index: 54;
62
+
63
+ &:hover,
64
+ &:focus-visible,
65
+ &:active,
66
+ &:visited {
67
+ color: currentcolor;
68
+ }
69
+
70
+ &:hover {
71
+ text-decoration: underline;
72
+ }
73
+
74
+ &:focus-visible {
75
+ outline-offset: -2px;
76
+ }
77
+
78
+ .ecl-icon:last-of-type {
79
+ display: none;
80
+ }
81
+ }
82
+
83
+ .ecl-mega-menu[aria-expanded='true'] .ecl-mega-menu__open {
84
+ background-color: map.get($mega-menu, 'mobile', 'open-background-active');
85
+
86
+ .ecl-icon:first-of-type {
87
+ display: none;
88
+ }
89
+
90
+ .ecl-icon:last-of-type {
91
+ display: block;
92
+ }
93
+ }
94
+
95
+ .ecl-mega-menu__mega-container-scrollable {
96
+ font: var(--f-m);
97
+ margin-top: var(--s-xs);
98
+ padding: var(--s-s) var(--s-m);
99
+
100
+ * {
101
+ height: auto;
102
+ }
103
+ }
104
+
105
+ .ecl-mega-menu__spacer {
106
+ flex: 1 0 auto;
107
+ }
108
+
109
+ /* stylelint-disable-next-line order/order */
110
+ @include breakpoints.up('l') {
111
+ .ecl-mega-menu:not(.ecl-menu--forced-mobile) {
112
+ background: map.get($mega-menu, 'desktop', 'menu-background');
113
+ padding-bottom: 0;
114
+ padding-top: 0;
115
+
116
+ .ecl-container {
117
+ padding: 0 var(--s-m);
118
+ }
119
+
120
+ .ecl-mega-menu__container {
121
+ display: block;
122
+ }
123
+
124
+ // For the external icon
125
+ .ecl-mega-menu__link .ecl-icon {
126
+ flex-shrink: 0;
127
+ margin-inline-start: var(--s-2xs);
128
+ }
129
+
130
+ .ecl-mega-menu__site-name,
131
+ .ecl-mega-menu__inner-header,
132
+ .ecl-mega-menu__open,
133
+ .ecl-mega-menu__cta {
134
+ display: none;
135
+ }
136
+ }
137
+
138
+ .ecl-mega-menu__mega-container-scrollable {
139
+ margin-top: 0;
140
+ }
141
+ }
142
+
143
+ /*
144
+ * Inner menu
145
+ */
146
+ .ecl-mega-menu__inner {
147
+ background: map.get($mega-menu, 'mobile', 'content-background');
148
+ bottom: 0;
149
+ display: none;
150
+ position: fixed;
151
+ right: -100%;
152
+ top: 0;
153
+ width: 100%;
154
+ z-index: map.get($theme, 'z-index', 'modal') + 3;
155
+
156
+ /* Force display if JS is disabled */
157
+ .no-js & {
158
+ display: flex;
159
+ }
160
+ }
161
+
162
+ .ecl-mega-menu--start-panel .ecl-mega-menu__inner {
163
+ @include with-scrollbar;
164
+ }
165
+
166
+ // Expanded
167
+ .ecl-mega-menu[aria-expanded='true'] .ecl-mega-menu__inner {
168
+ display: block;
169
+ right: 0;
170
+ }
171
+
172
+ .ecl-mega-menu__inner-header {
173
+ align-items: center;
174
+ background: map.get($mega-menu, 'mobile', 'header-background');
175
+ box-shadow: map.get($mega-menu, 'mobile', 'header-shadow');
176
+ color: map.get($mega-menu, 'mobile', 'header-color');
177
+ display: flex;
178
+ flex-flow: row-reverse;
179
+ height: map.get($mega-menu, 'mobile', 'header-height');
180
+ }
181
+
182
+ .ecl-mega-menu__title {
183
+ font: map.get($mega-menu, 'mobile', 'header-font');
184
+ padding-inline-start: var(--s-m);
185
+ }
186
+
187
+ .ecl-mega-menu__close {
188
+ align-items: center;
189
+ border-radius: map.get($mega-menu, 'global', 'border-radius');
190
+ cursor: pointer;
191
+ color: currentcolor;
192
+ display: flex;
193
+ flex-direction: column;
194
+ font: var(--f-xs);
195
+ margin-inline-start: auto;
196
+ order: 0;
197
+ text-decoration: none;
198
+
199
+ .ecl-button__container {
200
+ flex-direction: column-reverse;
201
+ }
202
+
203
+ .ecl-button__icon {
204
+ margin-inline-start: 0;
205
+ }
206
+
207
+ .ecl-button__label {
208
+ margin-top: var(--s-2xs);
209
+ }
210
+
211
+ &:hover {
212
+ background-color: map.get($mega-menu, 'mobile', 'header-background-hover');
213
+ border-color: transparent;
214
+ color: currentcolor;
215
+ }
216
+
217
+ &:focus-visible {
218
+ color: currentcolor;
219
+ border-color: currentcolor;
220
+ }
221
+ }
222
+
223
+ .ecl-mega-menu__back {
224
+ cursor: pointer;
225
+ color: currentcolor;
226
+ display: none;
227
+ font: map.get($mega-menu, 'mobile', 'header-font');
228
+ margin: var(--s-l) var(--s-m) 0;
229
+ position: relative;
230
+ text-decoration: none;
231
+
232
+ &:hover {
233
+ background-color: map.get($mega-menu, 'mobile', 'header-background-hover');
234
+ border-color: map.get($mega-menu, 'mobile', 'header-border-hover');
235
+ color: map.get($mega-menu, 'mobile', 'header-color-hover');
236
+ }
237
+
238
+ &:focus-visible {
239
+ color: currentcolor;
240
+ border-color: currentcolor;
241
+ }
242
+ }
243
+
244
+ // Expanded
245
+ @if map.has-key($mega-menu, 'mobile', 'hide-header') {
246
+ .ecl-mega-menu__inner-header {
247
+ flex-flow: row;
248
+ }
249
+
250
+ .ecl-mega-menu__inner:not(.ecl-mega-menu__inner--expanded)
251
+ .ecl-mega-menu__inner-header,
252
+ .ecl-mega-menu__close {
253
+ display: none;
254
+ }
255
+ }
256
+
257
+ .ecl-mega-menu__inner--expanded .ecl-mega-menu__title {
258
+ display: none;
259
+ }
260
+
261
+ .ecl-mega-menu__inner--expanded .ecl-mega-menu__back {
262
+ display: inline-block;
263
+ }
264
+
265
+ .ecl-mega-menu__overlay {
266
+ background-color: map.get($mega-menu, 'mobile', 'overlay-background');
267
+ content: '';
268
+ display: none;
269
+ height: 100%;
270
+ left: 0;
271
+ position: fixed;
272
+ right: 0;
273
+ top: 0;
274
+ width: 100%;
275
+ z-index: -1;
276
+ }
277
+
278
+ .ecl-mega-menu[aria-expanded='true'],
279
+ .ecl-mega-menu[data-expanded='true'] {
280
+ .ecl-mega-menu__overlay {
281
+ display: block;
282
+ }
283
+ }
284
+
285
+ /* stylelint-disable-next-line order/order */
286
+ @include breakpoints.up('s') {
287
+ .ecl-mega-menu__inner {
288
+ width: 100%;
289
+ }
290
+ }
291
+
292
+ /* stylelint-disable-next-line order/order */
293
+ @include breakpoints.up('l') {
294
+ .ecl-mega-menu:not(.ecl-menu--forced-mobile) {
295
+ .ecl-mega-menu__overlay {
296
+ background-color: map.get($mega-menu, 'desktop', 'overlay-background');
297
+ opacity: 0.7;
298
+ }
299
+
300
+ .ecl-mega-menu__inner {
301
+ background-color: transparent;
302
+ box-shadow: none;
303
+ display: block;
304
+ margin-inline-start: calc(-1 * var(--s-m));
305
+ overflow-y: visible;
306
+ position: static;
307
+ transition: none;
308
+ width: 100%;
309
+ z-index: map.get($theme, 'z-index', 'modal');
310
+ }
311
+
312
+ .ecl-menu__overlay {
313
+ display: none;
314
+ }
315
+ }
316
+ }
317
+
318
+ .ecl-mega-menu__wrapper {
319
+ background: map.get($theme, 'color', 'white');
320
+ display: none;
321
+ position: absolute;
322
+ height: 100%;
323
+ left: 0;
324
+ padding: 0;
325
+ top: 0;
326
+ width: calc(100vw - var(--s-m));
327
+ }
328
+
329
+ /*
330
+ * First level
331
+ */
332
+ .ecl-mega-menu__list {
333
+ box-sizing: border-box;
334
+ clear: right;
335
+ display: flex;
336
+ flex-direction: column;
337
+ flex-grow: 1;
338
+ justify-content: flex-start;
339
+ list-style: none;
340
+ list-style-image: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7');
341
+ margin-bottom: 0;
342
+ margin-top: var(--s-m);
343
+ margin-inline-start: var(--s-xs);
344
+ margin-inline-end: var(--s-xs);
345
+ padding: 0;
346
+
347
+ .ecl-mega-menu__inner--expanded & {
348
+ margin-top: 0;
349
+ }
350
+ }
351
+
352
+ .ecl-mega-menu__item {
353
+ display: flex;
354
+ flex-direction: column;
355
+ }
356
+
357
+ .ecl-mega-menu__link,
358
+ .ecl-mega-menu__featured-list__item .ecl-link {
359
+ align-items: center;
360
+ background: transparent;
361
+ border-bottom: 1px solid
362
+ map.get($mega-menu, 'desktop', 'sublink-current-background');
363
+ border-radius: 0;
364
+ box-sizing: border-box;
365
+ color: map.get($mega-menu, 'mobile', 'item-color');
366
+ display: inline-flex;
367
+ line-height: map.get($theme, 'line-height-ui', 'xs');
368
+ padding: map.get($mega-menu, 'mobile', 'item-padding');
369
+ position: relative;
370
+ width: 100%;
371
+
372
+ > span {
373
+ width: 100%;
374
+ }
375
+
376
+ &:hover {
377
+ background: transparent;
378
+ box-shadow: none;
379
+ border-color: map.get($mega-menu, 'desktop', 'sublink-current-background');
380
+ color: map.get($mega-menu, 'mobile', 'item-color-hover');
381
+ }
382
+
383
+ &[aria-expanded]:hover {
384
+ text-decoration: none;
385
+ }
386
+
387
+ &:visited {
388
+ color: map.get($mega-menu, 'mobile', 'item-color');
389
+ }
390
+
391
+ &:focus-visible {
392
+ background: transparent;
393
+ border-color: transparent;
394
+ border-radius: 0px;
395
+ color: var(--c-d);
396
+ outline-color: var(--c-p);
397
+ outline-offset: -2px;
398
+ outline-width: 2px;
399
+ }
400
+
401
+ .ecl-icon {
402
+ flex-shrink: 0;
403
+ height: map.get($mega-menu, 'mobile', 'arrow-size');
404
+ margin-inline-start: auto;
405
+ padding: 1px 3px;
406
+ width: map.get($mega-menu, 'mobile', 'arrow-size');
407
+
408
+ &:first-of-type {
409
+ height: calc(var(--s-s) + 0.5px);
410
+ width: calc(var(--s-s) + 0.5px);
411
+ display: none;
412
+ }
413
+ }
414
+ }
415
+
416
+ .ecl-mega-menu__featured-list__item .ecl-link {
417
+ border-bottom: 1px solid map.get($mega-menu, 'mobile', 'featured-link-border');
418
+
419
+ &:hover {
420
+ border-color: map.get($mega-menu, 'mobile', 'featured-link-border');
421
+ }
422
+ }
423
+
424
+ .ecl-mega-menu--rtl .ecl-icon--flip-horizontal {
425
+ transform: rotate(0);
426
+ }
427
+
428
+ .ecl-mega-menu__sublink.ecl-mega-menu__parent-link {
429
+ border: none;
430
+ box-sizing: border-box;
431
+ margin-inline-start: calc(-1 * var(--s-xs));
432
+ padding-bottom: var(--s-xs);
433
+ padding-inline-start: 1.75rem;
434
+ padding-top: var(--s-xs);
435
+ width: calc(100% + var(--s-m));
436
+
437
+ &:focus-visible {
438
+ outline: none;
439
+
440
+ .ecl-button__label {
441
+ outline: 2px solid var(--c-p);
442
+ outline-offset: 4px;
443
+ }
444
+ }
445
+ }
446
+
447
+ .ecl-mega-menu__mega,
448
+ .ecl-mega-menu__info,
449
+ .ecl-mega-menu__mega-container {
450
+ box-sizing: border-box;
451
+ display: none;
452
+ flex-direction: column;
453
+ flex-grow: 1;
454
+ position: relative;
455
+ }
456
+
457
+ .ecl-mega-menu__info {
458
+ background: map.get($mega-menu, 'global', 'greysh-background');
459
+ box-sizing: content-box;
460
+ margin: 0 calc(-1 * var(--s-xs)) var(--s-m);
461
+ padding-inline-start: 1.75rem;
462
+ padding-bottom: var(--s-2xl);
463
+ padding-inline-end: 1.75rem;
464
+
465
+ .ecl-mega-menu__info-title {
466
+ font: var(--f-l);
467
+ padding: var(--s-xs) var(--s-m) var(--s-xs) 0;
468
+ }
469
+
470
+ .ecl-mega-menu__info-content {
471
+ font: var(--f-m);
472
+ max-width: var(--max-w);
473
+ }
474
+ }
475
+
476
+ .ecl-mega-menu__info-link {
477
+ border-bottom: 1px solid transparent;
478
+ display: inline-block;
479
+ width: fit-content;
480
+
481
+ &:hover {
482
+ text-decoration: underline !important;
483
+ }
484
+
485
+ &:focus-visible {
486
+ border-radius: 0;
487
+ }
488
+
489
+ .ecl-mega-menu__info-content + & {
490
+ margin-top: var(--s-xs);
491
+ }
492
+ }
493
+
494
+ .ecl-mega-menu__subitem {
495
+ .ecl-mega-menu__sublink--level-2 {
496
+ background: transparent;
497
+ color: var(--c-p);
498
+
499
+ &:hover {
500
+ box-shadow: none;
501
+ color: var(--c-p-140);
502
+ }
503
+ }
504
+ }
505
+
506
+ .ecl-mega-menu__item--current .ecl-mega-menu__link,
507
+ .ecl-mega-menu__subitem--current > .ecl-mega-menu__sublink {
508
+ background-color: map.get($mega-menu, 'mobile', 'item-active-background');
509
+ position: relative;
510
+ }
511
+
512
+ /* stylelint-disable-next-line order/order */
513
+ @include breakpoints.up('l') {
514
+ .ecl-mega-menu:not(.ecl-menu--forced-mobile) {
515
+ border-top: map.get($mega-menu, 'desktop', 'menu-border');
516
+
517
+ .ecl-mega-menu__inner {
518
+ border-top: none;
519
+ }
520
+
521
+ .ecl-mega-menu__list {
522
+ flex-direction: row;
523
+ left: 0;
524
+ right: 0;
525
+ margin-top: 0;
526
+ padding: 0;
527
+ }
528
+
529
+ .ecl-mega-menu__wrapper {
530
+ padding: 0 0 var(--s-2xl);
531
+ top: 48px;
532
+ }
533
+
534
+ .ecl-mega-menu__item {
535
+ border-top-width: 0;
536
+ color: map.get($mega-menu, 'desktop', 'item-color');
537
+ margin-bottom: 0;
538
+
539
+ &:first-of-type {
540
+ margin-inline-start: 0;
541
+ }
542
+ }
543
+
544
+ .ecl-mega-menu__item--full {
545
+ position: static;
546
+ }
547
+
548
+ .ecl-mega-menu__link {
549
+ background: map.get($mega-menu, 'desktop', 'item-background');
550
+ box-sizing: border-box;
551
+ box-shadow: none;
552
+ border-bottom: none;
553
+ border-radius: 0;
554
+ color: map.get($mega-menu, 'desktop', 'item-color');
555
+ display: inline-flex;
556
+ font: var(--f-m);
557
+ height: 100%;
558
+ line-height: map.get($mega-menu, 'desktop', 'link-line-height');
559
+ padding: map.get($mega-menu, 'desktop', 'link-padding');
560
+ width: auto;
561
+ z-index: 0;
562
+
563
+ &:active {
564
+ color: map.get($theme, 'color', 'white');
565
+ }
566
+
567
+ &:hover {
568
+ background: map.get($mega-menu, 'desktop', 'item-background-hover');
569
+ color: map.get($mega-menu, 'desktop', 'item-color-hover');
570
+ box-shadow: none;
571
+ text-decoration: none;
572
+ }
573
+
574
+ &:focus-visible {
575
+ background-color: map.get(
576
+ $mega-menu,
577
+ 'desktop',
578
+ 'item-background-focus'
579
+ );
580
+ border-radius: 0;
581
+ color: map.get($mega-menu, 'desktop', 'item-color-focus');
582
+ outline-color: map.get($theme, 'color', 'white');
583
+ outline-offset: -8px;
584
+ outline-width: map.get($mega-menu, 'desktop', 'outline-width');
585
+ }
586
+ }
587
+
588
+ .ecl-mega-menu__sublink {
589
+ border-bottom: none;
590
+ }
591
+
592
+ &.ecl-mega-menu--rtl {
593
+ .ecl-mega-menu__see-all .ecl-icon {
594
+ transform: rotate(0);
595
+ }
596
+ }
597
+
598
+ .ecl-mega-menu__item--has-children,
599
+ .ecl-mega-menu__item--has-container {
600
+ .ecl-mega-menu__link .ecl-icon {
601
+ height: calc(var(--s-xs) + 2px);
602
+ transform: rotate(180deg);
603
+ width: calc(var(--s-xs) + 2px);
604
+
605
+ &:first-of-type {
606
+ display: flex;
607
+ }
608
+
609
+ &:last-of-type {
610
+ display: none;
611
+ }
612
+ }
613
+ }
614
+
615
+ .ecl-mega-menu__item--current {
616
+ background-color: map.get(
617
+ $mega-menu,
618
+ 'desktop',
619
+ 'item-current-background'
620
+ );
621
+ box-shadow: map.get($mega-menu, 'desktop', 'item-current-shadow');
622
+ color: map.get($mega-menu, 'desktop', 'item-current-color');
623
+ margin-top: map.get($mega-menu, 'desktop', 'item-current-margin');
624
+
625
+ .ecl-link__icon {
626
+ display: inline-flex;
627
+ }
628
+
629
+ &:hover {
630
+ background-color: map.get(
631
+ $mega-menu,
632
+ 'desktop',
633
+ 'item-current-background'
634
+ );
635
+ }
636
+
637
+ .ecl-mega-menu__link:focus-visible {
638
+ outline-color: var(--c-p);
639
+ }
640
+ }
641
+ }
642
+
643
+ .ecl-mega-menu:not(
644
+ .ecl-mega-menu--forced-mobile,
645
+ .ecl-mega-menu--forced-close
646
+ ) {
647
+ .ecl-mega-menu__item {
648
+ &.ecl-mega-menu__item--expanded > .ecl-button .ecl-icon {
649
+ transform: rotate(0);
650
+ }
651
+
652
+ &.ecl-mega-menu__item--expanded {
653
+ .ecl-mega-menu__link {
654
+ background-color: map.get($theme, 'color', 'white');
655
+ color: var(--c-d);
656
+ z-index: map.get($theme, 'z-index', 'dropdown') + 1;
657
+ }
658
+ }
659
+ }
660
+ }
661
+ }
662
+
663
+ /*
664
+ * Second level
665
+ */
666
+ .ecl-mega-menu__item--expanded,
667
+ .ecl-mega-menu__subitem--expanded {
668
+ border-top-width: 0;
669
+ flex-direction: column;
670
+ position: relative;
671
+
672
+ > .ecl-mega-menu__wrapper,
673
+ > .ecl-mega-menu__mega,
674
+ > .ecl-mega-menu__wrapper > .ecl-container > .ecl-mega-menu__mega,
675
+ > .ecl-mega-menu__mega-container,
676
+ > .ecl-mega-menu__wrapper > .ecl-container > .ecl-mega-menu__info {
677
+ display: flex;
678
+ }
679
+
680
+ > .ecl-mega-menu__sublink,
681
+ > .ecl-mega-menu__sublink.ecl-link--icon {
682
+ display: none;
683
+ }
684
+
685
+ .ecl-mega-menu__link {
686
+ background-color: map.get($mega-menu, 'global', 'greysh-background');
687
+ box-shadow: none;
688
+ display: none;
689
+ font: map.get($mega-menu, 'mobile', 'subtitle-font');
690
+ font-weight: map.get($mega-menu, 'mobile', 'subtitle-font-weight');
691
+ }
692
+ }
693
+
694
+ .ecl-mega-menu__inner--expanded
695
+ .ecl-mega-menu__item:not(.ecl-mega-menu__item--expanded) {
696
+ display: none;
697
+ }
698
+
699
+ .ecl-mega-menu__inner--expanded .ecl-mega-menu__link-icon {
700
+ display: none;
701
+ }
702
+
703
+ @include breakpoints.down('m') {
704
+ .ecl-mega-menu--one-panel {
705
+ .ecl-mega-menu__item--expanded > .ecl-mega-menu__link {
706
+ font: var(--f-l);
707
+ }
708
+ }
709
+
710
+ .ecl-mega-menu--two-panels {
711
+ .ecl-mega-menu__item--expanded > .ecl-mega-menu__link {
712
+ display: none;
713
+ }
714
+
715
+ .ecl-mega-menu__subitem--expanded > .ecl-mega-menu__sublink {
716
+ background-color: map.get(
717
+ $mega-menu,
718
+ 'desktop',
719
+ 'sublink-current-background'
720
+ );
721
+ display: flex;
722
+ margin: 0 calc(-1 * var(--s-xs));
723
+ overflow: visible;
724
+
725
+ &.ecl-mega-menu__parent-link {
726
+ border: none;
727
+ cursor: default;
728
+ font: var(--f-l);
729
+ margin: 0 calc(-1 * var(--s-xs));
730
+
731
+ &::after {
732
+ background: map.get(
733
+ $mega-menu,
734
+ 'desktop',
735
+ 'sublink-current-background'
736
+ );
737
+ content: ' ';
738
+ display: block;
739
+ height: var(--s-xl);
740
+ position: absolute;
741
+ left: calc(-1 * var(--s-l));
742
+ top: 100%;
743
+ width: calc(100% + var(--s-l));
744
+ }
745
+ }
746
+
747
+ .ecl-button__icon {
748
+ display: none;
749
+ }
750
+ }
751
+
752
+ .ecl-mega-menu__info {
753
+ display: none !important;
754
+ }
755
+
756
+ .ecl-mega-menu__wrapper {
757
+ top: 0 !important;
758
+ }
759
+ }
760
+ }
761
+
762
+ .ecl-mega-menu__sublist,
763
+ .ecl-mega-menu__featured-list {
764
+ list-style: none;
765
+ list-style-image: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7');
766
+ margin-bottom: var(--s-m);
767
+ padding-inline-start: 0;
768
+
769
+ .ecl-mega-menu__see-all {
770
+ .ecl-link {
771
+ border-radius: 0;
772
+ box-sizing: border-box;
773
+ color: var(--c-d);
774
+ font: var(--f-m);
775
+ margin: 0 var(--s-l);
776
+ padding: var(--s-xs) 0;
777
+
778
+ &:hover {
779
+ text-decoration: none;
780
+ }
781
+
782
+ &:focus-visible {
783
+ outline-offset: 2px;
784
+ }
785
+
786
+ .ecl-icon {
787
+ margin-inline-start: var(--s-m);
788
+ }
789
+ }
790
+ }
791
+ }
792
+
793
+ .ecl-mega-menu__featured-list {
794
+ margin: 0;
795
+ padding: 0;
796
+ }
797
+
798
+ .ecl-mega-menu__sublink {
799
+ background: transparent;
800
+ box-sizing: border-box;
801
+ border-bottom: 1.5px solid
802
+ map.get($mega-menu, 'desktop', 'sublink-current-background');
803
+ border-radius: 0;
804
+ color: map.get($mega-menu, 'mobile', 'item-color');
805
+ padding: map.get($mega-menu, 'mobile', 'subitem-padding');
806
+ position: relative;
807
+ line-height: map.get($theme, 'line-height-ui', 'xs');
808
+ min-height: 42px;
809
+ text-align: initial;
810
+ width: 100%;
811
+
812
+ &.ecl-link--icon:not(.ecl-mega-menu__parent-link) {
813
+ display: flex;
814
+ overflow: visible;
815
+
816
+ .ecl-link__icon {
817
+ height: calc(var(--s-s) + 0.5px);
818
+ padding: 1px 3px;
819
+ }
820
+ }
821
+
822
+ &:hover {
823
+ background: transparent;
824
+ border-color: map.get($mega-menu, 'desktop', 'sublink-current-background');
825
+ box-shadow: none;
826
+ color: map.get($mega-menu, 'mobile', 'item-color-hover');
827
+ }
828
+
829
+ &[aria-expanded]:hover {
830
+ text-decoration: none;
831
+ }
832
+
833
+ &:visited {
834
+ color: map.get($mega-menu, 'mobile', 'item-color');
835
+ }
836
+
837
+ &--current {
838
+ background-color: var(--c-n-80);
839
+ box-shadow: inset 4px 0 0 0 var(--c-p);
840
+ }
841
+
842
+ &:focus-visible {
843
+ background: transparent;
844
+ border-color: transparent;
845
+ color: var(--c-d);
846
+ outline-color: var(--c-p);
847
+ outline-offset: -2px;
848
+ outline-width: 2px;
849
+ }
850
+
851
+ .ecl-icon {
852
+ align-self: center;
853
+ flex-shrink: 0;
854
+ margin-inline-start: auto;
855
+ }
856
+ }
857
+
858
+ .ecl-mega-menu__sublist--scrollable {
859
+ @include with-scrollbar;
860
+ }
861
+
862
+ .ecl-mega-menu__mega--level-2 {
863
+ @include with-scrollbar;
864
+
865
+ margin-top: var(--s-3xl);
866
+ margin-inline-start: calc(-1 * var(--s-xs));
867
+ margin-inline-end: calc(-1 * var(--s-xs));
868
+
869
+ > .ecl-mega-menu__sublist {
870
+ padding: 0 var(--s-xs);
871
+ }
872
+
873
+ .ecl-mega-menu__sublink {
874
+ color: var(--c-p);
875
+
876
+ &:hover {
877
+ text-decoration: underline;
878
+ }
879
+
880
+ &:focus-visible {
881
+ color: var(--c-p) !important;
882
+ }
883
+
884
+ &.ecl-mega-menu__sublink--last {
885
+ border-bottom: none;
886
+ }
887
+
888
+ .ecl-link__label {
889
+ margin-inline-end: 0;
890
+ }
891
+ }
892
+
893
+ .ecl-mega-menu__sublink .ecl-icon {
894
+ margin-inline-start: var(--s-xs);
895
+ }
896
+ }
897
+
898
+ .ecl-mega-menu__featured {
899
+ background-color: map.get($mega-menu, 'mobile', 'featured-background');
900
+ border-color: var(--c-n);
901
+ border-width: 0.5px;
902
+ flex-direction: column;
903
+ padding: 0 var(--s-xs);
904
+
905
+ .ecl-mega-menu__featured-picture {
906
+ display: block;
907
+
908
+ .ecl-mega-menu__featured-image {
909
+ aspect-ratio: 21/9;
910
+ display: block;
911
+ margin-inline-start: var(--s-l);
912
+ max-width: 15.25rem;
913
+ }
914
+ }
915
+
916
+ .ecl-mega-menu__featured-title {
917
+ display: block;
918
+ margin: calc(var(--s-xs) + 2px) var(--s-m) calc(var(--s-xs) + 2px)
919
+ var(--s-l);
920
+ font: var(--f-l);
921
+ }
922
+
923
+ .ecl-mega-menu__featured-content {
924
+ padding: 0 var(--s-m) var(--s-xl);
925
+ }
926
+
927
+ .ecl-mega-menu__featured-list {
928
+ .ecl-mega-menu__featured-list__item {
929
+ line-height: map.get($theme, 'line-height-ui', 'xs');
930
+ margin-bottom: 0;
931
+
932
+ .ecl-link {
933
+ border-radius: 0;
934
+ box-sizing: border-box;
935
+ color: var(--c-p);
936
+ display: block;
937
+ outline-offset: -2px;
938
+ padding: var(--s-m) var(--s-l);
939
+ width: 100%;
940
+
941
+ &:hover {
942
+ color: var(--c-p);
943
+ }
944
+ }
945
+ }
946
+ }
947
+ }
948
+
949
+ .ecl-mega-menu--rtl {
950
+ .ecl-mega-menu__see-all .ecl-icon,
951
+ .ecl-mega-menu__info-link .ecl-icon {
952
+ transform: rotate(0);
953
+ }
954
+
955
+ .ecl-mega-menu__see-all .ecl-link__label {
956
+ padding-inline-start: var(--s-m);
957
+ }
958
+ }
959
+
960
+ @include breakpoints.up('l') {
961
+ .ecl-mega-menu:not(
962
+ .ecl-mega-menu--forced-mobile,
963
+ .ecl-mega-menu--forced-close
964
+ ) {
965
+ .ecl-mega-menu__wrapper {
966
+ padding-top: var(--s-m);
967
+ min-height: 200px !important;
968
+ width: 100vw;
969
+
970
+ &::before {
971
+ background: #e3e3e3;
972
+ content: ' ';
973
+ display: block;
974
+ height: 1px;
975
+ position: absolute;
976
+ width: 98%;
977
+ margin-inline-start: 1%;
978
+ bottom: var(--s-m);
979
+ }
980
+ }
981
+
982
+ .ecl-mega-menu__list {
983
+ margin: 0;
984
+ padding: 0;
985
+ }
986
+
987
+ .ecl-mega-menu__item--expanded,
988
+ .ecl-mega-menu__subitem--expanded {
989
+ position: static;
990
+ }
991
+
992
+ .ecl-mega-menu__item
993
+ > .ecl-mega-menu__wrapper
994
+ > .ecl-container
995
+ > .ecl-mega-menu__mega,
996
+ .ecl-mega-menu__item > .ecl-mega-menu__mega-container,
997
+ .ecl-mega-menu__item
998
+ > .ecl-mega-menu__wrapper
999
+ > .ecl-container
1000
+ > .ecl-mega-menu__info {
1001
+ background-color: map.get($theme, 'color', 'white');
1002
+ border: map.get($mega-menu, 'desktop', 'mega-border');
1003
+ border-radius: 0 0 map.get($mega-menu, 'global', 'border-radius')
1004
+ map.get($mega-menu, 'global', 'border-radius');
1005
+ box-shadow: map.get($mega-menu, 'desktop', 'mega-shadow');
1006
+ display: flex;
1007
+ flex-direction: column;
1008
+ left: 0;
1009
+ position: absolute;
1010
+ transition-property: opacity;
1011
+ transition-duration: 0.3s;
1012
+ transition-timing-function: ease;
1013
+ opacity: 0;
1014
+ visibility: hidden;
1015
+ z-index: map.get($theme, 'z-index', 'dropdown');
1016
+ }
1017
+
1018
+ .ecl-mega-menu__item
1019
+ > .ecl-mega-menu__wrapper
1020
+ .ecl-container
1021
+ > .ecl-mega-menu__info {
1022
+ margin-bottom: var(--s-m);
1023
+ margin-inline-start: calc(-1 * var(--s-m));
1024
+ padding: 0 0 var(--s-m) var(--s-m);
1025
+ position: static;
1026
+ width: auto;
1027
+ }
1028
+
1029
+ &.ecl-mega-menu--rtl {
1030
+ .ecl-mega-menu__item
1031
+ > .ecl-mega-menu__wrapper
1032
+ > .ecl-container
1033
+ > [data-ecl-mega-menu-mega],
1034
+ .ecl-mega-menu__item > .ecl-mega-menu__mega-container {
1035
+ left: auto;
1036
+ right: 0;
1037
+ }
1038
+
1039
+ .ecl-mega-menu__mega--level-2,
1040
+ .ecl-mega-menu__featured {
1041
+ left: auto;
1042
+ right: 100%;
1043
+ }
1044
+ }
1045
+
1046
+ .ecl-mega-menu__mega {
1047
+ width: 21rem;
1048
+ }
1049
+
1050
+ .ecl-mega-menu__item > .ecl-mega-menu__mega-container {
1051
+ background-color: map.get($theme, 'color', 'white');
1052
+ top: 100%;
1053
+ width: 100%;
1054
+
1055
+ .ecl-mega-menu__mega-container-scrollable {
1056
+ height: 100%;
1057
+ margin: 0 calc(-1 * var(--s-m));
1058
+
1059
+ @include with-scrollbar;
1060
+ }
1061
+ }
1062
+
1063
+ .ecl-mega-menu__info-link {
1064
+ margin-top: 0;
1065
+ }
1066
+
1067
+ .ecl-mega-menu__item {
1068
+ justify-content: center;
1069
+ }
1070
+
1071
+ .ecl-mega-menu__inner--expanded
1072
+ .ecl-mega-menu__item:not(.ecl-mega-menu__item--expanded),
1073
+ .ecl-mega-menu__subitem--expanded > .ecl-mega-menu__sublink {
1074
+ display: flex;
1075
+ }
1076
+
1077
+ .ecl-mega-menu__item.ecl-mega-menu__item--expanded
1078
+ > .ecl-mega-menu__wrapper
1079
+ > .ecl-container,
1080
+ .ecl-mega-menu__item--has-container.ecl-mega-menu__item--expanded,
1081
+ .ecl-mega-menu__subitem.ecl-mega-menu__subitem--expanded {
1082
+ > .ecl-mega-menu__mega-container,
1083
+ > .ecl-mega-menu__mega,
1084
+ > .ecl-mega-menu__info {
1085
+ transition-property: opacity;
1086
+ opacity: 1;
1087
+ visibility: visible;
1088
+ }
1089
+
1090
+ .ecl-mega-menu__link {
1091
+ border-bottom: 0;
1092
+ }
1093
+
1094
+ .ecl-mega-menu__info-content {
1095
+ margin-top: var(--s-2xs);
1096
+ }
1097
+
1098
+ > .ecl-mega-menu__info {
1099
+ box-sizing: border-box;
1100
+ box-shadow: 0px 4px 10px 0px rgba(224, 229, 245, 0.42);
1101
+ }
1102
+
1103
+ .ecl-mega-menu__subitem--expanded .ecl-mega-menu__featured {
1104
+ background: map.get($theme, 'color', 'white');
1105
+ display: flex;
1106
+ margin-bottom: 0;
1107
+
1108
+ .ecl-mega-menu__featured-title {
1109
+ border-top: none;
1110
+ padding-inline-start: 0;
1111
+ padding-top: 0;
1112
+ }
1113
+
1114
+ .ecl-mega-menu__featured-list__item .ecl-link {
1115
+ border-bottom: none;
1116
+ margin: 0;
1117
+ padding: calc(var(--s-xs) + 2px) var(--s-2xl) calc(var(--s-xs) + 2px)
1118
+ var(--s-s);
1119
+ }
1120
+ }
1121
+ }
1122
+
1123
+ .ecl-mega-menu__sublist {
1124
+ border-color: map.get($theme, 'color', 'white');
1125
+ border-width: 2px;
1126
+ display: flex;
1127
+ flex-direction: column;
1128
+ flex: 1;
1129
+ margin: 0;
1130
+ padding-inline-start: 0;
1131
+
1132
+ @include with-scrollbar;
1133
+
1134
+ .ecl-mega-menu__sublist {
1135
+ margin-inline-start: var(--s-m);
1136
+ }
1137
+
1138
+ .ecl-mega-menu__see-all {
1139
+ display: block;
1140
+ flex-grow: 0;
1141
+ margin-top: auto;
1142
+ position: relative;
1143
+
1144
+ .ecl-link {
1145
+ border-bottom: 1px solid transparent;
1146
+ margin: calc(var(--s-xs) + 2px) 0 calc(var(--s-xs) + 2px) var(--s-s);
1147
+ padding: 0;
1148
+ outline-offset: 2px;
1149
+
1150
+ .ecl-link__icon {
1151
+ margin-inline-start: var(--s-xs);
1152
+ }
1153
+
1154
+ &:hover {
1155
+ text-decoration: underline;
1156
+ }
1157
+ }
1158
+
1159
+ &::before {
1160
+ content: '';
1161
+ display: block;
1162
+ height: 1px;
1163
+ position: absolute;
1164
+ left: var(--s-s);
1165
+ top: calc(-1 * var(--s-s));
1166
+ width: calc(100% - (var(--s-l) * 2));
1167
+ background: map.get($mega-menu, 'desktop', 'see-all-divider');
1168
+ }
1169
+ }
1170
+ }
1171
+
1172
+ .ecl-mega-menu__mega--level-2 {
1173
+ left: 100%;
1174
+ top: 0;
1175
+ background: map.get($mega-menu, 'global', 'greysh-background');
1176
+ height: 100%;
1177
+ margin-inline-end: 0;
1178
+ margin-inline-start: 0;
1179
+ margin-top: 0;
1180
+ position: absolute;
1181
+ visibility: hidden;
1182
+ opacity: 0;
1183
+ overflow-y: visible;
1184
+ transition-timing-function: ease;
1185
+ transition-property: opacity;
1186
+ transition-duration: 0.3s;
1187
+
1188
+ > .ecl-mega-menu__sublist {
1189
+ border: none;
1190
+ position: relative;
1191
+ }
1192
+
1193
+ .ecl-mega-menu__subitem {
1194
+ &--current .ecl-mega-menu__sublink,
1195
+ &.ecl-mega-menu__subitem--current-page .ecl-mega-menu__sublink {
1196
+ background-color: transparent;
1197
+ box-shadow: none;
1198
+ }
1199
+ }
1200
+
1201
+ .ecl-mega-menu__sublink {
1202
+ padding: map.get($mega-menu, 'desktop', 'sublink-level2-padding');
1203
+
1204
+ .ecl-link__label {
1205
+ margin-inline-end: 0;
1206
+ }
1207
+
1208
+ &:hover {
1209
+ text-decoration: underline;
1210
+ }
1211
+
1212
+ &:focus-visible {
1213
+ outline-color: var(--c-p);
1214
+ }
1215
+ }
1216
+ }
1217
+
1218
+ .ecl-mega-menu__mega--rtl {
1219
+ left: auto;
1220
+ right: 0;
1221
+ }
1222
+
1223
+ .ecl-mega-menu__subitem {
1224
+ align-items: center;
1225
+ border-top-width: 0;
1226
+ box-sizing: border-box;
1227
+ margin: 0;
1228
+ padding: 0;
1229
+ width: 100%;
1230
+ }
1231
+
1232
+ .ecl-mega-menu__sublink {
1233
+ background: transparent;
1234
+ break-inside: avoid-column;
1235
+ border-inline-start: 4px solid transparent;
1236
+ margin: 0;
1237
+ padding: map.get($mega-menu, 'desktop', 'sublink-padding');
1238
+ white-space: normal;
1239
+ width: 100%;
1240
+
1241
+ > .ecl-button__container {
1242
+ width: 100%;
1243
+ }
1244
+
1245
+ &:hover {
1246
+ background-color: map.get(
1247
+ $mega-menu,
1248
+ 'desktop',
1249
+ 'sublink-current-background'
1250
+ );
1251
+ }
1252
+
1253
+ &:focus-visible {
1254
+ border-color: transparent;
1255
+ color: var(--c-d);
1256
+ outline-color: var(--c-p);
1257
+ outline-width: 2px;
1258
+ }
1259
+ }
1260
+
1261
+ .ecl-mega-menu__subitem[aria-expanded] > .ecl-mega-menu__sublink:hover {
1262
+ background-color: var(--c-n-40);
1263
+ box-shadow: none;
1264
+ text-decoration: none;
1265
+ }
1266
+
1267
+ .ecl-mega-menu__subitem--current {
1268
+ > .ecl-mega-menu__sublink,
1269
+ > .ecl-mega-menu__sublink:hover,
1270
+ > .ecl-mega-menu__sublink:focus-visible {
1271
+ background-color: map.get(
1272
+ $mega-menu,
1273
+ 'desktop',
1274
+ 'sublink-current-background'
1275
+ );
1276
+ border-color: var(--c-p);
1277
+ }
1278
+ }
1279
+ }
1280
+
1281
+ .ecl-mega-menu__featured {
1282
+ box-sizing: border-box;
1283
+ display: none;
1284
+ font: var(--f-m);
1285
+ height: 100%;
1286
+ margin: 0;
1287
+ padding-inline-start: 0;
1288
+ position: absolute;
1289
+ left: calc(100% + var(--s-m));
1290
+ width: 16.25rem;
1291
+ top: 0;
1292
+
1293
+ .ecl-mega-menu__featured-scrollable {
1294
+ @include with-scrollbar;
1295
+ }
1296
+
1297
+ .ecl-mega-menu__featured-picture {
1298
+ display: block;
1299
+
1300
+ .ecl-mega-menu__featured-image {
1301
+ aspect-ratio: 21/9;
1302
+ display: block;
1303
+ margin-inline-start: var(--s-s);
1304
+ max-width: calc(100% - var(--s-s));
1305
+ }
1306
+ }
1307
+
1308
+ .ecl-mega-menu__featured-content {
1309
+ padding: 0 var(--s-m) var(--s-xl);
1310
+ }
1311
+
1312
+ .ecl-mega-menu__featured-title {
1313
+ font: var(--f-m);
1314
+ margin-bottom: calc(var(--s-xs) + 2px);
1315
+ margin-top: calc(var(--s-xs) + 2px);
1316
+ margin-inline-start: var(--s-s);
1317
+ }
1318
+ }
1319
+ }
1320
+
1321
+ @include breakpoints.up('xl') {
1322
+ .ecl-mega-menu:not(
1323
+ .ecl-mega-menu--forced-mobile,
1324
+ .ecl-mega-menu--forced-close
1325
+ ) {
1326
+ .ecl-mega-menu__item.ecl-mega-menu__item--expanded
1327
+ > .ecl-mega-menu__wrapper
1328
+ > .ecl-container {
1329
+ > .ecl-mega-menu__info {
1330
+ box-shadow: none;
1331
+ border-radius: 0px 4px 4px 0px;
1332
+ left: var(--s-m);
1333
+ margin-bottom: 0;
1334
+ padding-inline-start: var(--s-m);
1335
+ padding-inline-end: var(--s-xl);
1336
+ position: absolute;
1337
+ width: 15.875rem;
1338
+ z-index: 16;
1339
+
1340
+ &::after {
1341
+ content: '';
1342
+ position: absolute;
1343
+ top: 0;
1344
+ right: 0;
1345
+ bottom: 0;
1346
+ width: 10px;
1347
+ box-shadow: 4px 0px 10px 0px rgba(224, 229, 245, 0.5);
1348
+ pointer-events: none;
1349
+ }
1350
+
1351
+ .ecl-mega-menu__info-title {
1352
+ display: block;
1353
+ margin-top: var(--s-xs);
1354
+ padding: 0;
1355
+ }
1356
+
1357
+ .ecl-mega-menu__info-content {
1358
+ margin-bottom: var(--s-l);
1359
+ margin-top: var(--s-m);
1360
+ }
1361
+ }
1362
+
1363
+ .ecl-mega-menu__mega {
1364
+ width: 18.75rem;
1365
+ }
1366
+
1367
+ .ecl-mega-menu__featured {
1368
+ width: 14.375rem;
1369
+ }
1370
+
1371
+ > .ecl-mega-menu__mega {
1372
+ left: calc(15.875rem + var(--s-xl));
1373
+ }
1374
+ }
1375
+
1376
+ &.ecl-mega-menu--rtl
1377
+ .ecl-mega-menu__item--expanded
1378
+ > .ecl-mega-menu__wrapper
1379
+ > .ecl-container
1380
+ > .ecl-mega-menu__mega {
1381
+ right: calc(14.375rem + var(--s-xl));
1382
+ }
1383
+ }
1384
+ }
1385
+
1386
+ @include breakpoints.up('xl') {
1387
+ .ecl-mega-menu:not(
1388
+ .ecl-mega-menu--forced-mobile,
1389
+ .ecl-mega-menu--forced-close
1390
+ ) {
1391
+ .ecl-mega-menu__wrapper::before {
1392
+ width: 96%;
1393
+ margin-inline-start: 2%;
1394
+ }
1395
+ }
1396
+ }
1397
+
1398
+ .ecl-mega-menu-prevent-scroll {
1399
+ position: fixed;
1400
+ overflow-y: scroll;
1401
+ width: 100%;
1402
+ }