.sw-search-modal {
position: fixed;
inset: 0;
z-index: 9600;
display: flex;
align-items: flex-start;
justify-content: center;
padding: 90px 28px 28px;
}
.sw-search-modal[hidden] {
display: none;
}
.sw-search-modal__backdrop {
position: absolute;
inset: 0;
background: rgba(4, 16, 24, .75);
backdrop-filter: blur(10px);
}
.sw-search-modal__card {
position: relative;
z-index: 1;
width: 100%;
max-width: 640px;
max-height: calc(100vh - 118px);
display: flex;
flex-direction: column;
background: #fff;
border-radius: 24px;
overflow: hidden;
box-shadow: 0 42px 100px rgba(0, 0, 0, .28);
}
.sw-search-modal__head {
display: flex;
align-items: center;
gap: 12px;
padding: 18px 18px 18px 24px;
border-bottom: 1px solid #eee9dd;
flex: 0 0 auto;
}
.sw-search-modal__field {
flex: 1 1 auto;
display: flex;
align-items: center;
gap: 12px;
min-width: 0;
color: var(--soft-ink);
font-size: 15px;
}
.sw-search-modal__field i {
flex: 0 0 auto;
font-size: 16px;
color: var(--soft-ink);
}
.sw-search-modal__field input {
flex: 1 1 auto;
min-width: 0;
border: 0;
outline: 0;
background: transparent;
color: var(--ink);
font: inherit;
font-size: 17px;
}
.sw-search-modal__field input::placeholder {
color: #b7bcbf;
}
.sw-search-modal__field input::-webkit-search-cancel-button {
display: none;
}
.sw-search-modal__close {
flex: 0 0 auto;
width: 38px;
height: 38px;
display: grid;
place-items: center;
border: 0;
border-radius: 50%;
background: #f3f1ea;
color: var(--ink);
cursor: pointer;
}
.sw-search-modal__close:hover {
background: var(--blue-soft, #e8f3f8);
color: var(--blue-text);
}
.sw-search-modal__filters {
display: flex;
flex-wrap: wrap;
gap: 18px;
padding: 14px 24px;
border-bottom: 1px solid #eee9dd;
flex: 0 0 auto;
}
.sw-search-toggle {
position: relative;
display: inline-flex;
align-items: center;
gap: 8px;
cursor: pointer;
}
.sw-search-toggle input {
position: absolute;
width: 1px;
height: 1px;
margin: 0;
opacity: 0;
overflow: hidden;
}
.sw-search-toggle__track {
position: relative;
flex: 0 0 auto;
width: 34px;
height: 20px;
display: block;
border-radius: 99px;
background: #cbd2d5;
transition: background-color .17s ease;
}
.sw-search-toggle__track::before {
content: "";
position: absolute;
top: 3px;
left: 3px;
width: 14px;
height: 14px;
border-radius: 50%;
background: #fff;
transition: translate .17s ease;
box-shadow: 0 2px 6px rgba(0, 0, 0, .16);
}
.sw-search-toggle input:checked + .sw-search-toggle__track {
background: var(--green);
}
.sw-search-toggle input:checked + .sw-search-toggle__track::before {
translate: 14px 0;
}
.sw-search-toggle__label {
color: var(--ink);
font-size: 13px;
font-weight: 800;
}
.sw-search-modal__body {
flex: 1 1 auto;
overflow-y: auto;
padding: 10px 14px 22px;
}
.sw-search-modal__hint {
margin: 0;
padding: 30px 12px;
text-align: center;
color: var(--soft-ink);
font-size: 14px;
}
.sw-search-results-group + .sw-search-results-group {
margin-top: 6px;
}
.sw-search-results-group__label {
margin: 16px 12px 6px;
color: #9a938a;
font-size: 11px;
font-weight: 900;
letter-spacing: .08em;
text-transform: uppercase;
}
.sw-search-results-group__list {
display: grid;
gap: 2px;
}
.sw-search-result {
display: block;
padding: 12px 12px;
border-radius: 14px;
text-decoration: none;
transition: background-color .12s ease;
}
.sw-search-result:hover,
.sw-search-result:focus-visible {
background: #f3f1ea;
}
.sw-search-result__title {
display: block;
color: var(--ink);
font-size: 15px;
font-weight: 800;
}
.sw-search-result__snippet {
display: block;
margin-top: 3px;
color: var(--soft-ink);
font-size: 13px;
line-height: 1.55;
}
.sw-search-result__snippet mark {
background: var(--yellow);
color: var(--ink);
border-radius: 3px;
padding: 0 2px;
}
@media (max-width: 640px) {
.sw-search-modal {
padding: 0;
align-items: flex-end;
}
.sw-search-modal__card {
max-width: 100%;
max-height: 88vh;
border-radius: 24px 24px 0 0;
}
.sw-search-modal__head {
padding: 16px 14px 16px 18px;
}
.sw-search-modal__filters {
padding: 12px 18px;
gap: 14px;
}
}
