postnummer-app/frontend/style.css

220 lines
3.9 KiB
CSS

@font-face {
font-family: "JetBrains Mono";
src: url("assets/JetBrainsMono-Regular.woff2");
}
@font-face {
font-family: "JetBrains Mono Bold";
src: url("assets/JetBrainsMono-Bold.woff2");
}
*, *::before, *::after {
box-sizing: border-box;
}
:root {
--brand-200: #D55D91;
--brand-300: #D14D86;
--brand: #C33271;
--brand-700: #0D3B45;
--brand-800: #0A2E36;
--brand-900: #061D22;
--light: #FFF;
--topbar-offset: 4rem;
}
body {
margin: 0;
height: 100vh;
font-family: "Open Sans", sans-serif;
background-color: var(--brand-900);
color: var(--light);
}
#topbar {
display: flex;
background-color: var(--brand);
color: var(--light);
text-align: center;
padding: 1rem 2rem;
box-shadow: 0px 5px 1px RGBA(127, 127, 127, 0.2);
}
#topbar h1 {
align-self: center;
margin: 0;
font-size: 1.5rem;
}
#dropdown-button {
border: none;
background-color: transparent;
font-size: 2rem;
transform: scale(1.5);
color: inherit;
margin-left: auto;
padding: 0 0.5rem;
transition: transform 0.2s;
cursor: pointer;
}
#dropdown-button:hover, #dropdown-button:focus {
transform: scale(1.7);
}
#dropdown-button:focus-visible {
outline: none;
background-color: var(--brand-300);
border-radius: 5px;
}
#dropdown-button:active {
transform: scale(2);
}
#dropdown {
position: absolute;
display: flex;
flex-direction: column;
top: var(--topbar-offset);
right: 0;
box-shadow: 0px 5px 1px RGBA(127, 127, 127, 0.2);
transform: scaleY(0);
transition: transform 0.2s;
transform-origin: 0% 0%;
border-radius: 0 0 0 5px;
}
#dropdown.enabled, #dropdown:focus-within {
transform: scaleY(1);
}
#dropdown a {
background-color: var(--brand);
color: var(--light);
padding: 1rem 1rem;
font-weight: bold;
text-decoration: none;
outline: none;
}
#dropdown a:hover, #dropdown a:focus {
background-color: var(--brand-300);
}
#dropdown a:last-child {
border-radius: 0 0 0 5px;
}
main {
text-align: center;
padding: 1rem;
margin: auto;
max-width: 1000px;
}
main > * {
margin-block: 2px;
}
code {
font-family: "JetBrains Mono Bold", monospace;
}
#search-bar {
width: 100%;
display: flex;
flex-direction: row;
margin-bottom: 15px;
}
#search-input {
transition: background-color 0.2s;
background-color: var(--brand-800);
flex: 1;
color: var(--light);
border-radius: 5px 0 0 5px;
border: none;
padding: 1rem;
}
#search-input:focus {
background-color: var(--brand-700);
outline: none;
}
#search-button {
cursor: pointer;
width: 5rem;
background-color: var(--brand);
color: var(--light);
border: none;
border-radius: 0 5px 5px 0;
transition-duration: 0.2s;
}
#search-button:hover, #search-button:focus {
background-color: var(--brand-300);
outline: none;
}
#search-button:active {
background-color: var(--brand-200);
}
#map {
width: 100%;
border-radius: 5px;
}
#info {
background-color: var(--brand-800);
padding: 1rem;
border-radius: 5px;
font-size: 1.1em;
}
#mouse-position, #coords {
color: white;
opacity: 0.5;
font-size: 0.9em;
}
#dot {
width: 15px;
height: 15px;
border-radius: 50%;
border: 2px solid black;
background-color: var(--brand);
filter: drop-shadow(1px 1px 2px black);
position: absolute;
display: none;
}
#tooltip {
display: none;
position: fixed;
background-color: white;
color: black;
padding: 5px;
border: 1px solid black;
box-shadow: 2px 2px 2px black;
transition: opacity 0.2s;
}
#boundary {
position: absolute;
opacity: 0.5;
background-color: var(--brand);
border: 1px dashed var(--brand-700);
pointer-events: none;
}
@media screen and (max-width: 1000px) {
main {
width: 100%;
}
}