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