File: //var/www/quadcode-jobs/resources/sass/common/_search.scss
.search {
display: grid;
grid-template-columns: repeat(3, 1fr) 22.6%;
gap: 0;
min-height: 7rem;
box-shadow: var(--shadow-2);
@include breakpoint-down('lg') {
grid-template-columns: 100%;
gap: 22px;
}
@include breakpoint-down('sm') {
gap: 10px;
}
&__field {
position: relative;
display: flex;
align-items: center;
background-color: var(--color-app-background);
border-radius: 0;
padding: 1.5rem;
&:not(:nth-last-of-type(2)):not(:last-of-type) {
&::before {
content: "";
position: absolute;
top: 50%;
right: 0;
height: 70%;
width: 1px;
transform: translateY(-50%);
background-color: #BCC6CF;
@include breakpoint-down('sm') {
display: none;
}
}
}
@include breakpoint-up('lg') {
&:first-child {
border-radius: .5rem 0 0 .5rem;
}
&:last-child {
border-radius: 0 .5rem .5rem 0;
overflow: hidden;
}
}
@include breakpoint-down('lg') {
height: 60px;
padding: 0.5rem;
border-radius: .5rem;
box-shadow: var(--shadow-2);
button {
border-radius: .5rem;
}
}
}
&__field {
&-keyword {
flex-direction: column;
align-items: start;
@include breakpoint-down('lg') {
flex-direction: row;
align-items: center;
}
label {
padding-left: 11px;
line-height: 26px;
font-size: 16px;
height: 26px !important;
@include breakpoint-down('lg') {
white-space: nowrap;
padding-left: 21px;
}
}
input {
line-height: 26px;
font-size: 16px;
color: #2A3540;
height: 26px !important;
padding: 0;
&::placeholder {
line-height: 26px;
font-size: 16px;
color: #768490;
}
&:focus {
&::placeholder {
opacity: 0;
}
}
}
}
&.has-select {
.select2 {
width: 100% !important;
}
}
}
&__field--submit {
display: flex;
align-items: center;
justify-content: center;
padding: 0;
background: var(--color-highlight);
color: var(--color-text-light);
font-size: var(--typo-subtitle);
font-weight: 600;
}
input {
padding-left: 10px !important;
width: 100%;
border: 0;
//color: var(--color-text-primary);
font-family: var(--font-primary);
&::placeholder {
color: var(--color-text-gray);
}
}
button {
height: 100%;
border-bottom-left-radius: 0;
border-top-left-radius: 0;
@include breakpoint-down('lg') {
border-radius: .5rem;
}
}
}
.search-select {
position: relative;
width: 100%;
select {
width: 100%;
border: 0;
@include breakpoint-down('sm') {
height: 100%;
background: white;
}
}
.select2-container {
padding: 0 1rem;
padding-right: 0;
min-height: 0 !important;
@include breakpoint-down('lg') {
width: 100% !important;
z-index: unset !important;
}
.select2-selection {
position: relative;
display: flex;
justify-content: flex-start;
align-items: center;
margin: 0 1px;
border: 0 !important;
padding: 0 3rem 0 0;
overflow: hidden;
&:after {
content: "";
position: absolute;
width: 1.5rem;
right: 5px;
height: 0.8rem;
margin-left: 0.5rem;
margin-right: 0.5rem;
background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg width='15px' height='8px' viewbox='0 0 15 8' version='1.1' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13 0L6.5 6L-5.77316e-14 0' transform='translate(1 1)' id='Path' fill='none' fill-rule='evenodd' stroke='%232A3540' stroke-width='2' /%3E%3C/svg%3E");
background-size: 100%;
background-color: #fff;
background-repeat: no-repeat;
transition: .3s all ease;
display: block;
align-items: center;
justify-content: center;
top: calc(50% - 5px);
padding: 5px;
cursor: pointer;
@include breakpoint-down('sm') {
right: 10px;
transform: translate(0) !important;
}
}
&:before {
content: "";
position: absolute;
width: 1.5rem;
right: 5px;
margin-left: 0.5rem;
margin-right: 0.5rem;
background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg width='15px' height='8px' viewbox='0 0 15 8' version='1.1' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13 0L6.5 6L-5.77316e-14 0' transform='translate(1 1)' id='Path' fill='none' fill-rule='evenodd' stroke='%23F1162F' stroke-width='2' /%3E%3C/svg%3E");
background-size: 100%;
background-color: #fff;
background-repeat: no-repeat;
transition: .3s all ease;
display: block;
align-items: center;
justify-content: center;
top: -1rem;
padding: 5px;
transform: scale(-1);
cursor: pointer;
@include breakpoint-down('sm') {
right: 10px;
}
}
&[aria-expanded="true"] {
&:before {
top: calc(50% - 5px);
}
&:after {
top: calc(100% + 1rem);
}
}
}
.select2-search__field {
width: 100% !important;
}
.select2-selection__rendered {
display: flex !important;
justify-content: flex-start;
align-items: center;
max-width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding: 0;
@include breakpoint-down('lg') {
padding-left: 11px;
}
.select2-search__field {
margin: 0 !important;
font-size: 16px;
}
}
.select2-search--inline {
display: flex;
align-items: center;
}
.select2-selection__choice {
white-space: nowrap;
background-color: transparent !important;
border: 0 !important;
border-radius: 0 !important;
display: inline-flex !important;
margin: 0 !important;
margin-right: .3rem !important;
padding: 0 !important;
font-size: 16px;
line-height: normal !important;
&:first-child {
padding-left: 10px !important;
}
&:not(:nth-last-child(2)):after {
content: ', ';
}
}
.select2-selection__choice__remove {
display: none;
}
}
.select2-dropdown {
border: 0;
width: calc(100% + 35px) !important;
left: -18px;
top: 10px;
@include breakpoint-down('lg') {
width: calc(100% + 14px)!important;
left: -7px;
top: 0;
}
}
.select2-results {
padding: 0.5rem;
border-radius: 0 0 .5rem .5rem;
background-color: var(--color-app-background);
box-shadow: var(--shadow-2);
}
.select2-results__options {
max-height: 24rem;
padding: 1.5rem;
overflow-y: auto;
overscroll-behavior: contain;
text-align: left;
&::-webkit-scrollbar {
width: 0.6rem;
}
&::-webkit-scrollbar-track {
border-radius: 1rem;
}
&::-webkit-scrollbar-thumb {
border-radius: 10px;
background: var(--color-line);
}
}
.select2-results__option {
height: 30px;
display: flex;
align-items: center;
justify-content: flex-start;
font-size: 14px;
padding-left: 10px;
&:not(:last-child) {
margin-bottom: 2rem;
}
&--highlighted[aria-selected],
&:hover {
background-color: #F8FAFB;
border-radius: 1.5rem;
color: var(--color-text-primary);
}
&[aria-selected="true"] {
display: flex;
background-color: #F8FAFB;
padding-left: 1.2rem;
border-radius: 1.5rem;
&:before {
content: '';
margin-right: 1rem;
width: 1.4rem;
background-size: 100% 100%;
height: 1.4rem;
font-weight: 900;
line-height: 0;
font-size: 1.2rem;
margin-top: 1px;
background-image: url(/files/icons/close.svg);
}
}
}
}