.search-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 5px 8px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition-duration: 0.4s;
    font-family: "Roboto", "Lucida Grande", Verdana, Arial, sans-serif;
    background-color: var(--button-bg);
    color: var(--button-fg);
}

.search-button:hover {
    background-color: var(--button-hover-bg);
}

.search-button kbd {
    font-family: serif;
    opacity: 50%;
    border-left: solid 1px;
    padding-left: 5px;
}

.search-button abbr {
    text-decoration: none;
    margin-right: 3px;
}

.search-modal-container {
    z-index: 20;
    position: relative;
}

.search-modal-cover {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.15s;

    opacity: 0.75;
    background-color: rgb(107 114 128/0.75);
}

.search-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    display: flex;
    align-items: start;
    justify-content: center;
    padding: 1rem;
}

.search-modal-body {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: var(--body-bg);
    border-radius: 15px;
    text-align: left;
    width: 100%;
    min-height: 400px;
    max-height: 80%;
    max-width: 32rem;
    padding: 1.5rem;
}

.search-modal-help-text {
    text-align: center;
    opacity: 0.8;
    margin: 0;
}

.search-input {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-input input {
    padding: 10px;
    width: 100%;
}

.divider {
    width: 80%;
    background-color: var(--body-quiet-color);
    height: 1px;
    opacity: 0.5;
}

.results-container {
    overflow-y: scroll;
}

.results-container ul {
    padding: 0;
}

.results-container li > ul {
    padding: 0 10px;
}

.results-container li {
    list-style: none;
}

.result-heading {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.result-entry {
    display: block;
}

.result {
    padding: 2px 0 2px 5px;
    outline: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-decoration: none;
    border-radius: 5px;
}

.result:focus {
    background-color: var(--primary);
    text-decoration: none;
}

.result:hover {
    background-color: var(--primary);
    text-decoration: none;
}

.result-suffix {
    font-size: 12px;
    color: var(--body-quiet-color);
}

.spinner {
    display: flex;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 40px;
}

.spinner div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 32px;
    height: 32px;
    margin: 4px;
    border: 4px solid;
    border-radius: 50%;
    animation: spinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: var(--primary) transparent transparent transparent;
}

.spinner div:nth-child(1) {
    animation-delay: -0.45s;
}
.spinner div:nth-child(2) {
    animation-delay: -0.3s;
}
.spinner div:nth-child(3) {
    animation-delay: -0.15s;
}

@keyframes spinner {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 1024px) {
    .search-button {
        margin-bottom: 8px;
    }
}

@media (max-width: 767px) {
    .search-modal-body {
        width: 20rem;
    }
}