2022-12-03 19:12:01 +00:00
|
|
|
@width-search-bar: 560px;
|
2022-05-10 03:54:00 +00:00
|
|
|
|
|
|
|
.citizen-search {
|
|
|
|
--width-search-bar: @width-search-bar;
|
2022-09-29 23:12:56 +00:00
|
|
|
--height-search-bar: var( --header-button-size );
|
2022-05-10 03:54:00 +00:00
|
|
|
|
|
|
|
&__card {
|
2022-12-03 03:18:29 +00:00
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
left: 0;
|
2022-05-10 03:54:00 +00:00
|
|
|
width: var( --width-search-bar );
|
|
|
|
max-width: ~'calc(100vw - var( --padding-page ) )';
|
|
|
|
height: var( --height-search-bar );
|
2022-12-03 03:18:29 +00:00
|
|
|
margin: var( --space-md ) auto;
|
2022-05-10 03:54:00 +00:00
|
|
|
.citizen-card();
|
2022-12-03 03:18:29 +00:00
|
|
|
.citizen-card-hide( top center, '', false );
|
2023-07-07 21:02:27 +00:00
|
|
|
.citizen-card-transition();
|
2022-05-10 03:54:00 +00:00
|
|
|
|
2022-11-03 01:47:33 +00:00
|
|
|
.citizen-ui-icon {
|
|
|
|
width: var( --height-search-bar );
|
|
|
|
height: var( --height-search-bar );
|
|
|
|
|
2023-02-28 21:59:36 +00:00
|
|
|
&::before {
|
2022-11-03 01:47:33 +00:00
|
|
|
background-size: 1rem;
|
|
|
|
}
|
|
|
|
}
|
2022-05-10 03:54:00 +00:00
|
|
|
}
|
|
|
|
|
2023-07-10 20:23:48 +00:00
|
|
|
&__formButton {
|
2022-05-10 03:54:00 +00:00
|
|
|
border-radius: var( --border-radius--small );
|
2023-07-10 20:23:48 +00:00
|
|
|
transition: var( --transition-hover );
|
|
|
|
transition-property: background;
|
2022-05-10 03:54:00 +00:00
|
|
|
|
2023-02-28 21:59:36 +00:00
|
|
|
.citizen-ui-icon::before {
|
2023-07-07 20:36:27 +00:00
|
|
|
transition: var( --transition-hover );
|
2023-07-10 20:23:48 +00:00
|
|
|
transition-property: opacity;
|
2022-05-10 03:54:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: var( --background-color-quiet--hover );
|
|
|
|
|
2023-02-28 21:59:36 +00:00
|
|
|
.citizen-ui-icon::before {
|
2022-05-10 03:54:00 +00:00
|
|
|
opacity: var( --opacity-icon-base--hover );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
background-color: var( --background-color-quiet--active );
|
|
|
|
|
2023-02-28 21:59:36 +00:00
|
|
|
.citizen-ui-icon::before {
|
2022-05-10 03:54:00 +00:00
|
|
|
opacity: var( --opacity-icon-base--active );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-10 20:23:48 +00:00
|
|
|
&__clear {
|
|
|
|
.citizen-ui-icon::before {
|
|
|
|
background-size: 0.875rem; // Align with text size
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__random {
|
|
|
|
.citizen-ui-icon::before {
|
|
|
|
transition-property: opacity, transform;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
.citizen-ui-icon::before {
|
|
|
|
transform: rotate( 30deg );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-03-01 20:27:29 +00:00
|
|
|
&__form {
|
2023-07-10 19:13:21 +00:00
|
|
|
display: flex;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Loading indicator for searchbox
|
|
|
|
* See common/progressbar.less
|
|
|
|
**/
|
|
|
|
&.citizen-loading::after {
|
|
|
|
position: absolute;
|
|
|
|
top: 100%;
|
|
|
|
}
|
2022-12-02 22:35:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#searchInput {
|
2023-07-10 19:13:21 +00:00
|
|
|
flex-grow: 1;
|
|
|
|
padding: 0;
|
2022-05-10 03:54:00 +00:00
|
|
|
border: 0; // Cancel default border
|
|
|
|
appearance: none;
|
|
|
|
background: transparent; // Cancel default background
|
|
|
|
font-size: 0.8125rem;
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
outline: 0;
|
|
|
|
// The search suggestion pop-up indicates for focus state
|
|
|
|
// border-color: var( --color-primary );
|
|
|
|
// box-shadow: inset 0 0 0 1px var( --color-primary );
|
|
|
|
}
|
2023-07-10 20:23:48 +00:00
|
|
|
|
|
|
|
// Remove browser native clear all button in search field
|
|
|
|
&::-webkit-search-cancel-button {
|
|
|
|
-webkit-appearance: none;
|
|
|
|
}
|
2022-05-10 03:54:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Checkbox hack
|
|
|
|
#citizen-search__checkbox:checked {
|
2022-05-10 15:15:34 +00:00
|
|
|
~ .citizen-search__card {
|
2022-05-10 03:54:00 +00:00
|
|
|
.citizen-card-show( false );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-29 23:12:56 +00:00
|
|
|
@media ( max-width: @width-breakpoint-desktop ) {
|
2022-05-10 03:54:00 +00:00
|
|
|
.citizen-search__card {
|
2023-01-27 19:19:32 +00:00
|
|
|
z-index: 1; // So that overlay does not cover card
|
2022-05-10 03:54:00 +00:00
|
|
|
width: auto;
|
2022-12-03 03:18:29 +00:00
|
|
|
margin: var( --space-xs );
|
2022-05-10 03:54:00 +00:00
|
|
|
|
|
|
|
// Remove searchbox open animation on mobile
|
|
|
|
// But keep suggestion animation
|
|
|
|
// So user can get to search instantly
|
|
|
|
.citizen-animations-ready & {
|
|
|
|
transition: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|