@import "@wordpress/base-styles/breakpoints";
@import "@wordpress/base-styles/mixins";

.site-performance-device-tab__controls {
	flex-grow: 1;
	&.segmented-control .segmented-control__item:first-of-type .segmented-control__link {
		border-top-left-radius: 4px;
		border-bottom-left-radius: 4px;
	}
	&.segmented-control .segmented-control__item:last-of-type .segmented-control__link {
		border-top-right-radius: 4px;
		border-bottom-right-radius: 4px;
	}
	&.segmented-control .segmented-control__item.is-selected .segmented-control__link {
		background-color: var(--color-link);
		border-color: var(--color-link);
	}
	@include break-medium {
		max-width: 329px;
	}

	&.disabled {
		.segmented-control__item {
			pointer-events: none;
			.segmented-control__link {
				color: var(--studio-gray-20);
				border-color: var(--studio-gray-20);
			}

			&.is-selected .segmented-control__link {
				background-color: transparent;
				color: var(--studio-gray-20);
				border-color: var(--studio-gray-20);
			}

			&.is-selected + .segmented-control__item .segmented-control__link {
				border-left-color: var(--studio-gray-20);
			}
		}
	}
}

.site-performance-device-tab__container {
	display: flex;
	justify-content: flex-end;
	flex-direction: column;
	gap: 10px;
	flex-grow: 1;
	@include break-medium {
		flex-direction: row;
		align-items: center;
	}
}

.site-performance-device-tab__heading {
	font-weight: 400;
	font-size: 0.875rem;
	line-height: 20px;
}
