/*
 * The consumable finder above the consumable listings (module/{computer,mobile}/group/printerFilter.phtml), redesigned
 * 2026-10-15 to the store's style: a card with the brand's tint and the blog covers' dot pattern, two fields that read
 * as searches (an icon inside, the header search's pink magnifier at the end — not a dropdown arrow), "ou" between
 * them. Computer: side by side; phone (.lbFinderStack): one under the other.
 *
 * The fields are select2 (4.0.13). Its dropdown hangs from <body>, so it carries its own class (dropdownCssClass
 * "lbFinderDropdown") and everything here is scoped to it: the listing's other select2s keep their look.
 * Font Awesome is a webfont here: its glyphs are text, centred by line-height, never by flex (CLAUDE.md).
 */

.lbFinder{
    position: relative;
    margin-bottom: 24px;
    padding: 20px 24px 22px;
    border: 1px solid var(--lb-border);
    border-radius: 14px;
    background: linear-gradient(115deg, rgba(var(--lb-brand-rgb), .07) 0%, rgba(var(--lb-brand-rgb), .02) 45%, var(--lb-card) 75%);
    box-shadow: var(--lb-shadow-sm);
    text-align: left;
}

/* the blog covers' dots, in the top right corner, fading out towards the content */
.lbFinder::before{
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    border-radius: 0 14px 14px 0;
    background-image: radial-gradient(rgba(var(--lb-brand-rgb), .24) 1.3px, transparent 1.6px);
    background-size: 16px 16px;
    -webkit-mask-image: linear-gradient(225deg, #000 0%, rgba(0, 0, 0, .35) 40%, transparent 70%);
    mask-image: linear-gradient(225deg, #000 0%, rgba(0, 0, 0, .35) 40%, transparent 70%);
    pointer-events: none;
}

.lbFinderHead{
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.lbFinderBadge{
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--lb-brand);
    color: #fff;
    font-size: 18px;
    line-height: 46px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(var(--lb-brand-rgb), .28);
}

.lbFinderTitle{
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--lb-brand);
}

.lbFinderTitle span{
    color: var(--lb-brand-alt);
}

.lbFinderSub{
    margin: 3px 0 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--lb-text-muted);
}

.lbFinderFields{
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: end;
    gap: 14px;
}

.lbFinderLabel{
    display: block;
    margin: 0 0 7px 2px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--lb-text);
    cursor: pointer;
}

/* the control: the select (and, once loaded, select2) with the icon on top of its left end. Positioned so the select2
   original <select>, absolutely placed, stays inside it */
.lbFinderControl{
    position: relative;
    min-height: 50px;
}

.lbFinderLead{
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    width: 46px;
    height: 50px;
    font-size: 17px;
    line-height: 50px;
    text-align: center;
    color: var(--lb-brand);
    pointer-events: none;
}

/* before select2 loads: the bare select already has the field's shape, so nothing moves when it is replaced */
.lbFinderControl > select{
    width: 100%;
    height: 50px;
    border: 1px solid var(--lb-border);
    border-radius: 10px;
    background: var(--lb-card);
    color: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.lbFinder .select2-container{
    width: 100% !important;
}

/* printerFilter.css lifts every open select2 container to z-index 9999 (for the dropdown); the field's own container
   stays under its icon */
.lbFinderControl .select2-container--open{
    z-index: 1 !important;
}

.lbFinder .select2-container--default .select2-selection--single{
    display: flex;
    align-items: center;
    height: 50px;
    border: 1px solid var(--lb-border);
    border-radius: 10px;
    background: var(--lb-card);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.lbFinder .select2-container--default .select2-selection--single:hover{
    border-color: rgba(var(--lb-brand-rgb), .55);
}

.lbFinder .select2-container--default.select2-container--focus .select2-selection--single,
.lbFinder .select2-container--default.select2-container--open .select2-selection--single{
    border-color: var(--lb-brand);
    border-radius: 10px;
    box-shadow: 0 0 0 3px rgba(var(--lb-brand-rgb), .15);
}

.lbFinder .select2-container--default .select2-selection--single .select2-selection__rendered{
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 64px 0 46px;
    font-size: 15px;
    line-height: normal;
    color: var(--lb-text);
}

.lbFinder .select2-container--default .select2-selection--single .select2-selection__placeholder{
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--lb-text-muted);
}

/* the end of the field: the header search's pink button with its magnifier, in place of select2's arrow. Its offsets
   count from the select2 container's outer edge: 4 + 42 + 4 = the 50px field */
.lbFinder .select2-container--default .select2-selection--single .select2-selection__arrow{
    top: 4px;
    right: 4px;
    width: 52px;
    height: 42px;
    border-radius: 8px;
    background: var(--lb-accent);
    transition: background .15s ease;
}

.lbFinder .select2-container--default .select2-selection--single:hover .select2-selection__arrow{
    background: var(--lb-accent-hover);
}

.lbFinder .select2-container--default .select2-selection--single .select2-selection__arrow b{
    display: none;
}

.lbFinder .select2-container--default .select2-selection--single .select2-selection__arrow::after{
    content: "\f002";
    display: block;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 16px;
    line-height: 42px;
    text-align: center;
    color: var(--lb-on-accent);
}

/* a printer already chosen (its page): the photo and the model */
.lbFinderPicked{
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
}

.lbFinderPicked img{
    flex: 0 0 auto;
    width: auto;
    height: 30px;
}

.lbFinderPicked span{
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* "ou": a small round mark at the fields' height */
.lbFinderOr{
    display: flex;
    align-items: center;
    height: 50px;
}

.lbFinderOr span{
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 1px solid var(--lb-border);
    border-radius: 50%;
    background: var(--lb-card);
    font-size: 12px;
    font-weight: 700;
    line-height: 34px;
    text-align: center;
    text-transform: uppercase;
    color: var(--lb-text-muted);
}

/* ---- the dropdown (appended to <body>) ---- */

.select2-container .select2-dropdown.lbFinderDropdown{
    z-index: 9999;
    overflow: hidden;
    margin-top: 6px;
    border: 1px solid rgba(var(--lb-brand-rgb), .35);
    border-radius: 12px;
    background: var(--lb-card);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
}

.select2-container--above .select2-dropdown.lbFinderDropdown{
    margin-top: -6px;
}

.lbFinderDropdown .select2-search--dropdown{
    padding: 10px 10px 6px;
}

.lbFinderDropdown .select2-search--dropdown .select2-search__field{
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--lb-border);
    border-radius: 8px;
    font-size: 16px;
    color: var(--lb-text);
}

.lbFinderDropdown .select2-search--dropdown .select2-search__field:focus{
    border-color: var(--lb-brand);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(var(--lb-brand-rgb), .12);
}

.lbFinderDropdown .select2-results > .select2-results__options{
    max-height: 340px;
    padding: 4px 6px 6px;
}

.lbFinderDropdown .select2-results__option{
    margin: 2px 0;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--lb-text);
}

.lbFinderDropdown .select2-results__message{
    padding: 10px 12px;
    font-size: 14px;
    color: var(--lb-text-muted);
}

.select2-container--default .lbFinderDropdown .select2-results__option--highlighted[aria-selected]{
    background: rgba(var(--lb-brand-rgb), .08);
    box-shadow: inset 3px 0 0 var(--lb-brand);
    color: var(--lb-text) !important;
}

.select2-container--default .lbFinderDropdown .select2-results__option--highlighted[aria-selected] *{
    color: inherit !important;
}

.select2-container--default .lbFinderDropdown .select2-results__option[aria-selected=true]{
    background: rgba(var(--lb-brand-rgb), .12);
}

.lbFinderResult{
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.35;
}

.lbFinderThumb{
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    padding: 3px;
    border: 1px solid var(--lb-border);
    border-radius: 8px;
    background: #fff;
    object-fit: contain;
}

.lbFinderResultText{
    min-width: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.lbFinderResultText b{
    color: var(--lb-brand);
}

/* ---- the phone: one field under the other, "ou" as a rule across ---- */

.lbFinderStack{
    margin: 0 0 18px;
    padding: 16px 16px 18px;
    border-radius: 12px;
}

.lbFinderStack::before{
    width: 180px;
    border-radius: 0 12px 12px 0;
}

.lbFinderStack .lbFinderHead{
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.lbFinderStack .lbFinderBadge{
    width: 40px;
    height: 40px;
    font-size: 16px;
    line-height: 40px;
}

.lbFinderStack .lbFinderTitle{
    font-size: 17px;
}

.lbFinderStack .lbFinderSub{
    font-size: 14px;
}

.lbFinderStack .lbFinderFields{
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
}

.lbFinderStack .lbFinderOr{
    gap: 10px;
    height: 34px;
}

.lbFinderStack .lbFinderOr::before,
.lbFinderStack .lbFinderOr::after{
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--lb-border);
}

.lbFinderStack .lbFinderOr span{
    width: auto;
    height: auto;
    border: 0;
    background: none;
    line-height: 1;
}

.lbFinderStack .lbFinderLabel{
    font-size: 14px;
}

/* !important: mobile/components/group.css sets every select2 selection to 1.1rem !important */
.lbFinderStack .select2-container--default .select2-selection--single .select2-selection__rendered,
.lbFinderStack .lbFinderPicked{
    font-size: 15px !important;
}

/* the phone's dropdowns stay under its fixed header and sheets, as before */
.select2-container .select2-dropdown.lbFinderDropdown.lbFinderDropdownStack{
    z-index: 90;
}

.lbFinderDropdownStack .select2-results > .select2-results__options{
    max-height: 300px;
}

.lbFinderDropdown.lbFinderDropdownStack .lbFinderThumb{
    width: 40px;
    height: 40px;
}

.lbFinderDropdown.lbFinderDropdownStack .select2-results__option{
    font-size: 14px;
}
