/* /static/css/components/theme_select.css
   Category droplist. In the bmap / bweb search bar it fills the right end of
   #search-box, flush with its top, bottom and right edges, separated from the
   text by a vertical line. Elsewhere (bwall header) it is a pill. */

.theme-select select {
    appearance: none;
    -webkit-appearance: none;
    max-width: 108px;
    padding: 5px 26px 5px 12px;
    font-family: var(--body-font, 'Inter', sans-serif);
    font-size: var(--text-xs, 12px);
    font-weight: 600;
    color: var(--ink, #2A1F18);
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238D6E63' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
        no-repeat right 10px center,
        var(--cream, #FDF6E3);
    border: 1px solid var(--rule, #D7CCC8);
    border-radius: 18px;
    cursor: pointer;
    text-overflow: ellipsis;
}

.theme-select select:focus-visible {
    outline: none;
    border-color: var(--golden-ochre, #E0A02F);
    box-shadow: 0 0 0 3px rgba(224, 160, 47, .14);
}

/* A chosen category is highlighted so a filtered view is never mistaken for All. */
.theme-select select:not([data-theme-value="all"]) {
    color: var(--paper, #FDF6E3);
    background-color: var(--burnt-orange, #D95D39);
    border-color: var(--burnt-orange, #D95D39);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23FDF6E3' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

/* Inside the search bar: sits within the input's 1px border, so the input's
   outline runs around it; right corners follow the input's (24px, or 20px
   top-only while suggestions are open). */
#search-container .theme-select {
    position: absolute;
    top: 1px;
    bottom: 1px;
    right: 1px;
    display: flex;
    z-index: 1;
}

#search-container:has(.theme-select) #search-box {
    padding-right: 116px;
}

#search-container .theme-select select,
#search-container .theme-select select:not([data-theme-value="all"]) {
    height: 100%;
    padding-top: 0;
    padding-bottom: 0;
    border: none;
    border-left: 1px solid var(--rule, #D7CCC8);
    border-radius: 0 23px 23px 0;
}

#search-container .theme-select select[data-theme-value="all"] {
    background-color: var(--paper, #FDF6E3);
}

#search-container:has(#search-results.show) .theme-select select {
    border-radius: 0 19px 0 0;
}

#search-container .theme-select select:focus-visible {
    box-shadow: inset 0 0 0 2px var(--golden-ochre, #E0A02F);
}

@media (max-width: 768px) {
    .theme-select select {
        font-size: 16px; /* prevents iOS auto-zoom on focus */
        max-width: 120px;
        padding: 3px 26px 3px 10px;
        background-position: right 9px center;
    }
    #search-container:has(.theme-select) #search-box {
        padding-right: 128px;
    }
}
