@import "../sass/variables.scss";

$bgColor: #ffffff;

.kit-segment-button-expand {
	position: relative;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 24px;
	height: 24px;
	margin-left: 2px;
	padding: 4px;
	background-color: $bgColor;
	border: 0;
	border-radius: 4px;
	outline: none;
	box-sizing: border-box;

	color: $copyColor;

	vertical-align: bottom;
	transition: background-color 0.15s ease-in-out;
	cursor: pointer;

	&:hover {
		background-color: darken($copyColorBg, 10%);
	}

	&_open {
		border-radius: 6px 6px 0 0;

		&:hover {
			border-color: transparent;
		}

		&::after,
		&::before {
			content: "";
			position: absolute;
			top: 100%;
			left: 0;
			z-index: 1;
			width: 22px;
			height: 10px;
		}

		&::after {
			left: 1px;
			background-color: #ffffff;
		}

		&::before {
			top: 0;
			left: 0;
			z-index: 1;
			display: block;
			height: 24px;
			background-color: transparent;
			border-width: 1px 1px 0 1px;
			border-style: solid;
			border-color: $borderPopoverColor;
			border-radius: 6px 6px 0 0;
		}
	}

	&_hide {
		display: none;
	}
}

.kit-segment-button-expand__icon {
	z-index: 1;

	.kit-segment-button-expand_open & {
		transform: rotate(180deg);
	}
}

.kit-segment-button-expand__button-filter {
	position: absolute;
	top: 12px;
	right: 15px;
	z-index: 10;
}

.kit-segment-button-expand__button-filter-icon {
	margin-right: 6px;
}

.segment-group__button {
	display: inline-flex;
	max-height: 24px;
	vertical-align: bottom;
}
