/* Shared Data Sources channel-chip styling.
 *
 * Used by:
 *   - search.php                      (new search form)
 *   - search_results.php              (edit-search modal)
 *   - history.php                     (edit-search modal)
 *   - data_feeds.php  > feed_modal    (feed channel toggles)
 *
 * Two-tier visual model:
 *   .category-chip               always-on chips, solid border
 *   .category-chip-auto          trigger-tier chips, dashed border
 *                                + amber when explicitly checked
 *   .category-tier-badge         "auto" pill on trigger chips
 */

.category-grid {
    display: flex; flex-wrap: wrap; gap: 0.55rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 8px;
}
.category-chip {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.4);
    border-radius: 6px; cursor: pointer;
    font-size: 0.82rem; color: #cbd5e1;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
    user-select: none;
}
.category-chip:hover { border-color: rgba(59, 130, 246, 0.55); }
.category-chip input[type="checkbox"] { width: 15px; height: 15px; accent-color: #3b82f6; margin: 0; }
.category-chip:has(input:checked) {
    border-color: rgba(59, 130, 246, 0.55);
    background: rgba(59, 130, 246, 0.08);
    color: #dbeafe;
}

.data-sources-section { margin-bottom: 0.85rem; }
.data-sources-section:last-child { margin-bottom: 0; }
.data-sources-section-title {
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0.5rem 0 0.25rem;
}
.data-sources-section-help {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 400;
    margin-bottom: 0.35rem;
    line-height: 1.45;
    max-width: 64ch;
}
.category-chip-auto {
    border-style: dashed;
    border-color: rgba(100, 116, 139, 0.55);
}
.category-chip-auto:has(input:checked) {
    border-style: solid;
    border-color: rgba(245, 158, 11, 0.7);
    background: rgba(245, 158, 11, 0.08);
    color: #fde68a;
}
.category-tier-badge {
    display: inline-block;
    padding: 0.05rem 0.4rem;
    background: rgba(100, 116, 139, 0.25);
    color: #cbd5e1;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 0.15rem;
}
.category-chip-auto:has(input:checked) .category-tier-badge {
    background: rgba(245, 158, 11, 0.25);
    color: #fde68a;
}
