|
| 1 | +:root { |
| 2 | + |
| 3 | + /* Colors */ |
| 4 | + --ucc-primary-color: #155dfc; |
| 5 | + --ucc-primary-color-light: #51a2ff; |
| 6 | + --ucc-primary-color-dark: #193cb8; |
| 7 | + --ucc-danger-color: #9f0712; |
| 8 | + --ucc-danger-background-color: #ffc9c9; |
| 9 | + |
| 10 | + /* Font */ |
| 11 | + --ucc-font-family: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif; |
| 12 | + |
| 13 | + /* Text */ |
| 14 | + --ucc-text-color: #364153; |
| 15 | + --ucc-text-color-light: #99a1af; |
| 16 | + --ucc-text-color-lighter: #c1c7d0; |
| 17 | + --ucc-text-color-dark: #101828; |
| 18 | + |
| 19 | + --ucc-text-lg: 20px; |
| 20 | + --ucc-text-md: 16px; |
| 21 | + --ucc-text-sm: 14px; |
| 22 | + |
| 23 | + /* Borders */ |
| 24 | + --ucc-border-color: #ddd; |
| 25 | + --ucc-border-radius: 5px; |
| 26 | + |
| 27 | + /* Components */ |
| 28 | + --ucc-button-background-color: var(--ucc-primary-color); |
| 29 | + --ucc-button-text-color: #fff; |
| 30 | + --ucc-button-background-color-hover: var(--ucc-primary-color-dark); |
| 31 | + --ucc-button-text-color-hover: #fff; |
| 32 | + --ucc-button-background-color-disabled: #d1d5dc; |
| 33 | + --ucc-button-text-color-disabled: #fff; |
| 34 | + |
| 35 | + --ucc-cart-width: 550px; |
| 36 | +} |
| 37 | + |
1 | 38 | .ucc-modal-container {
|
2 | 39 | position: relative;
|
3 | 40 | }
|
|
20 | 57 | position: fixed;
|
21 | 58 | top: 0;
|
22 | 59 | right: 0;
|
23 |
| - width: 500px; |
| 60 | + width: 100%; |
24 | 61 | height: 100%;
|
25 | 62 | flex-direction: column;
|
26 | 63 | background-color: white;
|
|
31 | 68 | transform: translateX(0);
|
32 | 69 | }
|
33 | 70 |
|
| 71 | +@media (min-width: 768px) { |
| 72 | + .ucc-modal { |
| 73 | + width: var(--ucc-cart-width); |
| 74 | + border-left: solid 1px var(--ucc-border-color); |
| 75 | + } |
| 76 | +} |
| 77 | + |
34 | 78 | .ucc-modal-header {
|
35 | 79 | display: flex;
|
36 | 80 | justify-content: space-between;
|
37 | 81 | align-items: center;
|
38 | 82 | padding: 20px;
|
39 |
| - border-bottom: 1px solid #ddd; |
| 83 | + border-bottom: 1px solid var(--ucc-border-color); |
40 | 84 | }
|
41 | 85 |
|
42 | 86 | .ucc-modal-title {
|
43 |
| - font-size: 20px; |
| 87 | + font-family: var(--ucc-font-family), sans-serif; |
| 88 | + font-size: var(--ucc-text-lg); |
44 | 89 | font-weight: 600;
|
| 90 | + color: var(--ucc-text-color-dark); |
45 | 91 | margin: 0;
|
46 | 92 | }
|
47 | 93 |
|
48 | 94 | .ucc-modal-close {
|
49 | 95 | cursor: pointer;
|
| 96 | + color: var(--ucc-text-color-dark); |
| 97 | + transition: color 0.2s; |
| 98 | +} |
| 99 | + |
| 100 | +.ucc-modal-close:hover { |
| 101 | + color: var(--ucc-text-color-light); |
50 | 102 | }
|
51 | 103 |
|
52 | 104 | .ucc-modal-body {
|
|
58 | 110 | display: flex;
|
59 | 111 | flex-direction: column;
|
60 | 112 | padding: 20px;
|
61 |
| - border-top: 1px solid #ddd; |
| 113 | + border-top: 1px solid var(--ucc-border-color); |
62 | 114 | }
|
63 | 115 |
|
64 | 116 | .ucc-cart-item {
|
| 117 | + font-family: var(--ucc-font-family), sans-serif; |
65 | 118 | display: flex;
|
66 | 119 | padding: 20px;
|
67 |
| - border-bottom: 1px solid #eee; |
| 120 | + border-bottom: 1px solid var(--ucc-border-color); |
68 | 121 | }
|
69 | 122 |
|
70 | 123 | .ucc-cart-item__image {
|
71 | 124 | margin-right: 20px;
|
72 | 125 | }
|
73 | 126 |
|
74 | 127 | .ucc-cart-item__image img {
|
75 |
| - width: 75px; |
76 |
| - height: 75px; |
| 128 | + width: 50px; |
| 129 | + height: 50px; |
77 | 130 | max-width: none;
|
78 | 131 | max-height: none;
|
79 | 132 | object-fit: cover;
|
80 |
| - border: solid 1px #ddd; |
81 |
| - border-radius: 5px; |
| 133 | + border: solid 1px var(--ucc-border-color); |
| 134 | + border-radius: var(--ucc-border-radius); |
| 135 | +} |
| 136 | + |
| 137 | +@media (min-width: 768px) { |
| 138 | + .ucc-cart-item__image img { |
| 139 | + width: 75px; |
| 140 | + height: 75px; |
| 141 | + } |
82 | 142 | }
|
83 | 143 |
|
84 | 144 | .ucc-cart-item__body {
|
85 | 145 | flex: 1;
|
86 | 146 | }
|
87 | 147 |
|
88 | 148 | .ucc-cart-item__title {
|
| 149 | + font-family: var(--ucc-font-family), sans-serif; |
89 | 150 | font-weight: 600;
|
90 |
| - font-size: 16px; |
| 151 | + font-size: var(--ucc-text-md); |
| 152 | + color: var(--ucc-text-color); |
91 | 153 | line-height: 1.2;
|
92 | 154 | margin-bottom: 5px;
|
93 | 155 | }
|
94 | 156 |
|
95 |
| -.ucc-cart-item__delete { |
| 157 | +.ucc-cart-item__remove { |
96 | 158 | display: flex;
|
97 | 159 | align-items: center;
|
98 | 160 | justify-content: center;
|
99 | 161 | cursor: pointer;
|
100 |
| - background-color: #eee; |
| 162 | + color: var(--ucc-text-color-light); |
| 163 | + background-color: transparent; |
101 | 164 | width: 30px;
|
102 | 165 | height: 30px;
|
103 | 166 | min-width: 30px;
|
104 | 167 | min-height: 30px;
|
105 | 168 | border-radius: 50%;
|
106 |
| - transition: background-color 0.2s; |
| 169 | + transition: background-color 0.2s, color 0.2s; |
107 | 170 | }
|
108 | 171 |
|
109 |
| -.ucc-cart-item__delete:hover { |
110 |
| - background-color: #ffc9c9; |
| 172 | +.ucc-cart-item__remove:hover { |
| 173 | + color: var(--ucc-danger-color); |
| 174 | + background-color: var(--ucc-danger-background-color); |
111 | 175 | }
|
112 | 176 |
|
113 | 177 | .ucc-cart-item__foot {
|
|
118 | 182 | width: 75px;
|
119 | 183 | padding: 5px;
|
120 | 184 | text-align: left;
|
121 |
| - border: 1px solid #ddd; |
122 |
| - border-radius: 3px; |
| 185 | + border: 1px solid var(--ucc-border-color); |
| 186 | + border-radius: var(--ucc-border-radius); |
123 | 187 | }
|
124 | 188 |
|
125 | 189 | .ucc-cart-item__attribute {
|
126 |
| - font-size: 14px; |
127 |
| - color: #666; |
| 190 | + font-size: var(--ucc-text-sm); |
| 191 | + color: var(--ucc-text-color-light); |
128 | 192 | }
|
129 | 193 |
|
130 | 194 | .ucc-cart-item__attribute-key:after {
|
|
136 | 200 | }
|
137 | 201 |
|
138 | 202 | .ucc-cart-item__price {
|
| 203 | + color: var(--ucc-text-color-dark); |
139 | 204 | font-weight: bold;
|
140 |
| - font-size: 20px; |
| 205 | + font-size: var(--ucc-text-lg); |
141 | 206 | }
|
142 | 207 |
|
143 | 208 | .ucc-cart-totals {
|
|
147 | 212 | }
|
148 | 213 |
|
149 | 214 | .ucc-cart-total {
|
| 215 | + font-size: var(--ucc-text-md); |
| 216 | + color: var(--ucc-text-color); |
150 | 217 | margin-bottom: 5px;
|
151 | 218 | }
|
152 | 219 |
|
|
157 | 224 | .ucc-cart-checkout {
|
158 | 225 | cursor: pointer;
|
159 | 226 | display: block;
|
| 227 | + font-family: var(--ucc-font-family), sans-serif; |
160 | 228 | font-weight: 600;
|
161 |
| - background-color: #4fd1c5; |
| 229 | + font-size: var(--ucc-text-md); |
| 230 | + background-color: var(--ucc-button-background-color); |
| 231 | + color: var(--ucc-button-text-color); |
162 | 232 | padding: 10px 20px;
|
163 | 233 | text-align: center;
|
164 |
| - border-radius: 3px; |
| 234 | + border-radius: var(--ucc-border-radius); |
| 235 | + transition: background-color 0.2s, color 0.2s; |
| 236 | +} |
| 237 | + |
| 238 | +.ucc-cart-checkout:hover { |
| 239 | + background-color: var(--ucc-button-background-color-hover); |
| 240 | + color: var(--ucc-button-text-color-hover); |
| 241 | +} |
| 242 | + |
| 243 | +.ucc-cart-checkout--disabled, |
| 244 | +.ucc-cart-checkout--disabled:hover { |
| 245 | + cursor: not-allowed; |
| 246 | + background-color: var(--ucc-button-background-color-disabled); |
| 247 | + color: var(--ucc-button-text-color-disabled); |
| 248 | +} |
| 249 | + |
| 250 | +.ucc-cart-empty { |
| 251 | + font-family: var(--ucc-font-family), sans-serif; |
| 252 | + font-size: var(--ucc-text-lg); |
| 253 | + font-weight: 600; |
| 254 | + color: var(--ucc-text-color-lighter); |
| 255 | + text-align: center; |
| 256 | + display: flex; |
| 257 | + align-items: center; |
| 258 | + justify-content: center; |
| 259 | + width: 100%; |
| 260 | + height: 100%; |
| 261 | +} |
| 262 | + |
| 263 | +.ucc-cart-empty svg { |
| 264 | + display: inline-block; |
| 265 | + width: 40px; |
| 266 | + height: 40px; |
| 267 | + margin-bottom: 10px; |
165 | 268 | }
|
166 | 269 |
|
167 | 270 | .ucc-split {
|
|
0 commit comments