/*
 * The talent search sidebar (Page List Plus search form: Sort, Search By Talent Name and the
 * "Narrow your search" filters), in the site's look: pill controls and filter chips that fill
 * with the site's button blue when picked. Same inputs and names, so searching works as before
 * (a checkbox click still re-runs the search over AJAX). Helpers: ../js/talent-filters.js.
 *
 * Scoped to .sbs_plp_submitViaAjax, the Page List Plus block that sends the search.
 */
.ccm-page .sbs_plp_submitViaAjax {
    --tf-button: #337ab7;
    --tf-button-border: #2e6da4;
    --tf-button-hover: #286090;
    --tf-line: rgba(255, 255, 255, 0.3);
    --tf-muted: rgba(255, 255, 255, 0.65);
}

/* The form sits in a Bootstrap .row (negative side margins): 15px in, like the text above it. */
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_searchSorting,
div.ccm-page .sbs_plp_submitViaAjax .talent-name-search,
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_searchFilters {
    padding-left: 15px;
    padding-right: 15px;
}

/* ---- Sort Results ---- */
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_searchSort > label {
    display: block;
    margin: 0 0 6px;
    color: var(--tf-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
div.ccm-page .sbs_plp_submitViaAjax select.userSorting {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 40px;
    padding: 0 36px 0 14px;
    border: 1px solid var(--tf-line);
    border-radius: 999px;
    background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;
    color: #fff;
    font-family: proxima-nova, sans-serif;
    font-size: 14px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}
div.ccm-page .sbs_plp_submitViaAjax select.userSorting option {
    background: #111;
    color: #fff;
}

/* ---- Search By Talent Name: input + Go on one line ---- */
div.ccm-page .sbs_plp_submitViaAjax .talent-name-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
div.ccm-page .sbs_plp_submitViaAjax .talent-name-search h3 {
    flex: 1 1 100%;
    margin-bottom: 4px;
}
div.ccm-page .sbs_plp_submitViaAjax .talent-name-search input.sbs_plp_query {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    height: 40px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--tf-line);
    border-radius: 999px;
    background: #000;
    color: #fff;
    font-family: proxima-nova, sans-serif;
    font-size: 15px;
}
div.ccm-page .sbs_plp_submitViaAjax .talent-name-search input.sbs_plp_query::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
div.ccm-page .sbs_plp_submitViaAjax select.userSorting:focus,
div.ccm-page .sbs_plp_submitViaAjax .talent-name-search input.sbs_plp_query:focus {
    outline: none;
    border-color: var(--tf-button);
    box-shadow: 0 0 0 3px rgba(51, 122, 183, 0.35);
}
div.ccm-page .sbs_plp_submitViaAjax .talent-name-search input.sbs_plp_submit {
    flex: 0 0 auto;
    height: 40px;
    margin: 0;
    padding: 0 18px;
    border: 1px solid var(--tf-button-border);
    border-radius: 999px;
    background: var(--tf-button);
    color: #fff;
    font-family: proxima-nova, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}
div.ccm-page .sbs_plp_submitViaAjax .talent-name-search input.sbs_plp_submit:hover,
div.ccm-page .sbs_plp_submitViaAjax .talent-name-search input.sbs_plp_submit:focus {
    background: var(--tf-button-hover);
    color: #fff;
}

/* ---- Filters ---- */
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_searchFilters {
    margin-top: 6px;
}
/* The filter columns are 100% wide in the sidebar. */
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_searchFilter > [class*="col-"] {
    float: none;
    width: 100%;
    padding: 0;
}
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_searchFilter {
    margin: 0 0 16px;
}
div.ccm-page .sbs_plp_submitViaAjax label.page-list-label {
    display: block;
    margin: 0 0 8px;
    color: #fff;
    font-family: bebas-neue, sans-serif;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-transform: uppercase;
}
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_selectboxReplacement {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 14px;
}
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_selectboxReplacement > span {
    display: block;
    margin: 0;
}
/* One option = one pill. The checkbox stays (keyboard, screen readers, the AJAX search). */
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_selectboxReplacement label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 5px 12px;
    border: 1px solid var(--tf-line);
    border-radius: 999px;
    color: #fff;
    font-family: proxima-nova, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    text-transform: none;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s, border-color 0.15s;
}
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_selectboxReplacement label:hover {
    border-color: var(--tf-button);
}
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_selectboxReplacement input[type="checkbox"],
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_selectboxReplacement input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_selectboxReplacement label:has(input:checked),
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_selectboxReplacement label.tf-checked {
    background: var(--tf-button);
    border-color: var(--tf-button-border);
    color: #fff;
}
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_selectboxReplacement label:has(input:checked)::before,
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_selectboxReplacement label.tf-checked::before {
    content: "\2713";
    font-size: 12px;
    font-weight: 700;
}
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_selectboxReplacement label:has(input:focus-visible),
div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_selectboxReplacement label.tf-focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* "Clear filters" (added by talent-filters.js when something is picked) */
div.ccm-page .sbs_plp_submitViaAjax .tf-clear {
    display: inline-block;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    background: none;
    color: #20bde8;
    font-family: proxima-nova, sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
div.ccm-page .sbs_plp_submitViaAjax .tf-clear[hidden] {
    display: none;
}

/* Results pager: Concrete 9 marks the current page with <span class="visually-hidden">(current)</span>
   (a Bootstrap 5 class). The theme is Bootstrap 3, so it showed as "1 (current)". */
.ccm-page .sbs_plp_container .pagination .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
    div.ccm-page .sbs_plp_submitViaAjax .sbs_plp_selectboxReplacement label {
        transition: none;
    }
}
