/* Chips with no matching providers on this page, or no data behind them yet */
.cip-chip.is-unavailable {
	opacity: .38;
	cursor: not-allowed;
	pointer-events: none;
}
.cip-chip[disabled] {
	cursor: not-allowed;
}

/* Selected state follows aria-pressed, which the script toggles. The GB chip
   blocks bake their colours per uniqueId (the "All" chips are always dark),
   so without this the highlight never moves when a chip is clicked. */
.cip-filterbar .cip-chip[aria-pressed="true"] {
	background-color: var(--contrast);
	border-color: var(--contrast);
	color: #fff;
}
.cip-filterbar .cip-chip[aria-pressed="true"]:hover {
	background-color: var(--contrast-2);
	border-color: var(--contrast-2);
	color: #fff;
}
.cip-filterbar .cip-chip[aria-pressed="false"] {
	background-color: #fff;
	border-color: #dde5f4;
	color: #31405f;
}
.cip-filterbar .cip-chip[aria-pressed="false"]:hover {
	background-color: var(--base-2);
	border-color: var(--contrast-3);
	color: var(--contrast);
}

/* ==========================================================================
   1a · Compact toolbar (Claude Design "Filter redesign and ranking", 1a)
   Markup: GP element 2802 → .cip-filterbar.cip-toolbar (GB blocks, no inline
   styles). All look lives here so the chip states the script toggles stay in
   one place.
   ========================================================================== */
.cip-toolbar {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 12px 0 16px;
}
.cip-tb-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}
.cip-tb-lead {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	min-width: 0;
}
.cip-tb-count {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--contrast);
}
.cip-tb-count strong { font-weight: 700; }

.cip-rank-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 0;
	background: transparent;
	color: var(--accent);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	padding: 6px 8px;
	border-radius: 8px;
	cursor: pointer;
}
.cip-rank-toggle:hover,
.cip-rank-toggle:focus-visible { background: #e8eefc; color: var(--accent); }
.cip-rank-toggle .cip-i {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1.5px solid currentColor;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

/* Sort dropdown */
.cip-sort {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	padding: 6px 8px 6px 16px;
	font-size: 15px;
	margin: 0;
}
.cip-sort__label { color: #64748b; white-space: nowrap; }
.cip-sort__select {
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	color: var(--contrast);
	cursor: pointer;
	padding: 2px 4px;
	outline-offset: 2px;
	width: auto;
}

/* How-we-rank panel */
.cip-rank-panel {
	display: none;
	background: #fff;
	border: 1px solid #dbe4f7;
	border-radius: 14px;
	padding: 20px 24px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
}
.cip-rank-panel.is-open { display: grid; }
.cip-rank-item { opacity: .7; }
.cip-rank-item.is-current { opacity: 1; }
.cip-rank-item__title {
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 700;
	color: var(--contrast);
	display: flex;
	align-items: center;
	gap: 6px;
}
.cip-rank-item__title::after {
	content: "Current";
	display: none;
	font-size: 11px;
	font-weight: 600;
	background: var(--accent);
	color: #fff;
	border-radius: 4px;
	padding: 2px 6px;
}
.cip-rank-item.is-current .cip-rank-item__title::after { display: inline-block; }
.cip-rank-item__text {
	margin: 0;
	font-size: 14px;
	line-height: 1.45;
	color: #475569;
}

/* Filters row: Service segmented control | divider | Type chips */
.cip-tb-filters {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}
.cip-toolbar .cip-seg {
	display: inline-flex;
	background: #e9edf3;
	border-radius: 999px;
	padding: 4px;
	gap: 2px;
}
.cip-toolbar .cip-seg .cip-chip {
	border: 0;
	border-radius: 999px;
	padding: 9px 18px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	background: transparent;
	color: var(--contrast);
	box-shadow: none;
}
.cip-filterbar.cip-toolbar .cip-seg .cip-chip[aria-pressed="true"],
.cip-filterbar.cip-toolbar .cip-seg .cip-chip[aria-pressed="true"]:hover {
	background: #fff;
	color: var(--contrast);
	box-shadow: 0 1px 3px rgba(15, 23, 42, .15);
}
.cip-filterbar.cip-toolbar .cip-seg .cip-chip[aria-pressed="false"] { background: transparent; color: var(--contrast); }
.cip-filterbar.cip-toolbar .cip-seg .cip-chip[aria-pressed="false"]:hover { background: rgba(255, 255, 255, .6); }

.cip-tb-divider {
	width: 1px;
	height: 28px;
	background: #dbe1ea;
	flex: none;
}
.cip-toolbar .cip-chipgroup--type {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.cip-toolbar .cip-chipgroup--type .cip-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	padding: 9px 16px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
}
.cip-chip__n { font-size: 13px; font-weight: 600; opacity: .6; }
.cip-toolbar .cip-chipgroup--type .cip-chip.is-unavailable {
	opacity: 1;
	background: transparent;
	border-style: dashed;
	border-color: #cbd5e1;
	color: #94a3b8;
}

@media (max-width: 1024px) {
	.cip-rank-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.cip-toolbar { gap: 12px; }
	.cip-tb-count { font-size: 18px; }
	.cip-rank-panel { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 16px; }
	.cip-tb-divider { display: none; }
	.cip-tb-filters { gap: 10px; }
	.cip-toolbar .cip-seg .cip-chip { padding: 8px 14px; font-size: 14px; }
	.cip-toolbar .cip-chipgroup--type .cip-chip { padding: 8px 12px; font-size: 14px; }
	/* one swipeable row of Type chips instead of three wrapped rows */
	.cip-toolbar .cip-chipgroup--type {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		margin-right: -20px;
		padding-right: 20px;
	}
	.cip-toolbar .cip-chipgroup--type::-webkit-scrollbar { display: none; }
}

/* --------------------------------------------------------------------------
   1.2.1 fixes (Deep, 2026-09-24)
   -------------------------------------------------------------------------- */

/* 1. GeneratePress paints button:hover / button:focus dark grey. After a click
      the button keeps focus, so the theme colour won. Pin every state. */
.cip-toolbar .cip-rank-toggle,
.cip-toolbar .cip-rank-toggle:focus {
	background: transparent;
	color: var(--accent);
}
.cip-toolbar .cip-rank-toggle:hover,
.cip-toolbar .cip-rank-toggle:active,
.cip-toolbar .cip-rank-toggle:focus-visible,
.cip-toolbar .cip-rank-toggle[aria-expanded="true"],
.cip-toolbar .cip-rank-toggle[aria-expanded="true"]:focus {
	background: #e8eefc;
	color: var(--accent);
}
.cip-toolbar .cip-sort,
.cip-toolbar .cip-sort:hover,
.cip-toolbar .cip-sort:focus-within {
	background: #fff;
}
.cip-toolbar .cip-sort:hover,
.cip-toolbar .cip-sort:focus-within { border-color: #c7d4ee; }
.cip-toolbar .cip-sort__select,
.cip-toolbar .cip-sort__select:hover,
.cip-toolbar .cip-sort__select:focus,
.cip-toolbar .cip-sort__select:active {
	background: transparent;
	color: var(--contrast);
	box-shadow: none;
	border: 0;
}
/* Chips: focus must not repaint them either */
.cip-filterbar.cip-toolbar .cip-chipgroup--type .cip-chip[aria-pressed="false"]:focus { background-color: #fff; color: #31405f; }
.cip-filterbar.cip-toolbar .cip-chipgroup--type .cip-chip[aria-pressed="true"]:focus { background-color: var(--contrast); color: #fff; }
.cip-filterbar.cip-toolbar .cip-seg .cip-chip[aria-pressed="false"]:focus { background: transparent; color: var(--contrast); }
.cip-filterbar.cip-toolbar .cip-seg .cip-chip[aria-pressed="true"]:focus { background: #fff; color: var(--contrast); }

/* 2. Weight 500 across the toolbar controls (count line stays bold) */
.cip-toolbar .cip-rank-toggle,
.cip-toolbar .cip-sort__select,
.cip-toolbar .cip-seg .cip-chip,
.cip-toolbar .cip-chipgroup--type .cip-chip,
.cip-toolbar .cip-chip__n,
.cip-toolbar .cip-rank-item__title::after { font-weight: 500; }

/* 3. Same width as the provider cards: cards sit in a max-1240px section with
      28px sides (18px on phones), centred on the page. */
.cip-toolbar {
	--cip-card-w: min(1184px, 100vw - 56px);
	width: var(--cip-card-w);
	max-width: none;
	margin-left: calc((100% - var(--cip-card-w)) / 2);
	margin-right: calc((100% - var(--cip-card-w)) / 2);
	box-sizing: border-box;
}
@media (max-width: 767px) {
	.cip-toolbar { --cip-card-w: calc(100vw - 36px); }

	/* 4. No sideways slider on phones: Type chips wrap onto lines */
	.cip-toolbar .cip-chipgroup--type {
		flex-wrap: wrap;
		overflow: visible;
		margin-right: 0;
		padding-right: 0;
	}
}
