﻿/**
 * GridSearchFilter.css - Styles for the reusable grid search/filter component
 * Used with GridSearchFilter.js
 */

/* Search container - holds search box and optional filter checkbox */
.grid-search-container {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Search wrapper - contains the input and clear button */
.grid-search-wrapper {
    position: relative;
    display: inline-block;
    width: 300px;
}

.grid-search-wrapper.wide {
    width: 500px;
}

.grid-search-wrapper input {
    width: 100%;
    padding: 4px 25px 4px 28px;
    border: 1px solid #A5ACB5;
    border-radius: 3px;
    height: 28px;
    box-sizing: border-box;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="%23999999"><path d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"/></svg>');
    background-repeat: no-repeat;
    background-position: 8px center;
    background-size: 14px 14px;
}

.grid-search-wrapper input:focus {
    outline: none;
    border-color: #688CAF;
}

.grid-search-wrapper input::placeholder {
    color: #999;
}

/* Clear button (X) inside search box */
.grid-search-wrapper .grid-search-clear-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #999;
    padding: 0 4px;
    display: none;
    line-height: 1;
}

.grid-search-wrapper .grid-search-clear-btn:hover {
    color: #333;
}

/* Filter checkbox container */
.grid-search-filter-checkbox {
    display: flex;
    align-items: center;
}

.grid-search-filter-checkbox input[type="checkbox"] {
    margin-right: 5px;
}

.grid-search-filter-checkbox label {
    cursor: pointer;
    user-select: none;
}

/* Grid container - wraps the grid and no results message */
.grid-search-grid-container {
    position: relative;
}

/* No results message overlay */
.grid-search-no-results {
    display: none;
    position: absolute;
    top: 35px;
    left: 5px;
    right: 5px;
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    background-color: rgba(255, 255, 255, 0.9);
    background-color: transparent;
    z-index: 10;
}