/* Checkbox styling for selected state */
#page_search .checkbox-wrapper .checkbox-custom-label {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 3px;
    background-color: white;
    cursor: pointer;
    visibility: hidden;
    position: relative;
}

#page_search .gridElem:hover .checkbox-wrapper .checkbox-custom-label,
#page_search .gridElem.forced-selected-active .checkbox-wrapper .checkbox-custom-label {
    visibility: visible;
}

#page_search .checkbox-custom:checked + .checkbox-custom-label {
    background-color: #000;
    border-color: #000;
}

#page_search .checkbox-custom:checked + .checkbox-custom-label:before {
    content: "\f00c";
    font-family: 'FontAwesome';
    color: #fff;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
/* Checkbox styling for selected state — match photos.css pattern */
#page_search .checkbox-wrapper .checkbox-custom-label {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 3px;
    background-color: white;
    cursor: pointer;
    visibility: hidden;
    position: relative;
}

#page_search .gridElem:hover .checkbox-wrapper .checkbox-custom-label,
#page_search .gridElem.forced-selected-active .checkbox-wrapper .checkbox-custom-label {
    visibility: visible;
}

#page_search .checkbox-custom:checked + .checkbox-custom-label {
    background-color: #000;
    border-color: #000;
}

#page_search .checkbox-custom:checked + .checkbox-custom-label:before {
    content: "\f00c";
    font-family: 'FontAwesome';
    color: #fff;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Show checkmark for ALL checked items in search (not just hovered) */
#page_search .checkbox-custom:checked + .checkbox-custom-label {
    visibility: visible !important;
}
/* Override default.css hover behavior for search page */
/* Force show checkmark only on :checked state, ignore hover lag */
#page_search .checkbox-custom:checked + .checkbox-custom-label:before {
    visibility: visible !important;
}

#page_search .checkbox-custom + .checkbox-custom-label:hover:before {
    visibility: hidden !important;
}

/* List view row hover effect - match photos.css styling */
.search-grid-view.list-view .listContainer.list-row-item {
    background-color: transparent !important;
    cursor: pointer;
    border: 1px solid transparent !important;
}

.search-grid-view.list-view .listContainer.list-row-item:hover {
    background-color: #E8F6FE !important;
    border: 1px solid #E8F6FE !important;
}

.search-grid-view.list-view .listContainer.list-row-item.selectedItem {
    background-color: #E8F6FE !important;
}

.search-grid-view.list-view .listContainer.list-row-item.selectedItem:hover {
    background-color: #E8F6FE !important;
}

/* Responsive list view for mobile/tablet */
@media (max-width: 1024px) {
    #page_search .search-grid-view.list-view .list-header-row {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    #page_search .search-grid-view.list-view .list-header-row {
        display: none !important;
    }

    #page_search .search-grid-view.list-view .listContainer.list-row-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 10px !important;
        border: 1px solid #D2D3D4 !important;
        margin-bottom: 10px !important;
        border-radius: 4px;
        width: 100% !important;
    }

    #page_search .search-grid-view.list-view .listContainer.list-row-item > div {
        width: 100% !important;
        margin-bottom: 8px !important;
        flex: auto !important;
    }

    #page_search .search-grid-view.list-view .listItemContent.itemClick.preview {
        width: 60px !important;
        height: 60px !important;
        margin-right: 8px !important;
        margin-bottom: 0 !important;
        float: left;
    }
}

/* Select-all checkbox in list view header - always show checkmark when checked */
#page_search .select-all-checkbox + .checkbox-custom-label {
    visibility: visible !important;
    border: 2px solid #ccc;
    border-radius: 3px;
    background-color: white;
    width: 18px;
    height: 18px;
    display: inline-block;
    cursor: pointer;
    position: relative;
}

#page_search .select-all-checkbox:checked + .checkbox-custom-label {
    background-color: #000;
    border-color: #000;
}

#page_search .select-all-checkbox:checked + .checkbox-custom-label:before {
    content: "\f00c";
    font-family: 'FontAwesome';
    color: #fff;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    visibility: visible !important;
}
