1. /* Button container */
    2. .progress-button {
    3. position: relative;
    4. display: inline-block;
    5. text-align: center;
    6. width: 45%;
    7. min-width: 250px;
    8. margin: 10px;
    9. }
    10. /* Button style */
    11. .progress-button button {
    12. display: block;
    13. margin: 0 auto;
    14. padding: 0;
    15. width: 250px;
    16. height: 70px;
    17. border: 2px solid #1ECD97;
    18. border-radius: 40px;
    19. background: transparent;
    20. color: #1ECD97;
    21. letter-spacing: 1px;
    22. font-size: 18px;
    23. font-family: 'Montserrat', sans-serif;
    24. -webkit-tap-highlight-color: transparent;
    25. -webkit-transition: background-color 0.3s, color 0.3s, width 0.3s, border-width 0.3s, border-color 0.3s;
    26. transition: background-color 0.3s, color 0.3s, width 0.3s, border-width 0.3s, border-color 0.3s;
    27. }
    28. .progress-button button:hover {
    29. background-color: #1ECD97;
    30. color: #fff;
    31. }
    32. .progress-button button:focus {
    33. outline: none;
    34. }
    35. /* Text (transition for when returning to initial state) */
    36. .progress-button button span {
    37. -webkit-transition: opacity 0.3s 0.1s;
    38. transition: opacity 0.3s 0.1s;
    39. }
    40. /* Common style of SVGs */
    41. .progress-button svg {
    42. position: absolute;
    43. top: 0;
    44. left: 50%;
    45. -webkit-transform: translateX(-50%);
    46. transform: translateX(-50%);
    47. pointer-events: none;
    48. }
    49. .progress-button svg path {
    50. opacity: 0;
    51. fill: none;
    52. }
    53. .progress-button svg.progress-circle path {
    54. stroke: #1ECD97;
    55. stroke-width: 5;
    56. }
    57. .progress-button svg.checkmark path,
    58. .progress-button svg.cross path {
    59. stroke: #fff;
    60. stroke-linecap: round;
    61. stroke-width: 4;
    62. -webkit-transition: opacity 0.1s;
    63. transition: opacity 0.1s;
    64. }
    65. /* Loading, success and error effects */
    66. .loading.progress-button button {
    67. width: 70px; /* make a circle */
    68. border-width: 5px;
    69. border-color: #ddd;
    70. background-color: transparent;
    71. color: #fff;
    72. }
    73. .loading.progress-button span {
    74. -webkit-transition: opacity 0.15s;
    75. transition: opacity 0.15s;
    76. }
    77. .loading.progress-button span,
    78. .success.progress-button span,
    79. .error.progress-button span {
    80. opacity: 0; /* keep it hidden in all states */
    81. }
    82. .success.progress-button button,
    83. .error.progress-button button {
    84. -webkit-transition: background-color 0.3s, width 0.3s, border-width 0.3s;
    85. transition: background-color 0.3s, width 0.3s, border-width 0.3s;
    86. }
    87. .success.progress-button button {
    88. border-color: #1ECD97;
    89. background-color: #1ECD97;
    90. }
    91. .error.progress-button button {
    92. border-color: #FB797E;
    93. background-color: #FB797E;
    94. }
    95. .loading.progress-button svg.progress-circle path,
    96. .success.progress-button svg.checkmark path,
    97. .error.progress-button svg.cross path {
    98. opacity: 1;
    99. -webkit-transition: stroke-dashoffset 0.3s;
    100. transition: stroke-dashoffset 0.3s;
    101. }
    102. /* Optional elastic effect for the width of the button */
    103. .elastic.progress-button button {
    104. -webkit-transition: background-color 0.3s, color 0.3s, width 0.3s cubic-bezier(0.25, 0.25, 0.4, 1), border-width 0.3s, border-color 0.3s;
    105. -webkit-transition: background-color 0.3s, color 0.3s, width 0.3s cubic-bezier(0.25, 0.25, 0.4, 1.6), border-width 0.3s, border-color 0.3s;
    106. transition: background-color 0.3s, color 0.3s, width 0.3s cubic-bezier(0.25, 0.25, 0.4, 1.6), border-width 0.3s, border-color 0.3s;
    107. }
    108. .loading.elastic.progress-button button {
    109. -webkit-transition: background-color 0.3s, color 0.3s, width 0.3s cubic-bezier(0.6, 0, 0.75, 0.75), border-width 0.3s, border-color 0.3s;
    110. -webkit-transition: background-color 0.3s, color 0.3s, width 0.3s cubic-bezier(0.6, -0.6, 0.75, 0.75), border-width 0.3s, border-color 0.3s;
    111. transition: background-color 0.3s, color 0.3s, width 0.3s cubic-bezier(0.6, -0.6, 0.75, 0.75), border-width 0.3s, border-color 0.3s;
    112. }