-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContact.css
More file actions
302 lines (272 loc) · 7.76 KB
/
Contact.css
File metadata and controls
302 lines (272 loc) · 7.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
/* src/components/Contact.css */
/* Color Palette - Updated to complement the background */
:root {
--primary-color: #073B4C; /* Dark blue for headings */
--secondary-color: #118AB2; /* Medium blue for accents */
--accent-color: #06D6A0; /* Teal for success/buttons */
--delete-color: #EF476F; /* Vibrant red for delete */
--card-background: rgba(255, 255, 255, 0.98); /* Less transparent, more solid */
--text-color: #333;
--light-text-color: #555; /* Slightly darker light text for better contrast */
--shadow-color: rgba(0, 0, 0, 0.1);
--border-color: #e0e0e0;
}
/* --- Base Component Styling --- */
.contact-list-container, .contact-form-container {
background-color: var(--card-background);
padding: 40px;
border-radius: 18px; /* Slightly more rounded corners */
box-shadow: 0 12px 35px var(--shadow-color); /* Stronger shadow */
transition: all 0.4s ease-in-out;
margin-bottom: 40px;
border: 1px solid rgba(255, 255, 255, 0.8); /* Subtle light border */
}
.contact-list-container:hover, .contact-form-container:hover {
transform: translateY(-8px) scale(1.005); /* Less scale, more subtle */
box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
}
h2 {
color: var(--primary-color);
text-align: center;
margin-bottom: 35px;
font-size: 2.4em; /* Slightly larger */
font-weight: 700; /* Bolder */
position: relative;
padding-bottom: 12px; /* More space for underline */
}
h2::after {
content: '';
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
width: 70px; /* Slightly wider */
height: 5px; /* Thicker underline */
background-color: var(--secondary-color);
border-radius: 3px;
}
/* --- Contact Grid --- */
.contact-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Slightly larger cards */
gap: 30px;
padding-top: 20px;
}
/* --- Individual Contact Cards --- */
.contact-card {
background: linear-gradient(145deg, var(--card-background), rgba(255, 255, 255, 0.9)); /* Refined gradient */
padding: 28px; /* More padding */
border-radius: 15px; /* More rounded */
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); /* Softer shadow */
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smoother transition */
border-left: 8px solid var(--accent-color); /* Thicker accent border */
display: flex;
flex-direction: column;
justify-content: space-between;
text-align: left;
animation: cardFadeIn 0.8s ease-out forwards;
}
.contact-card:hover {
transform: translateY(-7px) scale(1.02); /* More lift and subtle scale on hover */
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}
.contact-card h3 {
color: var(--primary-color);
margin-top: 0;
margin-bottom: 18px; /* More space below name */
font-size: 1.8em; /* Larger name font */
border-bottom: 1px solid var(--border-color);
padding-bottom: 12px;
font-weight: 600; /* Slightly less bold than H2 */
}
.contact-card p {
color: var(--light-text-color);
margin-bottom: 10px; /* More space between lines */
font-size: 1.1em; /* Slightly larger text */
display: flex; /* For icon alignment later if needed */
align-items: center;
}
.contact-card p strong {
color: var(--primary-color);
margin-right: 8px; /* Space between label and value */
font-weight: 600;
}
/* --- Form Styling --- */
.form-group {
margin-bottom: 28px; /* More space between form groups */
text-align: left;
}
label {
display: block;
font-weight: 600; /* Slightly less bold */
margin-bottom: 10px;
color: var(--primary-color);
font-size: 1.15em; /* Larger label font */
}
input {
width: calc(100% - 28px); /* Account for padding */
padding: 14px; /* More padding */
border: 1px solid var(--border-color);
border-radius: 10px; /* More rounded input fields */
font-size: 1.1em;
transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
background-color: var(--card-background); /* Use card background for inputs */
}
input:focus {
outline: none;
border-color: var(--secondary-color);
box-shadow: 0 0 0 5px rgba(17, 138, 178, 0.25); /* More prominent focus ring */
background-color: #fff; /* White background on focus */
}
/* --- Main Form Button Styling (Add/Update) --- */
button[type="submit"] {
width: 100%;
padding: 18px;
background: linear-gradient(45deg, var(--accent-color), #21c990); /* Gradient button */
color: white;
border: none;
border-radius: 12px; /* More rounded */
font-size: 1.3em;
font-weight: bold;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smoother transition */
letter-spacing: 0.5px;
box-shadow: 0 6px 18px rgba(6, 214, 160, 0.35); /* Stronger shadow */
}
button[type="submit"]:hover {
background: linear-gradient(45deg, #21c990, var(--accent-color));
transform: translateY(-4px) scale(1.01);
box-shadow: 0 10px 25px rgba(6, 214, 160, 0.45);
}
button[type="submit"]:disabled {
background: #ccc;
cursor: not-allowed;
box-shadow: none;
transform: none;
}
/* --- Card Action Buttons (Edit/Delete) --- */
.contact-actions {
display: flex;
justify-content: space-between;
margin-top: 20px; /* More space above buttons */
gap: 12px; /* Slightly larger gap */
}
.contact-actions button {
flex: 1;
padding: 12px; /* More padding */
border: none;
border-radius: 10px; /* More rounded */
font-size: 1.05em; /* Slightly larger text */
font-weight: 600; /* Bolder */
cursor: pointer;
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15); /* Softer button shadow */
}
.contact-actions button:hover {
transform: translateY(-3px);
box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}
.contact-actions button:first-child { /* Edit Button */
background-color: var(--secondary-color);
color: white;
}
.contact-actions button:first-child:hover {
background-color: #0d7aa2; /* Slightly darker */
box-shadow: 0 4px 10px rgba(17, 138, 178, 0.35);
}
.contact-actions .delete-button { /* Delete Button */
background-color: var(--delete-color); /* Using the defined delete color */
color: white;
}
.contact-actions .delete-button:hover {
background-color: #c7375a; /* Slightly darker */
box-shadow: 0 4px 10px rgba(239, 71, 111, 0.35);
}
/* --- Animations (Existing, just ensuring they're there) --- */
@keyframes cardFadeIn {
from {
opacity: 0;
transform: translateY(40px) scale(0.9); /* More pronounced initial animation */
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
/* Responsive adjustments */
@media (max-width: 768px) {
.contact-list-container, .contact-form-container {
padding: 25px;
margin-bottom: 25px;
border-radius: 12px;
}
h2 {
font-size: 1.9em;
margin-bottom: 25px;
padding-bottom: 8px;
}
h2::after {
width: 50px;
height: 4px;
}
.contact-grid {
grid-template-columns: 1fr;
gap: 20px;
}
.contact-card {
padding: 20px;
border-left: 5px solid var(--accent-color);
border-radius: 10px;
}
.contact-card h3 {
font-size: 1.5em;
margin-bottom: 12px;
padding-bottom: 8px;
}
.contact-card p {
font-size: 1em;
margin-bottom: 6px;
}
.form-group {
margin-bottom: 20px;
}
label {
font-size: 1em;
margin-bottom: 8px;
}
input {
padding: 10px;
font-size: 1em;
border-radius: 8px;
}
button[type="submit"] {
padding: 14px;
font-size: 1.1em;
border-radius: 10px;
}
.contact-actions {
margin-top: 15px;
gap: 8px;
}
.contact-actions button {
padding: 10px;
font-size: 0.95em;
border-radius: 8px;
}
}
/* Very small screens */
@media (max-width: 480px) {
.App-header h1 {
font-size: 1.6em;
letter-spacing: 1px;
}
.contact-list-container, .contact-form-container {
padding: 15px;
}
h2 {
font-size: 1.6em;
}
.contact-grid {
gap: 15px;
}
}