/* @docs buttons.css - download menu triggers + items (.ch-dl-* implied via .article-actions, .istp-dl-*, .istp-plan-dl-*, .parties-dl-*), screener filter bar + PitchBook chips (.filter-bar, .filter-chip*, .filter-results-meta/reset), news-sort buttons (.news-sort, .news-sort-btn), dataset search/select/download (.dataset-controls/search/select/download/meta/empty/cat-tag), Bloomberg-style pro filter dropdowns (.filter-bar-pro, .filter-control, .filter-dropdown-*, .filter-clear-x, .filter-reset-all). */

        .parties-dl-trigger:hover { background: var(--bg-warm-dark) !important; border-color: var(--bg-warm-dark) !important; color: #fff !important; }
        .parties-dl-trigger[aria-expanded="true"] .parties-dl-chev { transform: rotate(180deg); }
        .parties-dl-trigger:disabled { opacity: 0.55; cursor: wait; }
        .parties-dl-item:hover { background: var(--bg-sidebar) !important; }
        .parties-dl-item:disabled { opacity: 0.55; cursor: wait; }
        .parties-dl-item + .parties-dl-item { margin-top: 1px; }

        /* ========= FILTER BAR (PitchBook-style screener) ========= */
        .filter-bar {
            margin: 1.25rem 0 1rem;
            padding: 1rem 1.1rem;
            border: 1px solid var(--border-soft);
            border-radius: 10px;
            background: var(--bg-sidebar);
        }
        .filter-row {
            display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
            margin-bottom: 0.55rem;
        }
        .filter-row:last-child { margin-bottom: 0; }
        .filter-row-label {
            font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
            color: var(--text-dark-tertiary);
            min-width: 64px; flex-shrink: 0;
            font-weight: 500;
        }
        .filter-chip {
            font-family: inherit; font-size: 13px;
            background: #fff; border: 1px solid var(--border-mid);
            color: var(--text-dark);
            padding: 4px 11px; border-radius: 999px;
            cursor: pointer;
            display: inline-flex; align-items: center; gap: 5px;
            transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
            letter-spacing: -0.005em;
            line-height: 1.4;
        }
        .filter-chip:hover { background: #fff; border-color: rgba(26,26,26,0.3); }
        .filter-chip.active {
            background: var(--text-dark); color: #fff;
            border-color: var(--text-dark);
        }
        .filter-chip-count {
            font-size: 11px;
            background: rgba(0,0,0,0.05);
            color: var(--text-dark-secondary);
            padding: 1px 6px; border-radius: 999px;
            font-weight: 500;
            line-height: 1.4;
        }
        .filter-chip.active .filter-chip-count {
            background: rgba(255,255,255,0.16);
            color: rgba(255,255,255,0.85);
        }

        .filter-results-meta {
            display: flex; justify-content: space-between; align-items: center;
            font-size: 12px; color: var(--text-dark-tertiary);
            letter-spacing: 0.04em; text-transform: uppercase;
            margin: 1.25rem 0 0.75rem;
            font-weight: 500;
        }
        .filter-results-reset {
            text-transform: none; letter-spacing: 0; font-size: 12.5px;
            color: var(--text-dark-secondary); cursor: pointer;
            padding: 4px 0; border: none; background: none; font-family: inherit;
        }
        .filter-results-reset:hover { color: var(--text-dark); text-decoration: underline; }

        .player-grid {
            display: grid; gap: 0.7rem;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            margin-bottom: 2rem;
        }

        /* ========= NEWS LIST ========= */
        .news-sort {
            display: flex; gap: 0.5rem; align-items: center;
            margin: 1rem 0 1rem;
            font-size: 12px; color: var(--text-dark-tertiary);
            letter-spacing: 0.06em; text-transform: uppercase;
        }
        .news-sort-label { font-weight: 500; }
        .news-sort-btn {
            background: none; border: 1px solid var(--border-mid);
            padding: 3px 10px; border-radius: 999px;
            color: var(--text-dark-secondary); font-size: 12px;
            font-family: inherit; cursor: pointer;
            letter-spacing: -0.005em; text-transform: none;
        }
        .news-sort-btn:hover { color: var(--text-dark); }
        .news-sort-btn.active { background: var(--text-dark); color: #fff; border-color: var(--text-dark); }
        /* ========= DATASET / SEARCHABLE INDEX ========= */
        .dataset-controls {
            display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
            margin: 1.5rem 0 1rem;
            padding: 0;
            background: transparent;
            border: none;
        }
        .dataset-search {
            flex: 1; min-width: 180px;
            height: 34px;
            border: 1px solid var(--border-mid);
            border-radius: 7px;
            padding: 0 11px;
            font-family: inherit; font-size: 13px;
            background: #fff;
            letter-spacing: -0.005em;
        }
        .dataset-search:focus { outline: none; border-color: var(--text-dark); box-shadow: 0 0 0 3px rgba(26,26,26,0.06); }
        .dataset-category-select {
            height: 34px;
            border: 1px solid var(--border-mid);
            border-radius: 7px;
            padding: 0 28px 0 11px;
            font-family: inherit; font-size: 13px;
            background: #fff;
            cursor: pointer;
            letter-spacing: -0.005em;
            -webkit-appearance: none; appearance: none;
            background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
            background-repeat: no-repeat; background-position: right 10px center;
        }
        .dataset-download {
            display: inline-flex; align-items: center; gap: 6px;
            height: 34px; padding: 0 14px;
            background: #1a1a1a;
            color: #fff;
            border: none; border-radius: 7px;
            font-family: inherit; font-size: 13px; font-weight: 500;
            cursor: pointer;
            letter-spacing: -0.005em;
            transition: background 0.15s ease;
        }
        .dataset-download:hover { background: #000; }
        .dataset-meta {
            font-size: 12.5px; color: var(--text-dark-tertiary);
            letter-spacing: -0.005em;
            margin-left: auto;
        }
        .dataset-meta strong { color: var(--text-dark); font-weight: 500; }
        .dataset-cat-tag {
            display: inline-block;
            font-size: 10.5px; font-weight: 500;
            background: var(--bg-light);
            color: var(--text-dark-secondary);
            padding: 2px 7px;
            border-radius: 4px;
            border: 1px solid var(--border-soft);
            letter-spacing: 0.02em;
            white-space: nowrap;
        }
        .dataset-table { font-size: 13px; }
        .dataset-table td:nth-child(3) { font-weight: 500; }
        .dataset-empty {
            padding: 1.5rem; text-align: center;
            font-size: 13px; color: var(--text-dark-tertiary);
        }

        /* ========= PRO FILTER BAR (Bloomberg-style dropdowns) ========= */
        .filter-bar-pro {
            display: flex; flex-wrap: wrap; align-items: center;
            gap: 6px;
            margin: 1.25rem 0 1rem;
        }
        .filter-control { position: relative; }
        .filter-dropdown-btn {
            display: inline-flex; align-items: center; gap: 5px;
            background: #fff;
            border: 1px solid var(--border-mid);
            border-radius: 7px;
            padding: 5px 8px 5px 11px;
            font-size: 13px;
            font-family: inherit;
            cursor: pointer;
            color: var(--text-dark);
            transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
            line-height: 1.4;
            letter-spacing: -0.01em;
            white-space: nowrap;
        }
        .filter-dropdown-btn:hover { border-color: rgba(26,26,26,0.32); }
        .filter-control.open .filter-dropdown-btn { border-color: var(--text-dark); box-shadow: 0 0 0 3px rgba(26,26,26,0.06); }
        .filter-dropdown-btn.has-value {
            background: #1a1a1a;
            color: #fff;
            border-color: #1a1a1a;
        }
        .filter-dropdown-btn.has-value:hover { background: #000; border-color: #000; }
        .filter-dropdown-btn .filter-key { color: var(--text-dark-tertiary); font-weight: 500; }
        .filter-dropdown-btn.has-value .filter-key { color: rgba(255,255,255,0.55); font-weight: 400; }
        .filter-dropdown-btn .filter-sep { color: var(--text-dark-tertiary); margin: 0 -1px; }
        .filter-dropdown-btn.has-value .filter-sep { color: rgba(255,255,255,0.55); }
        .filter-dropdown-btn .filter-val { font-weight: 500; }
        .filter-dropdown-btn .filter-arrow {
            width: 9px; height: 9px;
            flex-shrink: 0;
            opacity: 0.55;
            margin-left: 2px;
            transition: transform 0.15s ease;
        }
        .filter-control.open .filter-dropdown-btn .filter-arrow { transform: rotate(180deg); }
        .filter-dropdown-btn.has-value .filter-arrow { opacity: 0.8; }
        .filter-dropdown-btn:not(.has-value) .filter-sep,
        .filter-dropdown-btn:not(.has-value) .filter-val,
        .filter-dropdown-btn:not(.has-value) .filter-clear-x { display: none; }
        .filter-clear-x {
            display: inline-flex; align-items: center; justify-content: center;
            width: 16px; height: 16px;
            border-radius: 50%;
            margin-left: 3px;
            color: rgba(255,255,255,0.7);
            font-size: 13px; line-height: 1;
            cursor: pointer;
            transition: background 0.12s ease, color 0.12s ease;
        }
        .filter-clear-x:hover { background: rgba(255,255,255,0.2); color: #fff; }

        .filter-dropdown-menu {
            position: absolute; top: calc(100% + 5px); left: 0;
            background: #fff;
            border-radius: 8px;
            box-shadow: 0 14px 36px rgba(0,0,0,0.14), 0 0 0 1px rgba(0,0,0,0.07);
            min-width: 220px;
            padding: 5px;
            opacity: 0; transform: translateY(-4px) scale(0.98);
            pointer-events: none;
            z-index: 80;
            transition: opacity 0.16s ease, transform 0.16s ease;
            max-height: 320px;
            overflow-y: auto;
        }
        .filter-control.open .filter-dropdown-menu {
            opacity: 1; transform: translateY(0) scale(1); pointer-events: all;
        }
        .filter-dropdown-item {
            display: flex; align-items: center; justify-content: space-between;
            padding: 7px 10px;
            border-radius: 5px;
            font-size: 13px;
            color: var(--text-dark);
            cursor: pointer;
            letter-spacing: -0.005em;
            user-select: none;
        }
        .filter-dropdown-item:hover { background: var(--bg-light); }
        .filter-dropdown-item.active { font-weight: 500; }
        .filter-dropdown-item.active::after {
            content: '✓';
            color: var(--text-dark);
            font-size: 12px;
            margin-left: 8px;
        }

        .filter-reset-all {
            background: none; border: none;
            color: var(--text-dark-secondary);
            cursor: pointer;
            font-family: inherit; font-size: 12.5px;
            padding: 4px 8px;
            letter-spacing: -0.005em;
            margin-left: 4px;
        }
        .filter-reset-all:hover { color: var(--text-dark); text-decoration: underline; }

        .footer-note {
            margin-top: 4rem;
            padding-top: 1.25rem;
            border-top: 1px solid var(--border-soft);
            font-size: 12px;
            color: var(--text-dark-tertiary);
            letter-spacing: 0.02em;
        }

/* ===== ISTP cycle diagram - Download menu (was inline near the diagram) ===== */
.istp-dl-trigger:hover { background: var(--bg-warm-dark) !important; border-color: var(--bg-warm-dark) !important; color: #fff !important; }
.istp-dl-trigger[aria-expanded="true"] .istp-dl-chev { transform: rotate(180deg); }
.istp-dl-trigger:disabled { opacity: 0.55; cursor: wait; }
.istp-dl-item:hover { background: var(--bg-sidebar) !important; }
.istp-dl-item:disabled { opacity: 0.55; cursor: wait; }
.istp-dl-item + .istp-dl-item { margin-top: 1px; }

/* ===== ISTP site plan - Download menu (was inline near the diagram) ===== */
.istp-plan-dl-trigger:hover { background: var(--bg-warm-dark) !important; border-color: var(--bg-warm-dark) !important; color: #fff !important; }
.istp-plan-dl-trigger[aria-expanded="true"] .istp-plan-dl-chev { transform: rotate(180deg); }
.istp-plan-dl-trigger:disabled { opacity: 0.55; cursor: wait; }
.istp-plan-dl-item:hover { background: var(--bg-sidebar) !important; }
.istp-plan-dl-item + .istp-plan-dl-item { margin-top: 1px; }

