/*
 * Algolia site-search styling (WEB evaluation spike).
 *
 * Deliberately minimal: the point of the spike is to judge Algolia's relevance
 * and speed, not to land finished Cordoba design. Colours borrow the brand
 * brown (#7A3A00) already used across the blog and breadcrumbs.
 *
 * Pairs with instantsearch.css reset-min (loaded via the page's css attr) --
 * the reset only normalises widget markup, it carries no theme of its own.
 */

.ygg-search {
    padding: 30px 25px 60px;
}

.ygg-search-header {
    margin-bottom: 30px;
}

.ygg-search-header h1 {
    color: #7A3A00;
    font-size: 34px;
    margin: 0 0 18px;
}

/* --- search box --- */

.ygg-search .ais-SearchBox-form {
    display: flex;
    align-items: center;
    border: 1px solid #d8cec4;
    border-radius: 3px;
    background: #fff;
    max-width: 640px;
}

.ygg-search .ais-SearchBox-input {
    flex: 1 1 auto;
    border: 0;
    padding: 12px 14px;
    font-size: 17px;
    outline: none;
    background: transparent;
}

.ygg-search .ais-SearchBox-submit,
.ygg-search .ais-SearchBox-reset {
    border: 0;
    background: transparent;
    padding: 0 12px;
    cursor: pointer;
    color: #7A3A00;
}

.ygg-search .ais-SearchBox-submitIcon,
.ygg-search .ais-SearchBox-resetIcon {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

#ais-stats {
    margin-top: 10px;
    color: #6d6259;
    font-size: 14px;
}

/* --- facets --- */

.ygg-search-facets h4 {
    color: #7A3A00;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 22px 0 10px;
}

.ygg-search-facets .ais-RefinementList-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ygg-search-facets .ais-RefinementList-item {
    margin-bottom: 6px;
}

.ygg-search-facets .ais-RefinementList-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    font-size: 15px;
    margin: 0;
    cursor: pointer;
}

.ygg-search-facets .ais-RefinementList-labelText {
    flex: 1 1 auto;
}

.ygg-search-facets .ais-RefinementList-count {
    color: #8a7f75;
    font-size: 12px;
    background: #f1ece7;
    border-radius: 10px;
    padding: 1px 8px;
}

.ygg-search-facets .ais-ClearRefinements-button {
    margin-top: 18px;
    border: 1px solid #d8cec4;
    background: #fff;
    color: #7A3A00;
    padding: 7px 14px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.ygg-search-facets .ais-ClearRefinements-button--disabled {
    opacity: 0.45;
    cursor: default;
}

.ygg-search-facets .ais-RefinementList-showMore {
    border: 0;
    background: transparent;
    color: #7A3A00;
    padding: 4px 0;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
}

/* --- hits --- */

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

.ygg-search-results .ais-Hits-item {
    border-bottom: 1px solid #ece5de;
}

.ygg-hit {
    display: flex;
    gap: 18px;
    padding: 18px 4px;
    color: inherit;
    text-decoration: none;
}

.ygg-hit:hover {
    background: #faf7f4;
    text-decoration: none;
    color: inherit;
}

.ygg-hit-thumb {
    flex: 0 0 72px;
    width: 72px;
}

.ygg-hit-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.ygg-hit-thumb-empty {
    display: block;
    width: 72px;
    height: 72px;
    background: #f1ece7;
}

.ygg-hit-body {
    flex: 1 1 auto;
    min-width: 0;
}

.ygg-hit-type {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a7f75;
    background: #f1ece7;
    border-radius: 2px;
    padding: 2px 7px;
    margin-bottom: 6px;
}

.ygg-hit-type-product {
    color: #fff;
    background: #7A3A00;
}

.ygg-hit-title {
    font-size: 19px;
    margin: 0 0 4px;
    color: #7A3A00;
}

.ygg-hit-sku {
    font-size: 12px;
    color: #8a7f75;
    margin-bottom: 4px;
}

.ygg-hit-snippet {
    font-size: 15px;
    color: #4a4139;
    margin: 0 0 5px;
    /* Snippets are one long line of page text -- clamp so a hit stays scannable. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ygg-hit-path {
    font-size: 12px;
    color: #a2988e;
}

.ygg-hit mark,
.ygg-navsearch-hit mark {
    background: #fdf0b8;
    color: inherit;
    padding: 0 1px;
}

.ygg-hit-empty {
    padding: 40px 4px;
    color: #6d6259;
}

/* --- pagination --- */

#ais-pagination {
    margin-top: 28px;
}

#ais-pagination .ais-Pagination-list {
    display: flex;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

#ais-pagination .ais-Pagination-link {
    display: block;
    min-width: 34px;
    text-align: center;
    padding: 6px 9px;
    border: 1px solid #e2dad2;
    border-radius: 3px;
    color: #7A3A00;
    text-decoration: none;
}

#ais-pagination .ais-Pagination-item--selected .ais-Pagination-link {
    background: #7A3A00;
    border-color: #7A3A00;
    color: #fff;
}

#ais-pagination .ais-Pagination-item--disabled .ais-Pagination-link {
    opacity: 0.4;
}

/* --- topnav type-ahead --- */

.search-desktop-form-container,
.search-mobile-form-container {
    position: relative;
}

.ygg-navsearch-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1200;
    background: #fff;
    border: 1px solid #d8cec4;
    border-top: 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    max-height: 60vh;
    overflow-y: auto;
}

.ygg-navsearch-hit {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    color: #4a4139;
    text-decoration: none;
    border-bottom: 1px solid #f2ece6;
}

.ygg-navsearch-hit:hover {
    background: #faf7f4;
    text-decoration: none;
}

.ygg-navsearch-hit-title {
    font-size: 15px;
}

.ygg-navsearch-hit-type {
    flex: 0 0 auto;
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #8a7f75;
}

.ygg-navsearch-all {
    display: block;
    padding: 10px 12px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7A3A00;
    text-decoration: none;
    background: #faf7f4;
}

.ygg-navsearch-empty {
    padding: 12px;
    font-size: 14px;
    color: #8a7f75;
}
