/* ---- the search box: field, magnifier and button as one control ---- */

#search-content {
    position: relative;          /* the typeahead hangs off this */
}

.search-field {
    display: flex;
    align-items: stretch;
    width: 24em;
    max-width: 100%;
    background-color: #fff;
    border: 1px solid #c9ccce;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color .12s, box-shadow .12s;
}

/* Lighting the whole control rather than the input alone: at this border
   weight a default focus ring is almost invisible. */
.search-field:focus-within {
    border-color: #7d2733;
    box-shadow: 0 0 0 3px rgba(125, 39, 51, .13);
}

.search-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 0 2px 0 11px;
    color: #9aa1a7;
}

#search {
    flex: 1 1 auto;
    min-width: 0;
    font: inherit;
    color: #444;
    background: transparent;
    border: 0;
    padding: 10px 10px;
}

#search:focus {
    outline: 0;                  /* .search-field shows the focus instead */
}

#search::placeholder {
    color: #9aa1a7;
}

#search-now {
    flex: 0 0 auto;
    font-family: "Open Sans", "Open Sans Fallback", Arial, sans-serif;
    font-size: 0.92em;
    font-weight: 600;
    background-color: #f3f4f5;
    border: 0;
    border-left: 1px solid #e2e4e6;
    border-radius: 0;
    color: #4a4a4a;
    cursor: pointer;
    padding: 0 17px;
    white-space: nowrap;
}

#search-now:hover {
    background-color: #ece9ea;
    color: maroon;
}

.search-result-container {
    background-color: #ffffff;
    padding: 4px;
    display: inline-block;
    width: auto;
}

/* ---- results ---- */

#search-results {
    margin-top: 0.5em;
}

.search-result-summary {
    margin: 0 0 0.5em;
    font-size: 0.9em;
    color: #575757;
}

.search-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-result {
    margin: 0 0 0.9em;
    padding: 0;
    line-height: 1.4;
}

.search-result-place {
    font-weight: bold;
}

.search-result-pages {
    list-style: none;
    margin: 0.25em 0 0;
    padding: 0 0 0 1.25em;
    font-size: 0.92em;
}

.search-result-pages li {
    display: inline-block;
    margin: 0 1.1em 0.15em 0;
    white-space: nowrap;
}

/* ---- typeahead ---- */

.search-suggestions {
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
    position: absolute;
    z-index: 20;
    width: 24em;
    max-width: 100%;
    max-height: 17em;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.search-suggestion {
    padding: 5px 8px;
    cursor: pointer;
    line-height: 1.3;
    border-bottom: 1px solid #f0f0f0;
}

.search-suggestion:last-child {
    border-bottom: 0;
}

.search-suggestion:hover,
.search-suggestion.is-active {
    background-color: #eaf1fb;
}

.search-suggestion-count {
    display: block;
    font-size: 0.82em;
    color: #6a6a6a;
}

@media (prefers-reduced-motion: reduce) {
    .search-field { transition: none; }
}
