website/public/assets/css/components/searchBar.css
2024-03-31 12:39:56 +03:30

91 lines
1.6 KiB
CSS

.searchBar {
--searchBar-link-color: var(--text-color-deep);
--searchBar-border-color: var(--secondary-bg-color);
--searchBar-field-background-color: var(--secondary-bg-color-alt);
--searchBar-field-active-background-color: var(--body-bg-color);
}
.searchBar.active .searchBar-field {
width: 70vw;
background: var(--searchBar-field-active-background-color);
box-shadow: var(--base-shadow);
padding: 16px 17px;
transition: 0.3s ease;
}
.searchBar-input {
border: 0;
font-size: 19px;
outline: none;
background-color: transparent;
width: 100%;
}
.searchBar {
border: 0;
font-size: 19px;
outline: none;
background-color: transparent;
position: relative;
top: 2px;
z-index: 1;
}
.searchBar-field {
display: flex;
max-width: 500px;
align-items: center;
justify-content: flex-start;
background: var(--searchBar-field-background-color);
padding: 11px 12px;
border-radius: 12px;
width: 200px;
overflow: hidden;
gap: 10px;
box-shadow: 0 0 0 0 transparent;
}
@media screen and (max-width: 850px) {
.searchBar-field {
width: 160px;
}
}
.searchBar-icon {
position: relative;
top: 2px;
cursor: pointer;
}
.searchBar-icon>.mdi {
font-size: 20px;
}
.searchBar-results {
position: absolute;
top: 76px;
left: 0;
right: 0;
max-height: 70vh;
overflow-y: auto;
}
.searchBar-wrapper {
position: relative;
z-index: 2;
}
.searchBar.active {
position: fixed;
z-index: 20;
top: 20px;
left: 0;
right: 0;
bottom: 0;
margin: 20px;
display: flex;
justify-content: center;
}