@constructor-io/constructorio-ui-quizzes 1.5.0 → 1.5.2

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.
Files changed (34) hide show
  1. package/dist/constructorio-ui-quizzes-bundled.js +15 -15
  2. package/lib/cjs/components/CioQuiz/index.js +3 -1
  3. package/lib/cjs/components/ResultCard/ResultCard.js +3 -1
  4. package/lib/cjs/components/ResultFavoritesButton/ResultFavoritesButton.js +18 -0
  5. package/lib/cjs/constants.js +2 -0
  6. package/lib/cjs/hooks/usePropsGetters/index.js +4 -1
  7. package/lib/cjs/hooks/usePropsGetters/useAddToFavoritesButtonProps.js +25 -0
  8. package/lib/cjs/hooks/useQuizEvents/index.js +4 -1
  9. package/lib/cjs/hooks/useQuizEvents/useQuizAddToFavorites.js +22 -0
  10. package/lib/cjs/services/index.js +4 -1
  11. package/lib/cjs/stories/Quiz/tests/mocks.js +3 -1
  12. package/lib/cjs/utils.js +1 -0
  13. package/lib/mjs/components/CioQuiz/index.js +3 -1
  14. package/lib/mjs/components/ResultCard/ResultCard.js +3 -1
  15. package/lib/mjs/components/ResultFavoritesButton/ResultFavoritesButton.js +14 -0
  16. package/lib/mjs/constants.js +2 -0
  17. package/lib/mjs/hooks/usePropsGetters/index.js +4 -1
  18. package/lib/mjs/hooks/usePropsGetters/useAddToFavoritesButtonProps.js +18 -0
  19. package/lib/mjs/hooks/useQuizEvents/index.js +4 -1
  20. package/lib/mjs/hooks/useQuizEvents/useQuizAddToFavorites.js +20 -0
  21. package/lib/mjs/services/index.js +4 -1
  22. package/lib/mjs/stories/Quiz/tests/mocks.js +9 -1
  23. package/lib/mjs/utils.js +1 -0
  24. package/lib/styles.css +149 -132
  25. package/lib/types/components/CioQuiz/context.d.ts +3 -1
  26. package/lib/types/components/ResultFavoritesButton/ResultFavoritesButton.d.ts +11 -0
  27. package/lib/types/constants.d.ts +2 -2
  28. package/lib/types/hooks/usePropsGetters/index.d.ts +2 -1
  29. package/lib/types/hooks/usePropsGetters/useAddToFavoritesButtonProps.d.ts +2 -0
  30. package/lib/types/hooks/useQuizEvents/useQuizAddToFavorites.d.ts +5 -0
  31. package/lib/types/services/index.d.ts +1 -1
  32. package/lib/types/types.d.ts +6 -0
  33. package/lib/types/utils.d.ts +1 -0
  34. package/package.json +1 -1
package/lib/styles.css CHANGED
@@ -73,7 +73,7 @@
73
73
  }
74
74
 
75
75
  /* Container */
76
- .cio-container {
76
+ .cio-quiz .cio-container {
77
77
  display: flex;
78
78
  justify-content: center;
79
79
  margin-top: 2rem;
@@ -81,22 +81,20 @@
81
81
  width: 100%;
82
82
  position: relative;
83
83
  align-self: start;
84
- height: calc(
85
- 100% - 2rem - calc(var(--bottom-bar-height))
86
- ); /* Full height - margin - control bar */
84
+ height: calc(100% - 2rem - var(--bottom-bar-height)); /* Full height - margin - control bar */
87
85
  }
88
- .cio-container--with-image {
86
+ .cio-quiz .cio-container--with-image {
89
87
  display: flex;
90
88
  flex-direction: column;
91
89
  width: 100%;
92
90
  padding-bottom: var(--bottom-bar-height);
93
91
  position: relative;
94
92
  align-self: start;
95
- height: calc(100% - calc(var(--bottom-bar-height))); /* Full height - margin - control bar */
93
+ height: calc(100% - var(--bottom-bar-height)); /* Full height - margin - control bar */
96
94
  }
97
95
 
98
96
  /* Background image */
99
- .cio-question-background-image {
97
+ .cio-quiz .cio-question-background-image {
100
98
  height: calc(100% - 4px);
101
99
  width: 100%;
102
100
  position: absolute;
@@ -104,7 +102,7 @@
104
102
  }
105
103
 
106
104
  /* Session Prompt Modal */
107
- .cio-session-prompt-modal {
105
+ .cio-quiz .cio-session-prompt-modal {
108
106
  position: absolute;
109
107
  display: flex;
110
108
  z-index: 100;
@@ -114,11 +112,11 @@
114
112
  justify-content: space-between;
115
113
  }
116
114
 
117
- .cio-session-prompt-container {
115
+ .cio-quiz .cio-session-prompt-container {
118
116
  margin: auto;
119
117
  }
120
118
 
121
- .cio-session-prompt-content {
119
+ .cio-quiz .cio-session-prompt-content {
122
120
  display: flex;
123
121
  flex-direction: column;
124
122
  gap: 1rem;
@@ -130,49 +128,52 @@
130
128
  line-height: 1.5;
131
129
  }
132
130
 
133
- .cio-session-prompt-controls-container {
131
+ .cio-quiz .cio-session-prompt-controls-container {
134
132
  display: flex;
135
133
  justify-content: space-between;
136
134
  gap: 1rem;
137
135
  }
138
136
 
139
- .cio-session-prompt-content .cio-button-container {
137
+ .cio-quiz .cio-session-prompt-content .cio-button-container {
140
138
  margin: 0px;
141
139
  padding: 0px;
142
140
  }
143
141
 
144
- .cio-session-prompt-controls-container .cio-button-container:nth-child(1) .cio-question-cta-button {
142
+ .cio-quiz
143
+ .cio-session-prompt-controls-container
144
+ .cio-button-container:nth-child(1)
145
+ .cio-question-cta-button {
145
146
  color: var(--primary-color);
146
147
  background-color: #ffffff;
147
148
  }
148
149
 
149
150
  /* Content */
150
- .cio-question-content {
151
+ .cio-quiz .cio-question-content {
151
152
  display: flex;
152
153
  flex-direction: column;
153
154
  padding: 1rem;
154
155
  }
155
156
 
156
157
  /* Title */
157
- .cio-question-title {
158
+ .cio-quiz .cio-question-title {
158
159
  font-size: 2.125em;
159
160
  margin: 0;
160
161
  }
161
162
 
162
163
  /* Description */
163
- .cio-question-description {
164
+ .cio-quiz .cio-question-description {
164
165
  font-size: 1em;
165
166
  line-height: 1.5;
166
167
  margin-top: 1.5rem;
167
168
  }
168
169
 
169
170
  /* Image */
170
- .cio-question-image {
171
+ .cio-quiz .cio-question-image {
171
172
  width: 100%;
172
173
  height: 100%;
173
174
  object-fit: cover;
174
175
  }
175
- .cio-question-image-container {
176
+ .cio-quiz .cio-question-image-container {
176
177
  box-sizing: border-box;
177
178
  width: 100%;
178
179
  object-fit: cover;
@@ -183,7 +184,7 @@
183
184
  }
184
185
 
185
186
  /* Input */
186
- .cio-question-input-text {
187
+ .cio-quiz .cio-question-input-text {
187
188
  width: 100%;
188
189
  padding: 0.5rem;
189
190
  border: 0;
@@ -193,16 +194,16 @@
193
194
  outline: none;
194
195
  font-size: 1rem;
195
196
  }
196
- .cio-question-input-text:focus,
197
- .cio-question-input-text:active {
197
+ .cio-quiz .cio-question-input-text:focus,
198
+ .cio-quiz .cio-question-input-text:active {
198
199
  border-bottom: 1px solid var(--primary-color-variant-500);
199
200
  }
200
- .cio-question-input-text::placeholder {
201
+ .cio-quiz .cio-question-input-text::placeholder {
201
202
  color: var(--gray-dust-100);
202
203
  }
203
204
 
204
205
  /* CTA Button Component */
205
- .cio-question-buttons-container {
206
+ .cio-quiz .cio-question-buttons-container {
206
207
  width: 100%;
207
208
  height: var(--bottom-bar-height);
208
209
  padding: 8px 16px;
@@ -214,10 +215,10 @@
214
215
  background-color: rgba(255, 255, 255, 0.87);
215
216
  align-items: center;
216
217
  }
217
- .cio-question-cta-button {
218
+ .cio-quiz .cio-question-cta-button {
218
219
  background: var(--primary-color);
219
220
  color: #ffffff;
220
- border: 1px solid var(--primary-color);
221
+ border: 2px solid var(--primary-color);
221
222
  border-radius: 4px;
222
223
  height: 3rem;
223
224
  font-size: 1rem;
@@ -225,25 +226,25 @@
225
226
  margin-left: auto;
226
227
  width: 100%;
227
228
  }
228
- .cio-button-container {
229
+ .cio-quiz .cio-button-container {
229
230
  max-width: 10rem;
230
231
  flex-grow: 1;
231
232
  margin-left: auto;
232
233
  padding-left: 1rem;
233
234
  }
234
- .cio-question-cta-button:hover {
235
+ .cio-quiz .cio-question-cta-button:hover {
235
236
  background: var(--primary-color-variant-500);
236
237
  border: 2px solid var(--primary-color-variant-600);
237
238
  }
238
- .cio-question-cta-button:active {
239
+ .cio-quiz .cio-question-cta-button:active {
239
240
  background: var(--primary-color-variant-700);
240
241
  border: 2px solid var(--primary-color-variant-800);
241
242
  }
242
- .cio-question-cta-button:focus {
243
+ .cio-quiz .cio-question-cta-button:focus {
243
244
  outline: 3px solid var(--primary-color-variant-100);
244
245
  }
245
- .cio-question-cta-button:disabled,
246
- .cio-question-cta-button.disabled {
246
+ .cio-quiz .cio-question-cta-button:disabled,
247
+ .cio-quiz .cio-question-cta-button.disabled {
247
248
  background: var(--gray-dust-200);
248
249
  border: 2px solid var(--gray-dust-200);
249
250
  cursor: auto;
@@ -251,7 +252,7 @@
251
252
  }
252
253
 
253
254
  /* Back Button Component */
254
- .cio-question-back-button {
255
+ .cio-quiz .cio-question-back-button {
255
256
  color: var(--primary-color);
256
257
  background: #ffffff;
257
258
  border: 1px solid var(--primary-color);
@@ -261,32 +262,32 @@
261
262
  font-size: 1rem;
262
263
  margin-right: 4rem;
263
264
  }
264
- .cio-question-back-button:hover {
265
+ .cio-quiz .cio-question-back-button:hover {
265
266
  border: 2px solid var(--primary-color-variant-600);
266
267
  }
267
- .cio-question-back-button:active {
268
+ .cio-quiz .cio-question-back-button:active {
268
269
  border: 2px solid var(--primary-color-variant-700);
269
270
  }
270
- .cio-question-back-button:focus {
271
+ .cio-quiz .cio-question-back-button:focus {
271
272
  outline: 3px solid var(--primary-color-variant-100);
272
273
  }
273
- .cio-question-back-button.disabled {
274
+ .cio-quiz .cio-question-back-button.disabled {
274
275
  display: none;
275
276
  }
276
277
 
277
- .cio-question-back-button svg {
278
+ .cio-quiz .cio-question-back-button svg {
278
279
  display: inline;
279
280
  }
280
281
 
281
282
  /* Cover Page Component */
282
- .cio-cover-question-container--with-image {
283
+ .cio-quiz .cio-cover-question-container--with-image {
283
284
  padding: 0;
284
285
  padding-bottom: var(--bottom-bar-height);
285
286
  }
286
287
 
287
288
  /** Select Component */
288
289
  /* Options */
289
- .cio-question-option-container {
290
+ .cio-quiz .cio-question-option-container {
290
291
  padding: 1.5rem;
291
292
  border-radius: 8px;
292
293
  border: 1px solid var(--primary-color-variant-100);
@@ -297,23 +298,23 @@
297
298
  cursor: pointer;
298
299
  background-color: white;
299
300
  }
300
- .cio-question-option-container.selected {
301
+ .cio-quiz .cio-question-option-container.selected {
301
302
  outline: 3px solid var(--primary-color-variant-600);
302
303
  box-shadow: 0px 4px 10px rgba(93, 124, 232, 0.35);
303
304
  }
304
- .cio-question-option-container-text-only.selected {
305
+ .cio-quiz .cio-question-option-container-text-only.selected {
305
306
  outline: 3px solid var(--primary-color-variant-600);
306
307
  box-shadow: 0px 4px 10px rgba(93, 124, 232, 0.35);
307
308
  }
308
- .cio-question-option-container:hover:not(.selected) {
309
+ .cio-quiz .cio-question-option-container:hover:not(.selected) {
309
310
  outline: 1px solid var(--primary-color-variant-600);
310
311
  box-shadow: 0px 4px 10px rgba(93, 124, 232, 0.25);
311
312
  }
312
- .cio-question-option-container-text-only:hover:not(.selected) {
313
+ .cio-quiz .cio-question-option-container-text-only:hover:not(.selected) {
313
314
  outline: 1px solid var(--primary-color-variant-600);
314
315
  box-shadow: 0px 4px 10px rgba(93, 124, 232, 0.25);
315
316
  }
316
- .cio-select-question-container {
317
+ .cio-quiz .cio-select-question-container {
317
318
  position: relative;
318
319
  display: flex;
319
320
  flex-direction: column;
@@ -321,14 +322,12 @@
321
322
  max-width: 1200px;
322
323
  padding: 1rem;
323
324
  margin-top: 2rem;
324
- min-height: calc(
325
- 100% - 2rem - calc(var(--bottom-bar-height))
326
- ); /* Full height - padding - margin */
325
+ min-height: calc(100% - 2rem - var(--bottom-bar-height)); /* Full height - padding - margin */
327
326
  width: 100%;
328
327
  margin-right: auto;
329
328
  margin-left: auto;
330
329
  }
331
- .cio-question-options-container {
330
+ .cio-quiz .cio-question-options-container {
332
331
  display: flex;
333
332
  justify-content: center;
334
333
  flex-wrap: wrap;
@@ -337,7 +336,7 @@
337
336
  margin-bottom: var(--bottom-bar-height);
338
337
  margin-top: 2rem;
339
338
  }
340
- .cio-question-options-container-text-only {
339
+ .cio-quiz .cio-question-options-container-text-only {
341
340
  display: flex;
342
341
  flex-direction: column;
343
342
  gap: 1rem;
@@ -346,7 +345,7 @@
346
345
  margin-bottom: var(--bottom-bar-height);
347
346
  margin-top: 2rem;
348
347
  }
349
- .cio-question-option-container-text-only {
348
+ .cio-quiz .cio-question-option-container-text-only {
350
349
  padding: 1.5rem;
351
350
  border-radius: 8px;
352
351
  border: 1px solid var(--primary-color-variant-100);
@@ -360,7 +359,7 @@
360
359
  }
361
360
 
362
361
  /* Option Image */
363
- .cio-question-option-image {
362
+ .cio-quiz .cio-question-option-image {
364
363
  width: 100%;
365
364
  height: auto;
366
365
  border-radius: 4px;
@@ -370,24 +369,24 @@
370
369
  }
371
370
 
372
371
  /* Select Option Value */
373
- .cio-question-option-value {
372
+ .cio-quiz .cio-question-option-value {
374
373
  text-align: center;
375
374
  margin: auto 0;
376
375
  }
377
376
 
378
377
  /* Select Text and Description */
379
- .cio-select-question-text {
378
+ .cio-quiz .cio-select-question-text {
380
379
  width: 100%;
381
380
  display: flex;
382
381
  flex-direction: column;
383
382
  justify-content: space-between;
384
383
  }
385
- .cio-select-question-text .cio-question-description {
384
+ .cio-quiz .cio-select-question-text .cio-question-description {
386
385
  margin-bottom: 0;
387
386
  }
388
387
 
389
388
  /* Select Instructions */
390
- .cio-select-question-instructions {
389
+ .cio-quiz .cio-select-question-instructions {
391
390
  text-align: center;
392
391
  font-size: 1.125rem;
393
392
  color: var(--gray-dust-100);
@@ -397,7 +396,7 @@
397
396
  }
398
397
 
399
398
  /* Results component */
400
- .cio-results-container {
399
+ .cio-quiz .cio-results-container {
401
400
  width: 100%;
402
401
  max-width: 1200px;
403
402
  padding: 2rem 1rem;
@@ -406,25 +405,25 @@
406
405
  margin-right: auto;
407
406
  margin-left: auto;
408
407
  }
409
- .cio-results-title {
408
+ .cio-quiz .cio-results-title {
410
409
  margin-top: 0;
411
410
  margin-bottom: 1rem;
412
411
  color: var(--gray-dust-500);
413
412
  }
414
- .cio-results-filter-container {
413
+ .cio-quiz .cio-results-filter-container {
415
414
  margin-bottom: 1.5rem;
416
415
  }
417
- .cio-results-filter-container p {
416
+ .cio-quiz .cio-results-filter-container p {
418
417
  color: var(--gray-dust-500);
419
418
  margin-bottom: 1.5rem;
420
419
  }
421
- .cio-results-filter-options {
420
+ .cio-quiz .cio-results-filter-options {
422
421
  display: flex;
423
422
  flex-wrap: wrap;
424
423
  gap: 0.5rem;
425
424
  cursor: default;
426
425
  }
427
- .cio-results-filter-option {
426
+ .cio-quiz .cio-results-filter-option {
428
427
  background-color: #ffffff;
429
428
  border: 1px solid var(--primary-color);
430
429
  color: var(--primary-color-variant-500);
@@ -435,12 +434,12 @@
435
434
  align-items: center;
436
435
  font-size: 0.75rem;
437
436
  }
438
- .cio-results {
437
+ .cio-quiz .cio-results {
439
438
  display: flex;
440
439
  flex-direction: row;
441
440
  flex-wrap: wrap;
442
441
  }
443
- .cio-zero-results {
442
+ .cio-quiz .cio-zero-results {
444
443
  margin-top: 2rem;
445
444
  text-align: center;
446
445
  display: flex;
@@ -450,7 +449,7 @@
450
449
  margin-left: auto;
451
450
  margin-right: auto;
452
451
  }
453
- .cio-zero-results-subtitle {
452
+ .cio-quiz .cio-zero-results-subtitle {
454
453
  font-weight: 500;
455
454
  font-size: 1.25rem;
456
455
  line-height: 1.5rem;
@@ -458,7 +457,7 @@
458
457
  color: var(--gray-dust-500);
459
458
  margin-top: 0;
460
459
  }
461
- .cio-zero-results .cio-button-container {
460
+ .cio-quiz .cio-zero-results .cio-button-container {
462
461
  width: 14rem;
463
462
  margin-right: auto;
464
463
  margin-left: auto;
@@ -466,7 +465,7 @@
466
465
  }
467
466
 
468
467
  /* Result Card component */
469
- .cio-result-card {
468
+ .cio-quiz .cio-result-card {
470
469
  background-color: transparent;
471
470
  height: auto;
472
471
  box-sizing: border-box;
@@ -477,8 +476,8 @@
477
476
  display: flex;
478
477
  flex-direction: column;
479
478
  }
480
- .cio-result-card-anchor,
481
- .cio-result-card-container {
479
+ .cio-quiz .cio-result-card-anchor,
480
+ .cio-quiz .cio-result-card-container {
482
481
  text-decoration: none;
483
482
  background-color: transparent;
484
483
  color: inherit;
@@ -487,97 +486,115 @@
487
486
  flex-direction: column;
488
487
  justify-content: space-between;
489
488
  }
490
- .cio-result-card-image {
489
+ .cio-quiz .cio-result-card-image {
491
490
  width: auto;
492
491
  height: 240px;
493
492
  margin-left: auto;
494
493
  margin-right: auto;
495
494
  margin-bottom: 10px;
496
495
  }
497
- .cio-result-card-image img {
496
+ .cio-quiz .cio-result-card-image img {
498
497
  height: 100%;
499
498
  width: 100%;
500
499
  object-fit: contain;
501
500
  }
502
- .cio-result-card-text {
501
+ .cio-quiz .cio-result-card-text {
503
502
  flex-grow: 1;
504
503
  display: flex;
505
504
  flex-direction: column;
506
505
  justify-content: space-between;
507
506
  text-decoration: none;
508
507
  }
509
- .cio-result-card-title {
508
+ .cio-quiz .cio-result-card-title {
510
509
  color: var(--gray-dust-500);
511
510
  margin: 0;
512
511
  margin-bottom: 1rem;
513
512
  font-weight: 700;
514
513
  }
515
- .cio-result-card-prices {
514
+ .cio-quiz .cio-result-card-prices {
516
515
  margin-bottom: 1rem;
517
516
  font-weight: 700;
518
517
  }
519
- .cio-result-card-sale-price {
518
+ .cio-quiz .cio-result-card-sale-price {
520
519
  color: #bf1728;
521
520
  margin-right: 0.75rem;
522
521
  }
523
- .cio-result-card-regular-price {
522
+ .cio-quiz .cio-result-card-regular-price {
524
523
  color: var(--gray-dust-900);
525
524
  }
526
- .cio-result-card-regular-price--strike-through {
525
+ .cio-quiz .cio-result-card-regular-price--strike-through {
527
526
  text-decoration: line-through;
528
527
  }
529
- .cio-result-card-rating {
528
+ .cio-quiz .cio-result-card-rating {
530
529
  margin-bottom: 10px;
531
530
  }
532
- .cio-result-card-rating-score {
531
+ .cio-quiz .cio-result-card-rating-score {
533
532
  margin-right: 5px;
534
533
  }
535
- .cio-result-card-discount {
536
- font-weight: normal;
537
- font-size: .9em;
538
- margin-top: 4px;
534
+
535
+ /* Result Favorites Button*/
536
+ .cio-quiz .cio-result-card-favorites-button {
537
+ background: none;
538
+ color: inherit;
539
+ border: none;
540
+ padding: 0;
541
+ font: inherit;
542
+ cursor: pointer;
543
+ outline: inherit;
544
+ width: 25px;
545
+ margin-left: auto;
546
+ margin-bottom: 1rem;
547
+ }
548
+
549
+ .cio-quiz .cio-result-card-favorites-button.favorited svg {
550
+ fill: red;
551
+ }
552
+
553
+ .cio-quiz .cio-result-card-favorites-button svg:hover {
554
+ stroke: black;
555
+ stroke-width: 1px;
539
556
  }
540
557
 
541
558
  /* Result CTA Button */
542
- .cio-result-card-cta-button {
559
+ .cio-quiz .cio-result-card-cta-button {
543
560
  padding: 0.75rem 2.5rem;
544
561
  height: 3rem;
545
562
  background: var(--primary-color);
546
- border: 1px solid var(--primary-color);
563
+ border: 2px solid var(--primary-color);
547
564
  border-radius: 4px;
548
565
  color: #ffffff;
549
566
  font-size: 1rem;
550
567
  width: 100%;
551
568
  }
552
- .cio-result-card-cta-button:hover {
569
+ .cio-quiz .cio-result-card-cta-button:hover {
553
570
  background: var(--primary-color-variant-500);
554
571
  border: 2px solid var(--primary-color-variant-600);
555
572
  }
556
- .cio-result-card-cta-button:active {
573
+ .cio-quiz .cio-result-card-cta-button:active {
557
574
  background: var(--primary-color-variant-700);
558
575
  border: 2px solid var(--primary-color-variant-800);
559
576
  }
560
- .cio-result-card-cta-button:focus {
577
+ .cio-quiz .cio-result-card-cta-button:focus {
561
578
  outline: 3px solid var(--primary-color-variant-100);
562
579
  }
563
- .cio-result-card-cta-button:disabled,
564
- .cio-result-card-cta-button.disabled {
580
+ .cio-quiz .cio-result-card-cta-button:disabled,
581
+ .cio-quiz .cio-result-card-cta-button.disabled {
565
582
  background: var(--gray-dust-200);
566
583
  border: 2px solid var(--gray-dust-200);
567
584
  }
568
585
 
569
586
  /* Redo Button Component */
570
- .cio-question-redo-button {
587
+ .cio-quiz .cio-question-redo-button {
571
588
  background: none;
572
589
  border: none;
573
590
  display: flex;
574
591
  gap: 0.5rem;
575
592
  align-items: center;
576
593
  }
577
- .cio-question-redo-button:hover {
594
+ .cio-quiz .cio-question-redo-button:hover {
578
595
  text-decoration: underline;
579
596
  }
580
- .cio-question-redo-button span {
597
+ .cio-quiz .cio-question-redo-button span {
581
598
  margin-top: 1px;
582
599
  }
583
600
 
@@ -585,13 +602,13 @@
585
602
 
586
603
  /* Small Tablet */
587
604
  @container quiz (min-width: 640px) {
588
- .cio-container {
605
+ .cio-quiz .cio-container {
589
606
  padding-bottom: 0;
590
607
  align-self: normal;
591
608
  }
592
609
 
593
610
  /* Container */
594
- .cio-container--with-image {
611
+ .cio-quiz .cio-container--with-image {
595
612
  display: flex;
596
613
  align-items: center;
597
614
  margin-bottom: 0;
@@ -600,45 +617,45 @@
600
617
  }
601
618
 
602
619
  /* Image */
603
- .cio-question-image-container {
620
+ .cio-quiz .cio-question-image-container {
604
621
  flex-basis: 50%;
605
622
  flex-shrink: 0;
606
623
  border-radius: 4px;
607
624
  }
608
625
 
609
626
  /* Cover Page Component */
610
- .cio-cover-question-container--with-image {
627
+ .cio-quiz .cio-cover-question-container--with-image {
611
628
  margin-bottom: 0;
612
629
  padding-bottom: 0;
613
630
  }
614
631
 
615
632
  /* Select Component */
616
- .cio-select-question-text {
633
+ .cio-quiz .cio-select-question-text {
617
634
  margin-top: 2rem;
618
635
  }
619
- .cio-select-question-buttons {
636
+ .cio-quiz .cio-select-question-buttons {
620
637
  padding: 1rem 3rem;
621
638
  }
622
639
 
623
640
  /* Results component */
624
- .cio-results-container {
641
+ .cio-quiz .cio-results-container {
625
642
  padding: 3rem 4rem;
626
643
  }
627
- .cio-results-filter-and-redo-container {
644
+ .cio-quiz .cio-results-filter-and-redo-container {
628
645
  display: flex;
629
646
  justify-content: space-between;
630
647
  align-items: end;
631
648
  margin-bottom: 1.5rem;
632
649
  }
633
- .cio-results-filter-container {
650
+ .cio-quiz .cio-results-filter-container {
634
651
  margin-bottom: 0;
635
652
  }
636
- .cio-results {
653
+ .cio-quiz .cio-results {
637
654
  column-gap: 5%;
638
655
  }
639
656
 
640
657
  /* Result Card component */
641
- .cio-result-card {
658
+ .cio-quiz .cio-result-card {
642
659
  flex-basis: 30%;
643
660
  }
644
661
  }
@@ -646,34 +663,34 @@
646
663
  /* Big Tablet */
647
664
  @container quiz (min-width: 768px) {
648
665
  /* Container */
649
- .cio-container {
666
+ .cio-quiz .cio-container {
650
667
  align-items: center;
651
668
  margin-top: 0;
652
- height: calc(100% - calc(var(--bottom-bar-height))); /* Full height - control bar */
669
+ height: calc(100% - var(--bottom-bar-height)); /* Full height - control bar */
653
670
  }
654
- .cio-container--with-image {
671
+ .cio-quiz .cio-container--with-image {
655
672
  padding: 6% 2%;
656
673
  align-items: center;
657
674
  flex-direction: row;
658
675
  justify-content: center;
659
676
  }
660
- .cio-cover-question-container--with-image {
677
+ .cio-quiz .cio-cover-question-container--with-image {
661
678
  flex-direction: row-reverse;
662
679
  }
663
680
 
664
681
  /* Input */
665
- .cio-question-input-text {
682
+ .cio-quiz .cio-question-input-text {
666
683
  margin-bottom: 1rem;
667
684
  }
668
685
 
669
686
  /* Image */
670
- .cio-question-image-container {
687
+ .cio-quiz .cio-question-image-container {
671
688
  max-height: unset;
672
689
  height: unset;
673
690
  }
674
691
 
675
692
  /* Content */
676
- .cio-question-content {
693
+ .cio-quiz .cio-question-content {
677
694
  justify-content: center;
678
695
  height: fit-content;
679
696
  flex-basis: 70%;
@@ -683,47 +700,47 @@
683
700
  }
684
701
 
685
702
  /* Description */
686
- .cio-question-description {
703
+ .cio-quiz .cio-question-description {
687
704
  margin-bottom: 2rem;
688
705
  }
689
706
 
690
707
  /* Cover Component */
691
- .cio-cover-question-container--with-image {
708
+ .cio-quiz .cio-cover-question-container--with-image {
692
709
  padding: 0;
693
710
  }
694
711
 
695
712
  /* Select Component */
696
- .cio-select-question-text {
713
+ .cio-quiz .cio-select-question-text {
697
714
  padding: 0;
698
715
  padding-bottom: 2rem;
699
716
  margin: 0;
700
717
  }
701
- .cio-select-question-buttons {
718
+ .cio-quiz .cio-select-question-buttons {
702
719
  padding: 1rem 5rem;
703
720
  }
704
- .cio-select-question-container {
721
+ .cio-quiz .cio-select-question-container {
705
722
  justify-content: center;
706
723
  margin-bottom: 0;
707
724
  margin-top: 0;
708
725
  padding: 2rem;
709
726
  padding-bottom: 0;
710
- min-height: calc(100% - calc(var(--bottom-bar-height))); /* Full height - padding - margin */
727
+ min-height: calc(100% - var(--bottom-bar-height)); /* Full height - padding - margin */
711
728
  }
712
- .cio-question-option-container {
729
+ .cio-quiz .cio-question-option-container {
713
730
  width: calc(25% - 13px);
714
731
  }
715
- .cio-question-options-container {
732
+ .cio-quiz .cio-question-options-container {
716
733
  padding: 0;
717
734
  margin-bottom: 2rem;
718
735
  }
719
- .cio-question-options-container-text-only {
736
+ .cio-quiz .cio-question-options-container-text-only {
720
737
  flex-direction: row;
721
738
  flex-wrap: wrap;
722
739
  justify-content: center;
723
740
  margin-bottom: 2rem;
724
741
  margin-top: 0;
725
742
  }
726
- .cio-question-option-container-text-only {
743
+ .cio-quiz .cio-question-option-container-text-only {
727
744
  margin: 0;
728
745
  width: 30%;
729
746
  }
@@ -732,42 +749,42 @@
732
749
  /* Desktop */
733
750
  @container quiz (min-width: 1280px) {
734
751
  /* Container */
735
- .cio-cover-question-container--with-image {
752
+ .cio-quiz .cio-quiz .cio-cover-question-container--with-image {
736
753
  padding: 0;
737
754
  }
738
755
 
739
756
  /* Select component */
740
- .cio-question-option-container-text-only {
757
+ .cio-quiz .cio-question-option-container-text-only {
741
758
  width: 30%;
742
759
  }
743
- .cio-select-question-container {
760
+ .cio-quiz .cio-select-question-container {
744
761
  margin-bottom: 0;
745
762
  }
746
- .cio-select-question-text {
763
+ .cio-quiz .cio-select-question-text {
747
764
  padding: 2.5rem 0rem;
748
765
  }
749
766
 
750
767
  /* Results component */
751
- .cio-results-container {
768
+ .cio-quiz .cio-results-container {
752
769
  margin-top: 3rem;
753
770
  }
754
- .cio-zero-results {
771
+ .cio-quiz .cio-zero-results {
755
772
  margin-top: 7rem;
756
773
  }
757
- .cio-question-content {
774
+ .cio-quiz .cio-question-content {
758
775
  padding: 5rem;
759
776
  }
760
777
  }
761
778
 
762
779
  /* Spinner Styles */
763
- .cio-spinner {
780
+ .cio-quiz .cio-spinner {
764
781
  display: inline-block;
765
782
  position: relative;
766
783
  width: 80px;
767
784
  margin: auto;
768
785
  }
769
786
 
770
- .cio-spinner div {
787
+ .cio-quiz .cio-spinner div {
771
788
  box-sizing: border-box;
772
789
  display: block;
773
790
  position: absolute;
@@ -781,15 +798,15 @@
781
798
  border-color: var(--primary-color) transparent transparent transparent;
782
799
  }
783
800
 
784
- .cio-spinner div:nth-child(1) {
801
+ .cio-quiz .cio-spinner div:nth-child(1) {
785
802
  animation-delay: -0.45s;
786
803
  }
787
804
 
788
- .cio-spinner div:nth-child(2) {
805
+ .cio-quiz .cio-spinner div:nth-child(2) {
789
806
  animation-delay: -0.3s;
790
807
  }
791
808
 
792
- .cio-spinner div:nth-child(3) {
809
+ .cio-quiz .cio-spinner div:nth-child(3) {
793
810
  animation-delay: -0.15s;
794
811
  }
795
812