|
| 1 | +@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&display=swap'); |
| 2 | + |
| 3 | +.pricing { |
| 4 | + min-height: 100vh; |
| 5 | + font-family: 'Montserrat', sans-serif; |
| 6 | + font-size: 15px; |
| 7 | + background: url('./assets/pricing-component-with-toggle-master/images/bg-top.svg') |
| 8 | + no-repeat top right -12em, |
| 9 | + url('./assets/pricing-component-with-toggle-master/images/bg-bottom.svg') |
| 10 | + no-repeat bottom left; |
| 11 | + background-color: hsl(240, 78%, 98%); |
| 12 | + font-weight: 700; |
| 13 | + --pricing-transition: all 0.4s ease-in-out; |
| 14 | + padding: 25px; |
| 15 | +} |
| 16 | + |
| 17 | +.pricing ul { |
| 18 | + list-style-type: none; |
| 19 | +} |
| 20 | + |
| 21 | +.pricing-container { |
| 22 | + /* border: 2px solid green; */ |
| 23 | + width: 100%; |
| 24 | + max-width: 1000px; |
| 25 | + /* display: flex; |
| 26 | + flex-direction: column; |
| 27 | + align-items: center; */ |
| 28 | +} |
| 29 | + |
| 30 | +/* HEADER */ |
| 31 | + |
| 32 | +.pricing-header { |
| 33 | + width: 100%; |
| 34 | + display: flex; |
| 35 | + flex-direction: column; |
| 36 | + align-items: center; |
| 37 | + margin-bottom: 40px; |
| 38 | +} |
| 39 | + |
| 40 | +.pricing-title { |
| 41 | + margin-bottom: 30px; |
| 42 | + color: hsl(233, 13%, 49%); |
| 43 | + font-size: 1.7em; |
| 44 | +} |
| 45 | + |
| 46 | +.pricing-options { |
| 47 | + display: flex; |
| 48 | + align-items: center; |
| 49 | + color: hsl(234, 14%, 74%); |
| 50 | + font-size: 0.8em; |
| 51 | +} |
| 52 | + |
| 53 | +.pricing-toggle { |
| 54 | + width: 56px; |
| 55 | + background: linear-gradient(to right, hsl(236, 72%, 79%), hsl(237, 63%, 64%)); |
| 56 | + height: 30px; |
| 57 | + border-radius: 15px; |
| 58 | + margin: 0px 20px; |
| 59 | + position: relative; |
| 60 | + cursor: pointer; |
| 61 | + transition: all 0.4s ease-in-out; |
| 62 | +} |
| 63 | + |
| 64 | +.pricing-toggle:hover { |
| 65 | + background: linear-gradient(to right, hsl(236, 72%, 79%), hsl(236, 72%, 79%)); |
| 66 | +} |
| 67 | + |
| 68 | +.pricing-toggle-circle { |
| 69 | + content: ''; |
| 70 | + position: absolute; |
| 71 | + top: 3px; |
| 72 | + right: 3px; |
| 73 | + width: 24px; |
| 74 | + height: 24px; |
| 75 | + border-radius: 50%; |
| 76 | + background-color: hsl(240, 78%, 98%); |
| 77 | + transition: all 0.2s ease-in-out; |
| 78 | +} |
| 79 | + |
| 80 | +.pricing-toggle:active .pricing-toggle-circle { |
| 81 | + width: 27px; |
| 82 | + border-radius: 20px; |
| 83 | +} |
| 84 | + |
| 85 | +.pricing-toggle-circle-annual { |
| 86 | + transform: translateX(-26px); |
| 87 | +} |
| 88 | + |
| 89 | +.pricing-toggle:active .pricing-toggle-circle-annual { |
| 90 | + width: 27px; |
| 91 | + transform: translateX(-23px); |
| 92 | +} |
| 93 | + |
| 94 | +/* CARDS */ |
| 95 | + |
| 96 | +.pricing-cards { |
| 97 | + /* border: 1px solid; */ |
| 98 | + display: flex; |
| 99 | + align-items: center; |
| 100 | +} |
| 101 | + |
| 102 | +.pricing-card { |
| 103 | + flex: 1; |
| 104 | + padding: 30px; |
| 105 | + border-radius: 5px; |
| 106 | + display: flex; |
| 107 | + flex-direction: column; |
| 108 | + align-items: center; |
| 109 | + background: white; |
| 110 | + box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px; |
| 111 | +} |
| 112 | + |
| 113 | +.pricing-plan-name { |
| 114 | + margin-bottom: 15px; |
| 115 | + color: hsl(233, 13%, 49%); |
| 116 | +} |
| 117 | +.pricing-price { |
| 118 | + color: hsl(232, 13%, 33%); |
| 119 | + font-size: 4em; |
| 120 | + font-weight: 700; |
| 121 | + margin-bottom: 30px; |
| 122 | + animation: fade-price 0.4s ease-in; |
| 123 | +} |
| 124 | + |
| 125 | +@keyframes fade-price { |
| 126 | + from { |
| 127 | + transform: translateY(5px); |
| 128 | + opacity: 0; |
| 129 | + } |
| 130 | + to { |
| 131 | + transform: translateY(0px); |
| 132 | + opacity: 1; |
| 133 | + } |
| 134 | +} |
| 135 | + |
| 136 | +.pricing-price-animate { |
| 137 | + animation: fade-in-price 0.4s ease-in; |
| 138 | +} |
| 139 | + |
| 140 | +@keyframes fade-in-price { |
| 141 | + from { |
| 142 | + transform: translateY(5px); |
| 143 | + opacity: 0; |
| 144 | + } |
| 145 | + to { |
| 146 | + transform: translateY(0px); |
| 147 | + opacity: 1; |
| 148 | + } |
| 149 | +} |
| 150 | + |
| 151 | +.pricing-specs { |
| 152 | + text-align: center; |
| 153 | + border-bottom: 0.7px solid hsl(234, 14%, 74%); |
| 154 | + margin-bottom: 30px; |
| 155 | + width: 100%; |
| 156 | +} |
| 157 | +.pricing-spec { |
| 158 | + border-top: 0.7px solid hsl(234, 14%, 74%); |
| 159 | + padding: 15px; |
| 160 | + color: hsl(233, 13%, 49%); |
| 161 | +} |
| 162 | +.pricing-cta { |
| 163 | + width: 100%; |
| 164 | + padding: 15px 0px; |
| 165 | + border: none; |
| 166 | + border-radius: 5px; |
| 167 | + font-weight: 700; |
| 168 | + text-transform: uppercase; |
| 169 | + font-size: 0.9em; |
| 170 | + color: white; |
| 171 | + background: linear-gradient(to right, hsl(236, 72%, 79%), hsl(237, 63%, 64%)); |
| 172 | + cursor: pointer; |
| 173 | + transition: all 0.4s ease; |
| 174 | +} |
| 175 | + |
| 176 | +.pricing-cta:hover { |
| 177 | + color: hsl(237, 63%, 64%); |
| 178 | + background: white; |
| 179 | + outline: 1px solid hsl(237, 63%, 64%); |
| 180 | +} |
| 181 | + |
| 182 | +/* MIDDLE CARD */ |
| 183 | + |
| 184 | +.pricing-card:nth-of-type(2) { |
| 185 | + padding: 50px 30px; |
| 186 | + background: linear-gradient(to right, hsl(236, 72%, 79%), hsl(237, 63%, 64%)); |
| 187 | +} |
| 188 | + |
| 189 | +.pricing-card:nth-of-type(2) .pricing-plan-name { |
| 190 | + color: white; |
| 191 | +} |
| 192 | +.pricing-card:nth-of-type(2) .pricing-price { |
| 193 | + color: white; |
| 194 | +} |
| 195 | +.pricing-card:nth-of-type(2) .pricing-specs { |
| 196 | + border-bottom: 0.7px solid white; |
| 197 | +} |
| 198 | +.pricing-card:nth-of-type(2) .pricing-spec { |
| 199 | + border-top: 0.7px solid white; |
| 200 | + color: white; |
| 201 | +} |
| 202 | +.pricing-card:nth-of-type(2) .pricing-cta { |
| 203 | + color: hsl(237, 63%, 64%); |
| 204 | + background: white; |
| 205 | +} |
| 206 | + |
| 207 | +.pricing-card:nth-of-type(2) .pricing-cta:hover { |
| 208 | + color: white; |
| 209 | + background: transparent; |
| 210 | + outline: 1px solid white; |
| 211 | +} |
| 212 | + |
| 213 | +/* ### Primary |
| 214 | + |
| 215 | +- Linear Gradient: hsl(236, 72%, 79%) to hsl(237, 63%, 64%) |
| 216 | + |
| 217 | +### Neutral |
| 218 | + |
| 219 | +- Very Light Grayish Blue: hsl(240, 78%, 98%) |
| 220 | +- Light Grayish Blue: hsl(234, 14%, 74%) |
| 221 | +- Grayish Blue: hsl(233, 13%, 49%) |
| 222 | +- Dark Grayish Blue: hsl(232, 13%, 33%) */ |
| 223 | + |
| 224 | +@media only screen and (max-width: 900px) { |
| 225 | + .pricing { |
| 226 | + padding: 60px 20px; |
| 227 | + } |
| 228 | + |
| 229 | + .pricing-cards { |
| 230 | + flex-direction: column; |
| 231 | + align-items: center; |
| 232 | + padding: 0px 80px; |
| 233 | + } |
| 234 | + |
| 235 | + .pricing-card { |
| 236 | + width: 100%; |
| 237 | + margin-bottom: 40px; |
| 238 | + } |
| 239 | + |
| 240 | + .pricing-card:nth-of-type(2) { |
| 241 | + padding: 30px; |
| 242 | + } |
| 243 | +} |
| 244 | + |
| 245 | +@media only screen and (max-width: 650px) { |
| 246 | + .pricing-cards { |
| 247 | + padding: 0px; |
| 248 | + } |
| 249 | +} |
0 commit comments