/* Shared filter-bar and sortable-table styles (used via macros/filter_macros.html) */

.filter-input, .filter-select {
    background-color: #334155; /* slate-700 */
    border: 1px solid #475569; /* slate-600 */
    color: white;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    height: 2.5rem;
    width: 100%;
    transition: all 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.filter-input:focus, .filter-select:focus {
    outline: none;
    border-color: transparent;
    box-shadow: 0 0 0 2px #facc15; /* ring-2 ring-yellow-400 */
}

.filter-input::placeholder {
    color: #94a3b8; /* slate-400 */
}

.filter-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Dark-theme native pickers */
.filter-input[type="date"] { color-scheme: dark; }
.filter-input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }

/* Hide number-input spinners */
.filter-input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}
.filter-input[type="number"]::-webkit-inner-spin-button,
.filter-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Pill checkboxes (multiselect) */
.filter-pill input { display: none; }
.filter-pill span {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid #475569; /* slate-600 */
    color: #94a3b8; /* slate-400 */
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.filter-pill input:checked + span {
    border-color: #facc15; /* yellow-400 */
    color: #facc15;
    background-color: rgba(250, 204, 21, 0.1);
}

/* Sortable column headers */
th.sort-th { padding: 0; }
th.sort-th a {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 1rem;
    color: #94a3b8; /* slate-400 */
    transition: color 0.15s ease;
    text-decoration: none;
}
th.sort-th a:hover { color: #e2e8f0; /* slate-200 */ }
th.sort-th a .sort-icon { font-size: 0.625rem; opacity: 0.45; }
th.sort-th a.sort-active { color: #facc15; /* yellow-400 */ }
th.sort-th a.sort-active .sort-icon { opacity: 1; }
th.sort-th a.sort-center { justify-content: center; }
th.sort-th a.sort-right { justify-content: flex-end; }
