/* Solid / Gradient only (direct tabs) — Theme / Default stay nested & untouched */
.bm-fill-color-palette > .components-tab-panel__tabs {
	display: flex;
	gap: 4px;
	margin: 0 0 0.75rem;
	padding: 0;
	border: 0;
	border-bottom: 1px solid
		color-mix(in srgb, var(--bm-f-outline, var(--bm-color-outline, #c3c4c7)) 55%, transparent);
	background: transparent;
	box-sizing: border-box;
}

.bm-fill-color-palette > .components-tab-panel__tabs > .components-tab-panel__tabs-item {
	flex: 1;
	justify-content: center;
	min-height: 2.25rem;
	padding: 0.4rem 0.55rem;
	border: 0 !important;
	border-radius: 6px 6px 0 0;
	box-shadow: none !important;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--bm-f-on-surface-variant, var(--bm-color-on-surface-variant, #464555));
	background: transparent !important;
	transition: background 0.12s ease, color 0.12s ease;
}

.bm-fill-color-palette
	> .components-tab-panel__tabs
	> .components-tab-panel__tabs-item:hover:not(.is-active):not([aria-selected='true']) {
	color: var(--bm-f-on-surface, var(--bm-color-on-surface, #131b2e));
	background: color-mix(
		in srgb,
		var(--bm-f-primary, var(--bm-color-primary, #3525cd)) 8%,
		transparent
	) !important;
}

/* Active Solid tab — solid primary fill */
.bm-fill-color-palette
	> .components-tab-panel__tabs
	> .components-tab-panel__tabs-item.is-active,
.bm-fill-color-palette
	> .components-tab-panel__tabs
	> .components-tab-panel__tabs-item[aria-selected='true'],
.bm-fill-color-palette
	> .components-tab-panel__tabs
	> [id$='-solid'].is-active,
.bm-fill-color-palette
	> .components-tab-panel__tabs
	> [id$='-solid'][aria-selected='true'] {
	color: #fff !important;
	background-color: var(--bm-f-primary, var(--bm-color-primary, #3525cd)) !important;
	background-image: none !important;
	box-shadow: none !important;
}

/* Active Gradient tab — gradient fill (must set background-image; app button reset used to strip it) */
.bm-fill-color-palette
	> .components-tab-panel__tabs
	> [id$='-gradient'].is-active,
.bm-fill-color-palette
	> .components-tab-panel__tabs
	> [id$='-gradient'][aria-selected='true'],
.bm-fill-color-palette
	> .components-tab-panel__tabs
	> .components-tab-panel__tabs-item.is-active:nth-child(2),
.bm-fill-color-palette
	> .components-tab-panel__tabs
	> .components-tab-panel__tabs-item[aria-selected='true']:nth-child(2) {
	color: #fff !important;
	background-color: transparent !important;
	background-image: linear-gradient(
		135deg,
		var(--bm-f-primary, var(--bm-color-primary, #3525cd)) 0%,
		var(--bm-f-on-surface, var(--bm-color-on-surface, #131b2e)) 100%
	) !important;
	box-shadow: none !important;
}

.bm-fill-color-palette__gradient {
	padding-top: 0.15rem;
}

.bm-fill-color-palette__gradient .components-custom-gradient-picker__ui-line,
.bm-fill-color-palette__gradient .components-custom-gradient-picker {
	margin-top: 0.35rem;
}

.bm-fill-color-palette__gradient .components-circular-option-picker {
	margin-top: 0.25rem;
	width: 100%;
}

/*
 * Gradient stop handles — app-wide button resets collapse these (height:auto /
 * box-shadow:none). Keep them as visible, clickable circles on the preview bar.
 */
.bm-fill-color-palette__gradient
	.components-custom-gradient-picker__control-point-dropdown {
	height: 16px !important;
	width: 16px !important;
	min-height: 16px !important;
	min-width: 16px !important;
}

.bm-fill-color-palette__gradient
	.components-custom-gradient-picker__control-point-button,
.bm-fill-color-palette__gradient
	.components-custom-gradient-picker__insert-point-dropdown {
	appearance: none !important;
	box-sizing: border-box !important;
	display: block !important;
	height: 16px !important;
	width: 16px !important;
	min-height: 16px !important;
	min-width: 16px !important;
	max-height: 16px !important;
	max-width: 16px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background-image: none !important;
	cursor: pointer !important;
	line-height: 0 !important;
}

.bm-fill-color-palette__gradient
	.components-custom-gradient-picker__control-point-button {
	/* Color fill is set inline from the stop; ring keeps the handle readable. */
	box-shadow:
		inset 0 0 0 2px #fff,
		0 0 0 1px rgba(0, 0, 0, 0.35) !important;
}

.bm-fill-color-palette__gradient
	.components-custom-gradient-picker__control-point-button:focus,
.bm-fill-color-palette__gradient
	.components-custom-gradient-picker__control-point-button.is-active {
	box-shadow:
		inset 0 0 0 3px #fff,
		0 0 0 1px rgba(0, 0, 0, 0.45) !important;
}

.bm-fill-color-palette__gradient
	.components-custom-gradient-picker__insert-point-dropdown {
	background: #fff !important;
	padding: 2px !important;
	color: #1e1e1e !important;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) !important;
}

.bm-fill-color-palette__gradient
	.components-custom-gradient-picker__insert-point-dropdown
	svg {
	display: block !important;
	height: 100% !important;
	width: 100% !important;
}

/* Gradient preview on the color dropdown toggle */
.bm-color-dropdown__indicator--gradient {
	display: inline-block;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 1px solid
		color-mix(in srgb, var(--bm-f-outline, var(--bm-color-outline, #c3c4c7)) 70%, transparent);
	box-sizing: border-box;
	flex-shrink: 0;
}
