Checkout style
[wolnelektury.git] / src / wolnelektury / static / 2022 / styles / layout / _checkout.scss
1 //Support bar
2 .l-checkout__support {
3     margin-bottom: 22px;
4
5     margin-left: 16px;
6     margin-right: 16px;
7 }
8
9 .l-checkout__support__bar {
10   background: #E6F0F1 url(../images/approval.svg) center right 5px no-repeat;
11   border-radius: 10px;
12   width: 100%; height: 34px;
13   position: relative;
14   span {
15     position: absolute;
16     top: 0; left: 0;
17     height: 100%;
18     background: #92BD39;
19     border-radius: 10px;
20     &:after {
21       margin: auto;
22       position: absolute;
23       top: 0; right: 13px; bottom: 2px;
24       content: attr(data-label);
25       font-weight: bold;
26       font-size: 15px;
27       color: #FFFFFF;
28       display: flex;
29       align-items: center;
30       justify-content: center;
31     }
32   }
33 }
34
35 .l-checkout__support__footer {
36   display: flex;
37   margin-top: 7px;
38   justify-content: space-between;
39   align-items: center;
40   p {
41     margin: 0;
42     font-weight: normal;
43     font-size: 15px;
44     line-height: 150%;
45     color: #083F4D;
46   }
47 }
48
49 //Box
50 .l-checkout__box {
51   background: #E1F1F2;
52   border-radius: 10px;
53   padding-bottom: 30px;
54   overflow: hidden;
55   margin: 0 16px;
56 }
57
58 .l-checkout__box__header {
59   display: flex;
60   background: #083F4D;
61
62   img {
63       display: none;
64       @include rwd($break-flow) {
65           display: block;
66       }
67   }
68 }
69
70 .l-checkout__box__header__content h1 {
71   font-style: italic;
72   font-weight: 300;
73   font-size: 48px;
74   line-height: 55px;
75   letter-spacing: -0.02em;
76   color: #92BD39;
77   margin: 0;
78 }
79
80 .l-checkout__box__header__content p:first-of-type {
81   font-style: normal;
82   font-weight: 600;
83   font-size: 21.5px;
84   line-height: 140%;
85   letter-spacing: -0.01em;
86   color: #FFFFFF;
87   margin-top: 23px;
88 }
89
90 .l-checkout__box__header__content p {
91   font-weight: normal;
92   font-size: 18px;
93   line-height: 150%;
94   color: #FFFFFF;
95   margin-top: 8px;
96   max-width: 410px;
97 }
98
99 .l-checkout__box__header__content {
100   padding: 32px 45px;
101 }
102
103 //Steps
104 .l-checkout__steps {
105   display: flex;
106   margin-top: -24px;
107   justify-content: space-around;
108
109   @include rwd($break-flow) {
110       padding: 0 125px;
111       justify-content: space-between;
112   }
113
114   div {
115     width: 145px;
116     display: flex;
117     flex-direction: column;
118     align-items: center;
119     justify-content: center;
120
121     span {
122       width: 46px;
123       height: 46px;
124       background: #86AD34;
125       color: white;
126       border-radius: 50%;
127       display: flex;
128       align-items: center;
129       justify-content: center;
130       font-weight: 600;
131       font-size: 21px;
132       line-height: 140%;
133       letter-spacing: -0.01em;
134     }
135
136     p {
137       margin-top: 4px;
138       font-weight: 600;
139       font-size: 21px;
140       line-height: 140%;
141       text-align: center;
142       letter-spacing: -0.01em;
143       color: #083F4D;
144       display: none;
145       @include rwd($break-flow) {
146           display: block;
147       }
148     }
149
150     &.is-completed {
151       span {
152         overflow: hidden;
153         text-indent: -999px;
154         background: #86AD34 url(../images/check.svg) center no-repeat;
155       }
156     }
157
158     &.is-inactive {
159       span {
160         background: #ffffff;
161         color: #003C3C;
162       }
163       p {
164         color: #74BDC2;
165         font-weight: normal;
166       }
167     }
168   }
169 }
170
171 //Switch
172 .l-switch__wrapper {
173   display: flex;
174   align-items: center;
175   justify-content: center;
176   margin-top: 35px;
177 }
178
179 .l-switch {
180   background: #fff;
181   display: block;
182   position: relative;
183   height: 26px;
184   width: 77px;
185   border-radius: 4px;
186 }
187
188 .l-switch label {
189   color: #fff;
190   font-weight: 600;
191   font-size: 21.5px;
192   line-height: 26px;
193   transition: color .2s ease;
194   width: 122px;
195   cursor: pointer;
196 }
197
198 .l-switch label:nth-of-type(1) {
199   left: -175%;
200   position: absolute;
201   text-align: right;
202 }
203
204 .l-switch label:nth-of-type(2) {
205   position: absolute;
206   right: -175%;
207   text-align: left;
208 }
209
210 .l-switch input {
211   left: 0;
212   opacity: 0;
213   position: absolute;
214   top: 0;
215   height: 26px;
216   width: 77px;
217   z-index: 2;
218 }
219
220 .l-switch input:checked~label:nth-of-type(1) { color: #003C3C; }
221 .l-switch input:checked~label:nth-of-type(2) { color: #74BDC2; }
222
223 .l-switch input~:checked~label:nth-of-type(1) { color: #74BDC2; }
224 .l-switch input~:checked~label:nth-of-type(2) { color: #003C3C; }
225
226 .l-switch input:checked~.toggle {
227   left: 5px;
228 }
229
230 .l-switch input~:checked~.toggle {
231   left: 39px;
232 }
233
234 .l-switch input:checked {
235   z-index: 0;
236 }
237
238 .toggle {
239   background: #003C3C;
240   left: 0;
241   position: absolute;
242   top: 5px;
243   transition: left .2s ease;
244   height: 16px;
245   width: 33px;
246   z-index: 1;
247   border-radius: 2px;
248   cursor: pointer;
249 }
250
251 //Payments
252 .l-checkout__payments {
253     display: none;
254     padding: 0 16px;
255   margin-top: 34px;
256   margin-bottom: 0;
257   flex-wrap: wrap;
258   justify-content: flex-start;
259   flex-direction: row;
260   column-gap: 16px;
261
262   @include rwd($break-flow) {
263       //flex-direction: row;
264       padding: 0 30px;
265       column-gap: 30px;
266   }
267 }
268
269 .l-checkout__payments__box {
270   display: flex;
271   flex-direction: column;
272   background: #FFFFFF;
273   border-radius: 10px;
274   overflow: hidden;
275   transition: box-shadow $ease-out 250ms;
276   box-shadow: 0px 0px 0px rgba(55, 170, 156, 0);
277   margin-bottom: 30px;
278   width: 100%;
279
280   @include rwd($break-flow) {
281       width: calc(33.333% - 20px);
282   }
283   h3 {
284     margin: 0;
285     font-weight: bold;
286     font-size: 44px;
287     line-height: 130%;
288     letter-spacing: -0.01em;
289     color: #083F4D;
290     height: 90px;
291     display: flex;
292     align-items: center;
293     justify-content: center;
294     transition: all $ease-out 250ms;
295
296     span {
297       font-weight: 600;
298       font-size: 25px;
299       line-height: 140%;
300       letter-spacing: -0.01em;
301       color: #92BD39;
302       margin-left: 10px;
303       transition: opacity $ease-out 250ms;
304     }
305   }
306   .l-checkout__payments__box__btn-wrp {
307     padding: 0 20px 20px 20px;
308     margin-bottom: 0;
309     margin-top: auto;
310     @include rwd($break-flow) {
311         padding-top: 20px;
312     }
313   }
314   p {
315     margin-top: 0;
316     font-weight: normal;
317     font-size: 16px;
318     line-height: 150%;
319     color: #474747;
320     padding: 20px;
321     strong {
322       font-weight: 600;
323     }
324   }
325   button {
326     height: 56px;
327     background: #FFFFFF;
328     border: 1px solid #92BD39;
329     border-radius: 3px;
330     width: 100%;
331     outline: 0;
332     cursor: pointer;
333     font-weight: 600;
334     font-size: 16px;
335     line-height: 24px;
336     display: flex;
337     align-items: center;
338     justify-content: center;
339     text-align: center;
340     color: #083F4D;
341     transition: background $ease-out 250ms;
342
343     @include rwd($break-flow) {
344         font-size: 20px;
345         line-height: 25px;
346     }
347     
348     &:hover {
349       background: rgba(#92BD39, 0.75);
350     }
351   }
352
353   &.is-active {
354       box-shadow: 0px 0px 20px rgba(55, 170, 156, 0.35);
355       background: white;
356       color: black;
357
358     h3 {
359       color: white;
360       background: #083F4D;
361     }
362
363     button {
364       background: #92BD39;
365       &:hover {
366         background: #83AD2B;
367       }
368     }
369   }
370
371   &.l-checkout__payments__box--half {
372       width: calc(50% - 8px);
373       @include rwd($break-flow) {
374           width: calc(33.333% - 20px);
375       }
376
377       &.is-active {
378           background: #083F4D;
379           color: white;
380
381           @include rwd($break-flow) {
382               background: white;
383               color: black;
384           }
385       }
386   }
387   &.l-checkout__payments__box--bar {
388       flex-direction: row;
389       
390       @include rwd($break-flow) {
391           flex-direction: column;
392       }
393
394       &.is-active {
395           background: #083F4D;
396           color: white;
397
398           @include rwd($break-flow) {
399               background: white;
400               color: black;
401           }
402       }
403
404       h3, .l-checkout__payments__box__btn-wrp {
405           flex-grow: 1;
406       }
407   }
408   &.l-checkout__payments__box--card {
409   }
410   
411   &.l-checkout__payments__box--xl {
412       width: 100%;
413       justify-content: center;
414       min-height: 160px;
415
416       @include rwd($break-flow) {
417           width: calc(67.4% - 20px);
418           padding-left: calc(33.7% - 10px);
419           position: relative;
420
421           h3 {
422               position: absolute;
423               left: 0;
424               top: 0;
425               padding-right: 50%;
426           }
427           
428           .l-checkout__payments__box__btn-wrp {
429               margin: 0;
430
431               p {
432                   flex-wrap: wrap;
433                   max-width: 340px;
434                   margin-right: 20px;
435               }
436
437               button {
438                   position: absolute;
439                   bottom: 20px;
440                   left: 20px;
441                   width: calc(50% - 50px);
442                   align-items: center;
443                   justify-content: center;
444               }
445           }
446       }
447
448     h3 {
449       width: 100%;
450     }
451
452     .l-checkout__payments__box__btn-wrp {
453       width: 100%;
454     }
455
456     &.once {
457       h3 {
458         text-indent: 0;
459         padding-left: 0;
460       }
461     }
462   }
463   &.l-checkout__payments__box--special {
464     button {
465       border-color: #FFA500;
466       background-color: #FFA500;
467       &:hover {
468         background: darken(#FFA500, 5%);
469       }
470     }
471   }
472 }
473
474 //Amount
475 .l-checkout__amount {
476   display: flex;
477   flex-direction: column;
478   padding: 0 16px;
479   row-gap: 16px;
480
481   @include rwd($break-flow) {
482       flex-direction: row;
483       align-items: flex-end;
484       justify-content: flex-end;
485       padding-right: 30px;
486   }
487   
488   button {
489       border: none;
490     height: 56px;
491     background: #083F4D;
492     border-radius: 3px;
493     font-weight: 600;
494     font-size: 20px;
495     line-height: 25px;
496     display: flex;
497     align-items: center;
498     justify-content: center;
499     text-align: center;
500     color: #FFFFFF;
501
502     @include rwd($break-flow) {
503         margin-left: 32px;
504         width: 340px;
505     }
506
507   }
508
509   .l-checkout__input {
510       @include rwd($break-flow) {
511           width: 340px;
512       }
513   }
514 }
515
516 //Input
517 .l-checkout__input {
518   display: flex;
519   flex-direction: column;
520
521   label {
522     font-style: normal;
523     font-weight: 600;
524     font-size: 15px;
525     line-height: 160%;
526     color: #083F4D;
527     span { color: #FF4C54; }
528   }
529   input, select, textarea {
530     height: 56px;
531     background: #FFFFFF;
532     border: 1px solid #D5ECED;
533     border-radius: 3px;
534     transition: all $ease-out 250ms;
535     padding: 10px;
536     outline: 0;
537
538     &:focus {
539       border: 1px solid #007880;
540     }
541   }
542
543   button {
544     height: 56px;
545     background: #083F4D;
546     border-radius: 3px;
547     font-weight: 600;
548     font-size: 20px;
549     line-height: 25px;
550     display: flex;
551     align-items: center;
552     justify-content: center;
553     text-align: center;
554     margin-left: 32px;
555     color: #FFFFFF;
556     width: 340px;
557   }
558 }
559
560 //Cols
561 .l-checkout__cols {
562   display: flex;
563   flex-direction: column;
564   margin-top: 50px;
565   padding: 0 16px;
566
567   @include rwd($break-flow) {
568       padding: 0 30px;
569       flex-direction: row;
570   }
571   
572   &.bt-w {
573     margin-top: 30px;
574     padding-top: 20px;
575     border-top: 1px solid white;
576   }
577 }
578
579 .l-checkout__col {
580   @include rwd($break-flow) {
581   &:nth-child(1) {
582     width: 402px;
583     padding-right: 62px;
584     .l-checkout__payments__box {
585       width: 100%;
586     }
587   }
588   &:nth-child(2) {
589     width: calc(100% - 340px);
590   }
591   &.full {
592     width: 100%;
593     padding-right: 0;
594
595     .l-checkout__form__row.full {
596       flex-direction: row;
597
598       & > h3 {
599         margin-top: 22px;
600       }
601
602       .l-checkout__info {
603         width: 100%;
604         padding-left: 100px;
605       }
606     }
607   }
608   }
609 }
610
611 .l-checkout__secure {
612     margin-top: 30px;
613     margin-right: 30px;
614     text-align: right;
615     font-size: 15px;
616     color: #888;
617
618     .l-checkout__secure__padlock {
619         margin-right: 5px;
620         vertical-align: baseline;
621     }
622     
623     .l-checkout__secure__img {
624         margin-left: 10px;
625         vertical-align: bottom;
626     }
627 }
628
629
630 //Form
631 .l-checkout__form {
632   display: flex;
633   width: 100%;
634   flex-direction: column;
635 }
636
637 .l-checkout__form__row {
638   display: flex;
639   margin-bottom: 24px;
640
641   &:nth-child(4) {
642     .l-checkout__input {
643       &:nth-child(1) { width: 172px; }
644       &:nth-child(2) { width: calc(100% - 172px); }
645     }
646   }
647
648   &.full {
649     flex-direction: column;
650
651     .l-checkout__input {
652       &:nth-child(1) {
653         padding-right: 0;
654       }
655       &:nth-child(2) {
656         padding-left: 0;
657       }
658     }
659   }
660
661   h3 {
662     margin-top: 0;
663     font-weight: 600;
664     font-size: 21.5px;
665     line-height: 140%;
666     letter-spacing: -0.01em;
667     color: #083F4D;
668   }
669
670   .iframe {
671     margin-top: 16px;
672   }
673
674   .l-checkout__input {
675     width: 100%;
676     &:nth-child(1) {
677       padding-right: 10px;
678     }
679     &:nth-child(2) {
680       padding-left: 10px;
681     }
682   }
683
684   & > a {
685     font-weight: 600;
686     font-size: 20px;
687     line-height: 25px;
688     color: #74BDC2;
689     transition: all $ease-out 250ms;
690
691     &:hover {
692       color: #007880;
693     }
694   }
695
696   &.confirm {
697     display: flex;
698     align-items: center;
699     justify-content: space-between;
700     width: 100%;
701
702     .l-checkout__input {
703       width: auto;
704     }
705   }
706   .errorlist {
707       padding: 0;
708       margin: 0;
709       list-style: none;
710       color: #FF4C54;
711       li:before {
712           content: '⚠ ';
713       }
714   }
715 }
716
717 //Info
718 .l-checkout__info__item {
719   position: relative;
720   display: flex;
721   align-items: center;
722   justify-content: space-between;
723   transition: all $ease-out 250ms;
724   width: 100%;
725   overflow: hidden;
726   margin-top: 15px;
727
728   &:hover {
729     background-color: darken(#E1F1F2, 2%);
730   }
731
732   div {
733     font-weight: normal;
734     font-size: 15px;
735     line-height: 150%;
736     color: #083F4D;
737     width: 100px;
738   }
739
740   h3 {
741     width: 426px;
742     font-weight: 500;
743     font-size: 18px;
744     line-height: 150%;
745     color: #083F4D;
746     padding-left: 30px;
747   }
748
749   button {
750     outline: 0;
751     background: transparent;
752     border: 0;
753     cursor: pointer;
754     display: flex;
755     align-items: center;
756     justify-content: center;
757     margin-right: 0;
758     margin-left: auto;
759     &:hover {
760       opacity: 0.75;
761     }
762   }
763   input {
764     top: 0;
765     left: 0;
766     position: absolute;
767     transform: translate(-100%,-100%);
768   }
769 }
770
771 //Completed
772 .l-checkout__completed {
773   display: flex;
774   align-items: center;
775   justify-content: center;
776   flex-direction: column;
777   margin: auto;
778   padding: 140px 0;
779   background: url(../images/checkout-bg.png) no-repeat center;
780
781   .l-checkout__completed__wrapper {
782     max-width: 580px;
783     display: flex;
784     align-items: center;
785     justify-content: center;
786     flex-direction: column;
787   }
788
789   h1 {
790     margin-top: 0;
791     font-style: italic;
792     font-weight: 300;
793     font-size: 58px;
794     line-height: 55px;
795     letter-spacing: -0.02em;
796     color: #083F4D;
797   }
798   p {
799     margin-top: 30px;
800     font-weight: normal;
801     font-size: 21.5px;
802     line-height: 140%;
803     text-align: center;
804     letter-spacing: -0.01em;
805     color: #007880;
806   }
807   a {
808     margin-top: 50px;
809     font-weight: 600;
810     font-size: 20px;
811     line-height: 25px;
812     display: flex;
813     align-items: center;
814     justify-content: center;
815     background: #083F4D;
816     border-radius: 3px;
817     height: 56px;
818     text-align: center;
819     color: #FFFFFF;
820     width: 340px;
821   }
822 }
823
824 //Footer
825 .l-checkout__footer {
826   display: flex;
827   flex-wrap: wrap;
828   margin-top: 12px;
829   margin-bottom: 52px;
830   margin-left: 16px;
831   margin-right: 16px;
832 }
833
834 .l-checkout__footer > img {
835   margin-right: 0;
836   margin-left: auto;
837 }
838
839 .l-checkout__footer__content {
840   display: flex;
841   flex-direction: column;
842 }
843
844 .l-checkout__footer__content__item {
845   display: flex;
846   flex-direction: column;
847
848   @include rwd($break-flow) {
849       flex-direction: row;
850   }
851   
852   &:not(:last-child) {
853     padding-bottom: 30px;
854     margin-bottom: 30px;
855     border-bottom: 1px solid #E1F1F2;
856   }
857 }
858
859 .l-checkout__footer__content h3 {
860   @include rwd($break-flow) {
861   font-weight: 600;
862   font-size: 21.5px;
863   line-height: 140%;
864   letter-spacing: -0.01em;
865   color: #083F4D;
866   width: 318px;
867   }
868 }
869
870 .l-checkout__footer__content__item > div {
871   @include rwd($break-flow) {
872   width: 100%;
873   padding-left: 120px;
874   }
875 }
876
877 .l-checkout__footer__content__item > div p {
878   font-weight: normal;
879   font-size: 15px;
880   line-height: 150%;
881   color: #808080;
882 }
883
884 .l-checkout__footer__content__item > div p a {
885   color: #007880;
886   &:hover {
887     text-decoration: underline;
888   }
889 }
890
891 .l-checkout__footer__content {
892   .l-article__read-more {
893     margin-top: 20px;
894     font-size: 15px;
895     &:after {
896       margin-left: 5px;
897       display: inline-block;
898       transform: rotate(180deg);
899       content: $icon-arrow-up;
900       font-family: '#{$icomoon-font-family}' !important;
901       font-size: 12px;
902       speak: never;
903       font-style: normal;
904       font-weight: normal;
905       font-variant: normal;
906       text-transform: none;
907       line-height: 1;
908
909       /* Better Font Rendering =========== */
910       -webkit-font-smoothing: antialiased;
911       -moz-osx-font-smoothing: grayscale;
912     }
913   }
914
915   .l-article__overlay {
916     &:after {
917       display: none;
918     }
919     &.is-clicked {
920       & + .l-article__read-more {
921         &:after {
922           transform: none;
923         }
924       }
925     }
926   }
927 }
928
929
930
931
932
933 .toggle-input{
934     &#switch-once:checked {
935         ~.l-switch__wrapper {
936             label {
937                 &:nth-of-type(1) { color: #003C3C; }
938                 &:nth-of-type(2) { color: #74BDC2; }
939             }
940             .toggle {
941                 left: 5px;
942             }
943         }
944         ~.payments-once {
945             display: flex;
946         }
947     }
948     &#switch-monthly:checked {
949         ~.l-switch__wrapper {
950             label {
951                 &:nth-of-type(1) { color: #74BDC2; }
952                 &:nth-of-type(2) { color: #003C3C; }
953             }
954             .toggle {
955                 left: 39px;
956             }
957         }
958         ~.payments-recurring {
959             display: flex;
960         }
961     }
962 }