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