-
Notifications
You must be signed in to change notification settings - Fork 2
/
style.css
151 lines (133 loc) · 2.97 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
139
140
141
142
143
144
145
146
147
148
149
150
151
* {
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: 'Arial', sans-serif;
}
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: #8a7ca9;
color: #fff;
}
.container {
text-align: center;
width: 100%;
max-width: 500px;
padding: 20px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.title {
font-size: 24px;
font-weight: bold;
color: #4a3f77;
margin-bottom: 15px;
}
/* Search bar styling */
.search-container {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
position: relative;
width: 100%;
max-width: 300px;
margin: 0 auto;
}
.search-input {
width: 0;
padding: 12px 20px;
border-radius: 25px;
border: 2px solid #4a3f77;
outline: none;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
font-size: 18px;
font-weight: bold;
opacity: 0;
visibility: hidden;
transition: width 0.5s ease, opacity 0.5s ease;
}
.search-btn {
padding: 12px;
border-radius: 50%;
background-color: #4a3f77;
color: white;
border: none;
cursor: pointer;
transition: background-color 0.3s, transform 0.2s;
position: absolute;
right: 5px;
z-index: 2;
}
.search-btn:hover {
background-color: #6e5c98;
transform: scale(1.1);
}
.search-btn .search-icon {
font-size: 20px;
}
.search-container.active .search-input {
width: 100%;
max-width: 300px;
opacity: 1;
visibility: visible;
}
/* Suggestions container styling with scrollbar */
.suggestions-container {
width: 100%;
max-height: 200px;
overflow-y: auto;
background-color: white;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
border-radius: 8px;
margin-top: 5px;
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
z-index: 100;
font-size: 16px;
color: #333;
visibility: hidden;
opacity: 0;
transition: opacity 0.3s ease;
text-align: left;
}
.search-container.active .suggestions-container {
visibility: visible;
opacity: 1;
}
.suggestions-container::-webkit-scrollbar {
width: 8px;
}
.suggestions-container::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 10px;
}
.suggestions-container::-webkit-scrollbar-thumb {
background-color: #6e5c98;
border-radius: 10px;
border: 2px solid #f1f1f1;
}
.suggestion-item {
padding: 12px;
cursor: pointer;
border-bottom: 1px solid #f0f0f0;
transition: background-color 0.2s, color 0.2s;
}
.suggestion-item:hover {
background-color: #f8f8f8;
color: #4a3f77;
}
.suggestion-item:last-child {
border-bottom: none;
border-radius: 0 0 8px 8px;
}
.active-suggestion {
background-color: #f0f0f0;
color: #333;
}