Search/static/css/style-search.css
2024-12-03 22:06:40 +01:00

403 lines
7.7 KiB
CSS

/* General Styles */
body, html {
margin: 0;
padding: 0;
background-color: var(--html-bg);
font-family: 'Inter', Arial, Helvetica, sans-serif;
font-size: 16px;
color: var(--text-color);
}
button, p {
font-family: 'Inter', Arial, Helvetica, sans-serif;
font-weight: 400;
}
body.menu-open {
overflow: hidden;
}
.highlight {
color: var(--highlight);
font-weight: bold;
font-style: normal;
}
.material-icons-round {
font-family: 'Material Icons Round' !important;
font-weight: normal;
font-style: normal;
font-size: 24px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
-webkit-font-feature-settings: 'liga';
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
font-feature-settings: 'liga';
}
#search-wrapper-ico {
background: none;
border: none;
color: var(--fg);
position: absolute;
top: 50%;
right: 10px;
transform: translateY(-50%);
cursor: pointer;
font-size: 24px;
}
#search-wrapper-ico:hover {
transition: color 0.3s ease;
color: var(--font-fg);
}
.wrapper {
margin: 0 auto;
background: var(--search-bg-input);
border-radius: 22px;
position: relative;
width: 100%;
max-width: 600px;
overflow: visible;
border: 1px solid var(--search-bg-input-border);
display: flex;
flex-direction: column;
box-sizing: border-box;
}
.wrapper input {
width: 100%;
padding: 10px 50px 10px 20px;
font-size: 16px;
color: var(--font-fg);
background-color: var(--search-bg-input);
background: none;
border: none;
outline: none;
box-sizing: border-box;
height: 100%;
}
.wrapper input::placeholder {
color: var(--fg);
}
.wrapper-searching {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
/* Autocomplete Styles */
.autocomplete {
display: none;
text-align: left;
width: 100%;
position: absolute;
left: -1px; /* this is so curesed */
top: 100%;
background-color: var(--search-bg-input);
border-bottom-left-radius: 22px;
border-bottom-right-radius: 22px;
border: 1px solid var(--search-bg-input-border);
border-top: none; /* No top border to avoid double borders with the input */
z-index: 900;
}
/* Show autocomplete when wrapper has 'wrapper-searching' class */
.wrapper-searching .autocomplete {
display: block;
}
.autocomplete ul {
margin: 0;
padding: 0;
}
.autocomplete ul li {
list-style: none;
padding: 8px 12px;
cursor: pointer;
color: var(--font-fg);
}
.autocomplete ul li.selected,
.autocomplete ul li:hover {
background: var(--search-select);
}
.autocomplete ul li:last-child {
border-bottom-left-radius: 22px;
border-bottom-right-radius: 22px;
}
/* Logo Styles */
.logo-container {
margin: 0 auto 40px auto;
color: var(--font-fg);
text-align: center;
}
.logo-container svg {
max-width: 300px;
height: auto;
vertical-align: middle;
margin: 0 auto;
}
/* Centering Content */
.search-page-content {
max-width: 800px;
margin: 0 auto;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center; /* Center vertically */
height: 100vh; /* Make it full viewport height */
}
/* Search Type Icons */
.search-type-icons {
display: flex;
justify-content: center;
flex-wrap: wrap;
margin-top: 30px;
gap: 20px;
/* Allow transform movement */
transition: transform 0.3s ease; /* Smooth movement when suggestions appear */
position: relative;
}
.icon-button {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.icon-button button {
background: none;
border: none;
color: var(--search-button);
cursor: pointer;
font-size: 24px;
}
.icon-button button:hover {
color: var(--font-fg);
transition: color 0.3s ease;
}
.icon-button p {
margin-top: 5px;
font-size: 14px;
color: var(--font-fg);
cursor: pointer;
}
.icon-button:hover button,
.icon-button:hover p {
color: var(--font-fg);
font-weight: normal;
transform: none;
}
/* Menu Button */
.settings-icon-link-search {
position: fixed;
top: 25px;
right: 20px;
font-size: 25px;
background-color: inherit;
border: none;
color: var(--fg);
cursor: pointer;
z-index: 99;
}
.settings-icon-link-search:hover {
text-decoration: none;
color: var(--font-fg);
transition: color 0.3s ease;
}
/* Style for Close Button in Menu */
.closebtn {
background: none;
border: none;
color: var(--fg);
cursor: pointer;
font-size: 36px;
position: absolute;
top: 20px;
right: 20px;
z-index: 999;
width: 50px;
height: 50px;
font-size: 36px; /* Not working */
}
.side-nav .closebtn:hover {
color: var(--highlight);
background: none;
}
/* Side Navigation Menu */
.side-nav {
height: 100%;
width: 0;
position: fixed;
top: 0;
right: 0;
background-color: var(--html-bg);
overflow-x: hidden;
transition: width 0.4s ease-in-out; /* Does this even change anything? cant really tell */
z-index: 1000;
box-shadow: -2px 0 5px rgba(0,0,0,0.5);
padding-top: 70px;
overflow-x: hidden; /* Prevents horizontal overflow */
}
.side-nav:hover .closebtn:hover {
color: var(--font-fg);
transition: color 0.3s ease;
background: none;
}
/* Menu Content */
.side-nav a,
.side-nav button,
.side-nav select {
padding: 8px 32px;
text-decoration: none;
font-size: 18px;
color: var(--font-fg);
display: block;
transition: background-color 0.3s ease;
border: none;
background: none;
width: 100%;
text-align: left;
}
.side-nav a:hover,
.side-nav button:hover,
.side-nav select:hover {
background-color: var(--search-select);
color: var(--font-fg);
cursor: pointer;
text-decoration: none;
}
/* Style for buttons in the menu */
.side-nav button {
background: none;
border: none;
font-size: 18px;
font-family: inherit;
padding: 8px 32px;
width: 100%;
text-align: left;
color: var(--font-fg);
}
.side-nav .closebtn:hover {
color: var(--highlight);
}
/* Overlay effect when menu is open */
body.menu-open::before {
content: '';
display: block;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
z-index: 998;
}
/* Responsive Design */
@media only screen and (max-width: 650px) {
.wrapper {
max-width: 95%;
}
}
@media only screen and (max-width: 450px) {
.wrapper {
width: 90%;
}
.logo-container svg {
width: 75%;
max-width: 90%;
min-width: 25%;
}
.side-nav {
max-width: 90%;
}
}
@media only screen and (max-height: 300px) {
.logo-container svg {
width: 25%;
max-width: 90%;
min-width: 25%;
}
}
/* Additional Global Styles */
a {
text-decoration: none;
color: var(--link);
}
a:hover {
text-decoration: underline;
}
h1 {
font-size: 70px;
color: var(--font-fg);
font-family: 'Inter';
}
p {
color: var(--fg);
font-size: 14px;
line-height: 1.58;
}
input, button {
outline: none;
}
body.menu-open {
overflow: hidden;
}
/* Prevent horizontal scrolling on the page */
html, body {
overflow-x: hidden; /* Disables horizontal scrollbar */
margin: 0;
padding: 0;
max-width: 100vw; /* Limits content to viewport width */
}
/*
Remove default focus outline and add custom focus style
.wrapper input[type="text"]:focus {
outline: none;
border: 1px solid var(--font-fg);
box-shadow: none;
} */