/*!
 * product-tools.css
 * ---------------------------------------------------------------------------
 * Styling for the per-list live search box and pagination injected by
 * js/product-tools.js. Kept lightweight and aligned with the site's blue
 * accent (#0a58ca) and Bootstrap grid.
 *
 * Markup produced by the script:
 *   <div class="hydroow-list-search">
 *     <input type="text" class="hydroow-list-search-input" ...>
 *   </div>
 *   ... list ...
 *   <div class="hydroow-pagination">
 *     <button class="hydroow-page-btn">...</button>
 *     <button class="hydroow-page-btn hydroow-page-active">...</button>
 *   </div>
 * Items hidden by filtering / paging receive "hydroow-hidden".
 */

/* ----------------------------------------------------------------------- */
/* Search box (sits directly above each list)                              */
/* ----------------------------------------------------------------------- */

.hydroow-list-search {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 25px;
    margin-bottom: 0;
}

.hydroow-list-search-input {
    display: block;
    width: 100%;
    max-width: 340px;
    padding: 10px 16px 10px 38px;
    font-size: 15px;
    line-height: 1.4;
    color: #242424;
    background-color: #ffffff;
    border: 1px solid #d6dbe1;
    border-radius: 8px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;

    /* small magnifier glyph on the left */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa3ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 13px center;
}

.hydroow-list-search-input::placeholder {
    color: #9aa3ad;
}

.hydroow-list-search-input:focus {
    border-color: #0a58ca;
    box-shadow: 0 0 0 3px rgba(10, 88, 202, 0.15);
}

/* Tighten the gap the grid/table already carries so the search box feels
   attached to the list it controls. */
.hydroow-list-search + .products {
    margin-top: 20px;
}

/* ----------------------------------------------------------------------- */
/* Pagination                                                              */
/* ----------------------------------------------------------------------- */

.hydroow-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 30px;
}

.hydroow-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: #0a58ca;
    background-color: #ffffff;
    border: 1px solid #d6dbe1;
    border-radius: 6px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hydroow-page-btn:hover:not(:disabled):not(.hydroow-page-active) {
    color: #0a58ca;
    background-color: #eef4ff;
    border-color: #0a58ca;
}

.hydroow-page-btn:focus-visible {
    outline: 2px solid #0a58ca;
    outline-offset: 2px;
}

.hydroow-page-btn:disabled {
    color: #9aa3ad;
    background-color: #f7f8fa;
    border-color: #e4e8ec;
    cursor: not-allowed;
}

.hydroow-page-active,
.hydroow-page-active:hover:not(:disabled) {
    color: #ffffff;
    background-color: #0a58ca;
    border-color: #0a58ca;
    cursor: default;
}

.hydroow-pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 38px;
    color: #7a828a;
    -webkit-user-select: none;
    user-select: none;
}

/* ----------------------------------------------------------------------- */
/* Hidden items (filtered out or on another page)                          */
/* ----------------------------------------------------------------------- */

.hydroow-hidden {
    display: none !important;
}

/* ----------------------------------------------------------------------- */
/* Small screens                                                           */
/* ----------------------------------------------------------------------- */

@media (max-width: 576px) {
    .hydroow-list-search {
        justify-content: stretch;
    }

    .hydroow-list-search-input {
        max-width: none;
    }

    .hydroow-page-btn {
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
        font-size: 13px;
    }

    .hydroow-pagination-ellipsis {
        height: 34px;
    }
}
