@everymatrix/casino-promotions-nd 1.37.4

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,857 @@
1
+ <svelte:options tag={null}/>
2
+
3
+ <script lang="ts">
4
+ import {tick, onMount} from 'svelte';
5
+ import { _, addNewMessages, setLocale, setupI18n } from './i18n';
6
+ import { getDevice } from 'rvhelper';
7
+ import { TRANSLATIONS } from './translations';
8
+
9
+ export let endpoint:string = '';
10
+ export let lang:string = '';
11
+ export let env:string = '';
12
+ export let userroles: string = '';
13
+ export let translationurl:string = '';
14
+ export let clientstyling:string = '';
15
+ export let clientstylingurl:string = '';
16
+ export let modalpromotion:string = '';
17
+
18
+ let customStylingContainer:HTMLElement;
19
+
20
+ // @TODO move this in a separate file
21
+ type Object = {
22
+ title: string;
23
+ content: string;
24
+ image: {
25
+ src: string;
26
+ sources: [
27
+ {
28
+ media: string;
29
+ pictureSource: string;
30
+ }
31
+ ];
32
+ };
33
+ tabs: [],
34
+ };
35
+
36
+ let isLoading:boolean = false;
37
+
38
+ let promotions:Array<Object> = [];
39
+ let elementWidth:number;
40
+ let currentBreakpoint:string;
41
+ let promotionsContainer:HTMLElement;
42
+ let promotionPath:string = '';
43
+
44
+ let userAgent:string = window.navigator.userAgent;
45
+ let isModalOpen:boolean = false;
46
+ let isPageOpen:boolean = false;
47
+ let modalContainer:HTMLElement;
48
+ let bodyWithModal:HTMLElement;
49
+ let promoDetailsTitle:string = '';
50
+ let promoDetailsContent:string = '';
51
+ let promoDetailsImage:object = {};
52
+ let promoDetailsSources:Array<object> = [];
53
+ let promoDetailsTabs:Array<object> = [];
54
+
55
+ let termsHidden:boolean = false;
56
+ let modalBodyContent:HTMLElement;
57
+ let pageBodyContent:HTMLElement;
58
+ let active:boolean;
59
+
60
+ setupI18n({ withLocale: 'en', translations: {}});
61
+
62
+ const setTranslationUrl = ():void => {
63
+ let url:string = translationurl;
64
+
65
+ fetch(url).then((res:any) => res.json())
66
+ .then((res) => {
67
+ Object.keys(res).forEach((item:any):void => {
68
+ addNewMessages(item, res[item]);
69
+ });
70
+ }).catch((err:any) => {
71
+ console.log(err);
72
+ });
73
+ }
74
+
75
+
76
+ Object.keys(TRANSLATIONS).forEach((item:any) => {
77
+ addNewMessages(item, TRANSLATIONS[item]);
78
+ });
79
+
80
+ const getCmsData = ():void => {
81
+ isLoading = true;
82
+
83
+ let url:URL = new URL(`${endpoint}/${lang}/promotions?env=${env}`);
84
+
85
+ url.searchParams.append('userRoles', userroles);
86
+
87
+ let device = getDevice(userAgent)
88
+
89
+ if(device){
90
+ if(device === 'PC'){
91
+ url.searchParams.append('device', 'dk')
92
+ } else if(device === 'iPad' || device === 'iPhone') {
93
+ url.searchParams.append('device', 'mtWeb'); // replace with ios when we will have a native ios up for this
94
+ } else {
95
+ url.searchParams.append('device', 'mtWeb')
96
+ }
97
+ }
98
+
99
+ fetch(url.href)
100
+ .then((res: any) => res.json())
101
+ .then((data: any) => {
102
+ isLoading = false;
103
+ promotions = data;
104
+ })
105
+ .catch((err: any) => {
106
+ isLoading = false;
107
+ console.error(err);
108
+ });
109
+ };
110
+
111
+ const messageHandler = (e:any):void => {
112
+ if (e.data) {
113
+ switch(e.data.type) {
114
+ case 'promotionPath':
115
+ promotionPath = e.data.id;
116
+ if(promotionPath == null) {
117
+ isPageOpen = false;
118
+ }
119
+
120
+ break;
121
+ }
122
+ }
123
+ }
124
+
125
+ const promotionHandleing = ():void => {
126
+ openPromo(promotions.find((promotion) => promotion.slug == promotionPath));
127
+ }
128
+
129
+ const openPromo = async (promotion):Promise<any> => {
130
+ if (modalpromotion == 'true') {
131
+ isModalOpen = true;
132
+ promoDetailsTitle = promotion.title;
133
+ promoDetailsContent = promotion.content;
134
+ promoDetailsImage = promotion.image.src;
135
+ promoDetailsSources = promotion.image.sources;
136
+
137
+ promoDetailsTabs = [{
138
+ order: '0',
139
+ tabContent: promoDetailsContent,
140
+ tabDesc: 'Description',
141
+ }, ...promotion.tabs];
142
+
143
+ modalContainer = promotionsContainer.querySelector('.modal');
144
+ bodyWithModal = window.document.querySelector('body');
145
+ modalContainer.classList.add('modal--open');
146
+ bodyWithModal.style.overflow = 'hidden';
147
+
148
+ await tick();
149
+
150
+ switchTabContent(promoDetailsTabs[0], 0);
151
+ } else {
152
+ isPageOpen = true;
153
+ promoDetailsTitle = promotion.title;
154
+ promoDetailsContent = promotion.content;
155
+ promoDetailsImage = promotion.image.src;
156
+ promoDetailsSources = promotion.image.sources;
157
+
158
+ promoDetailsTabs = [{
159
+ order: '0',
160
+ tabContent: promoDetailsContent,
161
+ tabDesc: 'Description',
162
+ }, ...promotion.tabs];
163
+
164
+ window.postMessage({ type: 'handlePromotionPage', pageHandler : 'open', dataPromotion: promotion }, window.location.href);
165
+ }
166
+
167
+
168
+ //Analytics event
169
+ if(typeof gtag == 'function'){
170
+ gtag('event', 'MoreInfo', {
171
+ 'context': 'PromotionsWidget'
172
+ });
173
+ }
174
+ }
175
+
176
+ const closePromo = ():void => {
177
+ if (modalpromotion == 'true') {
178
+ isModalOpen = false;
179
+ modalContainer = promotionsContainer.querySelector('.modal');
180
+ bodyWithModal = window.document.querySelector('body');
181
+ modalContainer.classList.remove('modal--open');
182
+ bodyWithModal.style.overflow = 'initial';
183
+ } else {
184
+ isPageOpen = false;
185
+
186
+ window.postMessage({ type: 'handlePromotionPage', pageHandler : 'back' }, window.location.href);
187
+ }
188
+ }
189
+
190
+ const switchTabContent = (tab:any, index:number):void => {
191
+ modalBodyContent.querySelector('.modal__tab_content').innerHTML = tab.tabContent;
192
+ let modalTabs = modalBodyContent.querySelectorAll('.modal__tab');
193
+
194
+ for (let i = 0; i < modalTabs.length; i++) {
195
+ modalTabs[i].classList.remove('modal__tab--active');
196
+ }
197
+
198
+ modalBodyContent.querySelector(`#tab-${index}`).classList.add('modal__tab--active');
199
+ }
200
+
201
+ const breakpoints = {
202
+ sm: 640,
203
+ md: 768,
204
+ lg: 1024,
205
+ xl: 1280,
206
+ xxl: 1536,
207
+ };
208
+
209
+ const setActiveLanguage = ():void => {
210
+ setLocale(lang);
211
+ }
212
+
213
+ const setClientStyling = () => {
214
+ let sheet = document.createElement('style');
215
+ sheet.innerHTML = clientstyling;
216
+ customStylingContainer.appendChild(sheet);
217
+ }
218
+
219
+ const setClientStylingURL = () => {
220
+ let cssFile:HTMLElement = document.createElement('style');
221
+
222
+ fetch(new URL(clientstylingurl))
223
+ .then((res:any) => res.text())
224
+ .then((data:any) => {
225
+ cssFile.innerHTML = data
226
+
227
+ setTimeout(() => { customStylingContainer.appendChild(cssFile); }, 1);
228
+ });
229
+ }
230
+
231
+ onMount(()=> {
232
+ window.addEventListener('message', messageHandler, false);
233
+
234
+ return () => {
235
+ window.removeEventListener('message', messageHandler);
236
+ }
237
+ });
238
+
239
+ $: currentBreakpoint = Object.entries(breakpoints)
240
+ .reduce((list, [key, value]) => {
241
+ const match = elementWidth >= value ? key : "";
242
+ return [...list, match];
243
+ }, [])
244
+ .join(" ");
245
+
246
+ $: lang && setActiveLanguage();
247
+ $: translationurl && setTranslationUrl();
248
+ $: promotionPath && promotions && promotionHandleing();
249
+ $: endpoint && lang && env && userroles && getCmsData();
250
+ $: clientstyling && customStylingContainer && setClientStyling();
251
+ $: clientstylingurl && customStylingContainer && setClientStylingURL();
252
+ </script>
253
+
254
+ <div class="promotion__wrapper" bind:this={customStylingContainer}>
255
+ {#if isLoading !== true}
256
+ <section class="promotion__section">
257
+ <div class="promotions {currentBreakpoint}" bind:clientWidth={elementWidth} bind:this={promotionsContainer}>
258
+ {#if isPageOpen !== true}
259
+ <div class="promotion__header">
260
+ <div class="svg-container">
261
+ <div class="svg-background"></div>
262
+ <div class="svg-content">
263
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512" version="1.1" xml:space="preserve">
264
+ <circle class="circle" cx="50" cy="50" r="40" fill="none"/>
265
+ <g id="gift_box-box_-heart-love-valentine">
266
+ <path d="M408,160h-64c15.55-0.021,28.483-12.719,28.504-28.269c0.021-15.55-12.568-28.139-28.118-28.118 c0.023-17.486-15.9-31.228-34.048-27.504C297.124,78.82,288,91.085,288,104.575v5.667c-4.256-3.838-9.831-6.242-16-6.242h-32 c-6.169,0-11.744,2.404-16,6.242v-5.667c0-13.491-9.124-25.755-22.339-28.467c-18.148-3.724-34.071,10.018-34.048,27.504 c-15.549-0.021-28.138,12.568-28.118,28.118C139.517,147.281,152.45,159.979,168,160h-64c-17.673,0-32,14.327-32,32v8 c0,17.673,14.327,32,32,32h96v16H96v161.28c0,16.966,13.754,30.72,30.72,30.72H200c8.837,0,16-7.163,16-16V168h80v256 c0,8.837,7.163,16,16,16h73.28c16.966,0,30.72-13.754,30.72-30.72V248H312v-16h96c17.673,0,32-14.327,32-32v-8 C440,174.327,425.673,160,408,160z M232,152v-24c0-4.41,3.586-8,8-8h32c4.414,0,8,3.59,8,8v24H232z"/>
267
+ </g>
268
+ <g id="Layer_1"/>
269
+ </svg>
270
+ </div>
271
+ </div>
272
+ <h1 class="promotions__title">{$_('promotionsTitle')}</h1>
273
+ </div>
274
+ {#if promotions.length > 0}
275
+ <div class="promotions__grid">
276
+ {#each promotions as promotion}
277
+ <div class="promo" part="promo">
278
+ <div class="promo__info">
279
+ <button on:click={openPromo(promotion)}>
280
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" viewBox="0 0 302.967 302.967" xml:space="preserve">
281
+ <path d="M151.483,302.967C67.956,302.967,0,235.017,0,151.483S67.956,0,151.483,0 s151.483,67.956,151.483,151.483S235.017,302.967,151.483,302.967z M151.483,24.416c-70.066,0-127.067,57.001-127.067,127.067 s57.001,127.067,127.067,127.067s127.067-57.001,127.067-127.067S221.555,24.416,151.483,24.416z"/>
282
+ <path d="M116.586,118.12c1.795-4.607,4.297-8.588,7.511-11.961c3.225-3.389,7.114-6.016,11.667-7.898 c4.547-1.904,9.633-2.845,15.262-2.845c7.261,0,13.32,0.995,18.183,2.997c4.857,1.996,8.768,4.482,11.738,7.441 c2.964,2.97,5.091,6.168,6.369,9.584c1.273,3.432,1.915,6.636,1.915,9.595c0,4.901-0.642,8.947-1.915,12.118 c-1.278,3.171-2.866,5.88-4.759,8.131c-1.898,2.252-3.987,4.172-6.293,5.755c-2.295,1.588-4.471,3.171-6.516,4.759 c-2.045,1.583-3.862,3.394-5.445,5.439c-1.588,2.04-2.589,4.601-2.991,7.664v5.831H140.6v-6.908 c0.305-4.395,1.153-8.072,2.529-11.036c1.382-2.964,2.991-5.499,4.83-7.598c1.844-2.089,3.786-3.911,5.836-5.445 c2.04-1.539,3.927-3.073,5.673-4.591c1.73-1.545,3.144-3.225,4.221-5.069c1.071-1.833,1.556-4.15,1.452-6.908 c0-4.705-1.148-8.18-3.454-10.427c-2.295-2.257-5.493-3.378-9.589-3.378c-2.758,0-5.134,0.533-7.131,1.605 s-3.628,2.513-4.911,4.302c-1.278,1.795-2.225,3.894-2.834,6.288c-0.615,2.415-0.919,4.982-0.919,7.756h-22.55 C113.85,127.785,114.791,122.732,116.586,118.12z M162.536,183.938v23.616h-24.09v-23.616H162.536z"/>
283
+ </svg>
284
+ </button>
285
+ </div>
286
+ <picture class="promo__picture">
287
+ {#each promotion.image.sources as imgSource}
288
+ <source
289
+ srcset={imgSource.pictureSource}
290
+ media="({imgSource.media})"
291
+ />
292
+ {/each}
293
+ <img src={promotion.image.src} alt={promotion.title}>
294
+ </picture>
295
+ <div class="promo__details">
296
+ <h2 class="promo__title">{@html promotion.title}</h2>
297
+ </div>
298
+ </div>
299
+ {/each}
300
+ </div>
301
+ {:else}
302
+ <p class="promotions__none">{$_('promotionsNone')}</p>
303
+ {/if}
304
+ {/if}
305
+ <div class="promo__modal modal">
306
+ <div class="modal__backdrop" on:click={closePromo}></div>
307
+ <div class="modal__content">
308
+ <div class="modal__close" on:click={closePromo}>
309
+ <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>
310
+ </div>
311
+ <div class="modal__header">
312
+ <picture class="modal__picture">
313
+ {#each promoDetailsSources as imgSource}
314
+ <source
315
+ srcset={imgSource.pictureSource}
316
+ media="({imgSource.media})"
317
+ />
318
+ {/each}
319
+ <img src={promoDetailsImage} alt={promoDetailsTitle}/>
320
+ </picture>
321
+ </div>
322
+ <div class="modal__body">
323
+ <div class="modal__body_content" bind:this={modalBodyContent}>
324
+ <ul class="modal__tabs">
325
+ {#each promoDetailsTabs as tab, index}
326
+ <li class="modal__tab" id={`tab-${index}`} on:click={switchTabContent(tab, index)}>{tab.tabDesc}</li>
327
+ {/each}
328
+ </ul>
329
+ <div class="modal__tabContentWrapper">
330
+ <h3 class="modal__body_title">{@html promoDetailsTitle}</h3>
331
+ <div class="modal__tab_content">
332
+ {@html promoDetailsContent}
333
+ </div>
334
+ </div>
335
+ </div>
336
+ </div>
337
+ </div>
338
+ </div>
339
+ {#if isPageOpen == true}
340
+ <div class="promo__page page page--open">
341
+ <div class="page__close" on:click={closePromo}>
342
+ <h1>&lt; {$_('promotionsBack')} </h1>
343
+ </div>
344
+ <div class="page__header">
345
+ <h1 class="page__body_title">{@html promoDetailsTitle}</h1>
346
+ <picture class="page__picture">
347
+ {#each promoDetailsSources as imgSource}
348
+ <source
349
+ srcset={imgSource.pictureSource}
350
+ media="({imgSource.media})"
351
+ />
352
+ {/each}
353
+ <img src={promoDetailsImage} alt={promoDetailsTitle}/>
354
+ </picture>
355
+ </div>
356
+ <div class="page__body">
357
+ <div class="page__body_content" bind:this={pageBodyContent}>
358
+ <ul class="page__tabs">
359
+ {#if promoDetailsTabs.length > 0}
360
+ <div class="page__tabContentWrapper">
361
+ <div class="page__tab_content">
362
+ {@html promoDetailsTabs[0].tabContent}
363
+ </div>
364
+ </div>
365
+ {#if promoDetailsTabs[1]}
366
+ <div class="page__tab" on:click={() => {termsHidden = !termsHidden; active = !active}} id={`tab-1`}>
367
+ <h4>{$_('promotionsTerms')}</h4>
368
+ <p class:active={active}>&nabla;</p>
369
+ </div>
370
+ <div class="page__tabContentWrapper {termsHidden ? '' : 'hidden'}">
371
+ <div class="page__tab_content" part="page__tab_content">
372
+ {@html promoDetailsTabs[1].tabContent}
373
+ </div>
374
+ </div>
375
+ {/if}
376
+ {/if}
377
+ </ul>
378
+ </div>
379
+ </div>
380
+ </div>
381
+ {/if}
382
+ </div>
383
+ </section>
384
+ {/if}
385
+ </div>
386
+
387
+ <style lang="scss">
388
+
389
+
390
+ /** Reset */
391
+ *,
392
+ *::before,
393
+ *::after {
394
+ padding: 0;
395
+ list-style: none;
396
+ text-decoration: none;
397
+ outline: none;
398
+ box-sizing: border-box;
399
+ }
400
+
401
+ /** Utility classes */
402
+ .text--ellipsis > * {
403
+ width: 100%;
404
+ white-space: nowrap;
405
+ overflow: hidden;
406
+ text-overflow: ellipsis;
407
+ }
408
+
409
+ .promotion__wrapper{
410
+ min-height: 100vh;
411
+ background-color: var(--emw--casino-color-bg, var(--emw--color-background, #07072A));
412
+ }
413
+
414
+ /** Component styling */
415
+ .promotion__section {
416
+ min-height: 100vh;
417
+ width: 100%;
418
+ background-color: var(--emw--casino-color-bg, var(--emw--color-background, #07072A));
419
+ }
420
+
421
+ .promotion__header{
422
+ display: flex;
423
+ align-items: center;
424
+ justify-content: flex-start;
425
+ gap: 20px;
426
+
427
+ .svg-container {
428
+ display: flex;
429
+ position: relative;
430
+ width: 70px;
431
+ height: 70px;
432
+ align-items: center;
433
+ justify-content: center;
434
+ .svg-background {
435
+ position: absolute;
436
+ top: 0;
437
+ left: 0;
438
+ width: 100%;
439
+ height: 100%;
440
+ z-index: 1;
441
+ background: linear-gradient(
442
+ to top,
443
+ color-mix(in srgb, var(--emw--color-primary, #22B04E) 10%, var(--emw--color-black, black) 90%) 25%,
444
+ color-mix(in srgb, var(--emw--color-primary, #22B04E) 40%, var(--emw--color-black, black) 60%) 40%,
445
+ var(--emw--color-primary, #22B04E) 90% 70%,
446
+ color-mix(in srgb, var(--emw--color-primary, #22B04E) 70%, var(--emw--color-white, white) 30%) 100%
447
+ );
448
+ border-radius:50%;
449
+ z-index: 1;
450
+ }
451
+ .svg-content {
452
+ position: relative;
453
+ z-index: 2;
454
+ background: var(--emw--casino-color-bg, var(--emw--color-background, #07072A));
455
+ padding: 3px 4px;
456
+ border-radius:50%;
457
+
458
+ svg {
459
+ width: 50px;
460
+ height: 50px;
461
+ fill: var(--emw--color-white, white);
462
+ }
463
+ }
464
+ }
465
+ }
466
+
467
+ .promotions {
468
+ margin: 0 auto;
469
+ max-width: 1300px;
470
+ padding: 24px 0;
471
+ color: var(--emw--color-white, #FFFFFF);
472
+ display: flex;
473
+ flex-direction: column;
474
+ gap: 20px;
475
+
476
+ @media screen and (max-width: 1300px) {
477
+ padding: 24px 2.4%;
478
+ }
479
+
480
+ &__title {
481
+ font-size: 22px;
482
+ font-weight: normal;
483
+ margin-bottom: 18px;
484
+ color: var(--emw--color-contrast);
485
+ }
486
+
487
+ &__grid {
488
+ display: grid;
489
+ grid-auto-rows: 220px;
490
+ grid-template-columns: 1fr;
491
+ grid-row-gap: 16px;
492
+
493
+ .md & {
494
+ grid-auto-rows: 260px;
495
+ grid-template-columns: repeat(2, 1fr);
496
+ grid-gap: 20px;
497
+ }
498
+
499
+ .xl & {
500
+ grid-auto-rows: 260px;
501
+ grid-template-columns: repeat(3, 1fr);
502
+ grid-gap: 30px;
503
+ }
504
+ }
505
+
506
+ &__none {
507
+ padding: 50px 0;
508
+ text-align: center;
509
+ font-size: 30px;
510
+ }
511
+ }
512
+
513
+ .promo {
514
+ display: flex;
515
+ position: relative;
516
+ flex-direction: column;
517
+ justify-content: flex-end;
518
+ width: 100%;
519
+ height: auto;
520
+ padding: 12px 8px;
521
+ border-radius: 10px;
522
+ overflow: hidden;
523
+ transition: all 150ms ease;
524
+
525
+ &:hover {
526
+ border: 1px solid var(--emw--color-white, #FFFFFF);
527
+ }
528
+
529
+ &__info {
530
+ z-index: 5;
531
+ position: absolute;
532
+ top: 10px;
533
+ right: 10px;
534
+
535
+ button{
536
+ background: unset;
537
+ border: 0;
538
+ cursor: pointer;
539
+ }
540
+
541
+ svg{
542
+ height: 24px;
543
+ width: 24px;
544
+ fill: var(--emw--color-white, white)
545
+ }
546
+ }
547
+
548
+ &__picture {
549
+ position: absolute;
550
+ width: 100%;
551
+ height: 100%;
552
+ top: 0;
553
+ left: 0;
554
+ z-index: 0;
555
+
556
+ img {
557
+ width: 100%;
558
+ height: 100%;
559
+ object-fit: cover;
560
+ border-radius: 5px;
561
+ }
562
+
563
+ &::before {
564
+ content: "";
565
+ position: absolute;
566
+ top: 0;
567
+ left: 0;
568
+ width: 100%;
569
+ height: 100%;
570
+ background: rgb(0, 0, 0);
571
+ background: linear-gradient(
572
+ 0deg,
573
+ rgba(0, 0, 0, 1) 0%,
574
+ rgba(7, 7, 42, 0.2) 90%
575
+ );
576
+ }
577
+ }
578
+
579
+ &__details {
580
+ padding: 0 10px 13px 17px;
581
+ z-index: 5;
582
+ }
583
+
584
+ &__title {
585
+ display: inline-block;
586
+ margin-bottom: 6px;
587
+ font-size: 18px;
588
+ font-weight: normal;
589
+ }
590
+
591
+ &__content {
592
+ margin-bottom: 15px;
593
+ font-size: 14px;
594
+ }
595
+
596
+ &__button {
597
+ font-size: 14px;
598
+ text-transform: uppercase;
599
+ padding: 10px 20px;
600
+ background: none;
601
+ color: var(--emw--color-white, #FFFFFF);
602
+ border: 1px solid var(--emw--color-white, #FFFFFF);
603
+ border-radius: 5px;
604
+ cursor: pointer;
605
+ transition: all 150ms ease;
606
+
607
+ &:hover {
608
+ background: var(--emw--casino-color-primary, var(--emw--color-primary, #D0046C));
609
+ border: 1px solid var(--emw--casino-color-primary, var(--emw--color-primary, #D0046C));
610
+ }
611
+ }
612
+ }
613
+
614
+ .page{
615
+ display: none;
616
+ margin: 0 auto;
617
+ width: 80%;
618
+ margin-bottom: 40px;
619
+
620
+ &__body_title{
621
+ color: var(--emw--casino-color-primary, var(--emw--color-primary, #D0046C));
622
+ }
623
+
624
+ &--open {
625
+ max-width: 1000px;
626
+ flex-direction: column;
627
+ display: flex;
628
+ position: relative;
629
+ justify-content: center;
630
+ }
631
+
632
+ &__header{
633
+ align-items: stretch;
634
+ text-decoration: underline;
635
+ text-align: center;
636
+
637
+ img{
638
+ width: 90%;
639
+ margin: 2%;
640
+ border-radius: 5px;
641
+ box-shadow: rgba(220, 220, 220, 0.414) 0px 8px 24px;
642
+ }
643
+ }
644
+
645
+ &__tab{
646
+ padding: 0px 30px;
647
+ background-color: grey;
648
+ border-radius: 5px;
649
+ cursor: pointer;
650
+ margin: 35px 0px;
651
+ display: flex;
652
+ justify-content: space-between;
653
+ align-items: center;
654
+ transition: all 150ms ease;
655
+
656
+ .active {
657
+ -moz-transform:rotate(180deg);
658
+ -webkit-transform:rotate(180deg);
659
+ transform:rotate(180deg);
660
+ -moz-transition: all .5s linear;
661
+ -webkit-transition: all .5s linear;
662
+ transition: all .5s linear;
663
+ }
664
+ p{
665
+ font-size: 20px;
666
+ outline: 0;
667
+ }
668
+
669
+ p:focus{
670
+ -webkit-transform: rotate(95deg);
671
+ -ms-transform: rotate(95deg);
672
+ transform: rotate(95deg);
673
+ }
674
+ &:hover {
675
+ background-color: var(--emw--casino-color-primary, var(--emw--color-primary, #D0046C));
676
+ }
677
+ }
678
+
679
+ &__tabContentWrapper{
680
+ &.hidden {
681
+ display: none;
682
+ }
683
+ }
684
+
685
+ &__close {
686
+ height: 40px;
687
+ cursor: pointer;
688
+ transition: all 150ms ease;
689
+ color: var(--emw--color-contrast, #FFFFFF);
690
+ background-color: rgba(20, 20, 32, 0.3);
691
+ border-radius: 50%;
692
+ width: max-content;
693
+ font-size: 75%;
694
+
695
+ &:hover {
696
+ color: var(--emw--casino-color-primary, var(--emw--color-primary, #D0046C));
697
+ }
698
+ }
699
+ }
700
+
701
+ .modal {
702
+ display: none;
703
+ justify-content: center;
704
+ align-items: center;
705
+ position: fixed;
706
+ top: 0;
707
+ left: 0;
708
+ width: 100vw;
709
+ height: 100vh;
710
+ z-index: 100;
711
+
712
+ &--open {
713
+ display: flex;
714
+ }
715
+
716
+ &__backdrop {
717
+ position: absolute;
718
+ background-color: var(--emw--casino-contrast, var(--emw--color-background, #07072A));
719
+ opacity: 0.6;
720
+ width: 100%;
721
+ height: 100%;
722
+ z-index: 105;
723
+ }
724
+
725
+ &__content {
726
+ position: relative;
727
+ display: flex;
728
+ flex-direction: column;
729
+ width: 100%;
730
+ background-color: var(--emw--color-gray-50, #F9F8F8);
731
+ z-index: 110;
732
+ border-radius: 5px;
733
+
734
+ .md & {
735
+ width: 700px;
736
+ height: 70%;
737
+ }
738
+ }
739
+
740
+ &__close {
741
+ position: absolute;
742
+ width: 36px;
743
+ height: 36px;
744
+ top: 10px;
745
+ right: 10px;
746
+ z-index: 110;
747
+ cursor: pointer;
748
+ transition: all 150ms ease;
749
+ color: var(--emw--color-white, #FFFFFF);
750
+ background-color: rgba(20, 20, 32, 0.3);
751
+ border-radius: 50%;
752
+
753
+
754
+ &:hover {
755
+ color: var(--emw--categories-color-secondary, var(--emw--color-secondary, #FD2839));
756
+ }
757
+ }
758
+
759
+ &__picture img {
760
+ width: 100%;
761
+ height: 200px;
762
+ object-fit: cover;
763
+ border-top: 3px solid var(--emw--categories-color-secondary, var(--emw--color-secondary, #FD2839));
764
+ border-top-left-radius: 5px;
765
+ border-top-right-radius: 5px;
766
+
767
+ .md & {
768
+ height: 300px;
769
+ }
770
+ }
771
+
772
+ &__body {
773
+ padding: 16px 8px;
774
+ color: var(--emw--color-black, #000000);
775
+ height: calc(100vh - 200px);
776
+ overflow-y: auto;
777
+ border-top-left-radius: 5px;
778
+ border-top-right-radius: 5px;
779
+
780
+ &_title {
781
+ font-size: 18px;
782
+ margin-bottom: 10px;
783
+ color: var(--emw--casino-color-primary, var(--emw--color-primary, #D0046C));
784
+ }
785
+
786
+ &_content {
787
+ font-size: 14px;
788
+ line-height: 1.3;
789
+
790
+ * {
791
+ margin-bottom: 8px;
792
+ }
793
+ }
794
+
795
+ .md & {
796
+ height: calc(100vh - 300px);
797
+ padding: 22px 8%;
798
+ }
799
+
800
+ .lg & {
801
+ padding: 30px 40px;
802
+ }
803
+ }
804
+
805
+ &__tabs {
806
+ position: relative;
807
+ display: inline-flex;
808
+ width: 100%;
809
+ flex-wrap: nowrap;
810
+ gap: 14px;
811
+ white-space: nowrap;
812
+ overflow-x: auto;
813
+ margin-bottom: 20px;
814
+
815
+ &::before {
816
+ content: '';
817
+ position: absolute;
818
+ bottom: 4px;
819
+ left: 0;
820
+ width: 100%;
821
+ height: 2px;
822
+ background-color: var(--emw--color-gray-100, #E6E6E6);
823
+ z-index: 125;
824
+ }
825
+ }
826
+
827
+ &__tab {
828
+ background: none;
829
+ border: none;
830
+ padding: 8px 0;
831
+ color: var(--emw--color-gray-150, #828282);
832
+ font-size: 14px;
833
+ cursor: pointer;
834
+ transition: all 150ms ease;
835
+
836
+ &--active {
837
+ position: relative;
838
+ color: var(--emw--casino-contrast, var(--emw--color-contrast, #07072A));
839
+ z-index: 130;
840
+
841
+ &:before {
842
+ content: '';
843
+ left: 0;
844
+ bottom: -4px;
845
+ position: absolute;
846
+ width: 100%;
847
+ height: 2px;
848
+ background-color: var(--emw--casino-contrast, var(--emw--color-background, #07072A));
849
+ }
850
+ }
851
+
852
+ &:hover {
853
+ color: var(--emw--casino-contrast, var(--emw--color-contrast, #07072A));
854
+ }
855
+ }
856
+ }
857
+ </style>