-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
138 lines (118 loc) · 2.16 KB
/
style.css
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
* {
margin: 0;
padding: 0;
box-sizing: inherit;
}
html {
font-size: 62.5%;
box-sizing: border-box;
}
body {
font-family: system-ui;
color: #555;
background-color: #f7f7f7;
}
.container {
display: flex;
flex-flow: column;
align-items: center;
}
.search-container {
display: flex;
justify-content: center;
margin-bottom: 20px;
margin-top: 40px;
}
#country-search {
padding: 10px;
font-size: 16px;
border: 1px solid #ccc;
flex-grow: 1;
border-radius: 4px;
margin-right: 10px;
width: 100%;
min-width: 170px;
max-width: 400px;
}
#search-btn {
padding: 1.2rem 2.4rem;
font-size: clamp(12px, 1.5vw, 15px);
background-color: #4caf50;
color: white;
border: none;
cursor: pointer;
border-radius: 4px;
}
#search-btn:hover {
background-color: #45a049;
}
.countries {
margin-top: 8rem;
display: flex;
flex-wrap: wrap;
justify-content: center;
font-size: 2rem;
opacity: 0;
transition: opacity 1s;
}
.country {
background-color: #fff;
box-shadow: 0 2rem 5rem 1rem rgba(0, 0, 0, 0.1);
font-size: 1.8rem;
width: 30rem;
border-radius: 0.7rem;
margin: 0 3rem;
}
.neighbour::before {
content: "Neighbour country";
width: 100%;
position: absolute;
top: -4rem;
text-align: center;
font-size: 1.8rem;
font-weight: 600;
text-transform: uppercase;
color: #888;
}
.neighbour {
transform: scale(0.8) translateY(1rem);
margin-left: 0;
}
/* Media query for mobile devices (adjust the max-width as needed) */
@media only screen and (max-width: 659px) {
.neighbour {
margin: auto; /* Change margin-left for mobile devices */
}
}
.country__img {
width: 30rem;
height: 20rem;
object-fit: cover;
background-color: #eee;
border-top-left-radius: 0.7rem;
border-top-right-radius: 0.7rem;
}
.country__data {
padding: 2.5rem 3.75rem 3rem 3.75rem;
}
.country__name {
font-size: 2.7rem;
margin-bottom: 0.7rem;
}
.country__region {
font-size: 1.4rem;
margin-bottom: 2.5rem;
text-transform: uppercase;
color: #888;
}
.country__row:not(:last-child) {
margin-bottom: 1rem;
}
.country__row span {
display: inline-block;
margin-right: 2rem;
font-size: 2.4rem;
}
.error {
margin: auto;
}