$category-block-height : $font-default-size + 2px;

.k-category-block {
	padding: 0 $padding-medium;
	line-height: $category-block-height;
	background-color: $grey;
	margin-right: $padding-small;
	margin-bottom: $padding-small;
	display: inline-block;
	white-space: nowrap;
	min-width: 2em;
	max-width: 10em;
	text-align: center;
	overflow: hidden;
	text-overflow: ellipsis;
	font-weight: normal;
	cursor: default;
}
.k-category-block.zarafa-dark {
	color: #ffffff;
}
body .k-category-block {
	font-size: $font-default-size - 2px !important;
}
.x-grid3-cell-inner > .k-category-block {
	margin-bottom: 0;
}
.zarafa-appointment-tooltip .k-category-block {
	max-width: 236px - 2 * $padding-medium - $padding-small;
}

/* In the mail grid */
.grid_compact_left {
	padding-left: 29px;
}
.k-category-container {
	float: right;
	max-width: 50%;
	max-height: 2 * ($category-block-height + $padding-small);
	text-align: right;
	padding-top: $padding-small;
	margin-bottom: -3px;
}

/* The add category button in the mail grid */
.k-category-add-container {
	float: right;
	padding-top: $padding-small;
}
.k-category-add {
	display: block;
	visibility: hidden;
	width: 21px;
	height: $category-block-height;
	@extend .icon_category_add;
	background-position: sprite-position($iconsmap, icon_category_add, $offset-y: 1px, $offset-x: 2px);
	cursor: pointer;
}
.x-grid3-row-over .k-category-add {
	visibility: visible;
}

.k-category-add:hover {
	@extend .icon_category_add_hover;
	background-position: sprite-position($iconsmap, icon_category_add_hover, $offset-y: 1px, $offset-x: 2px);
}

/* In the (pre) view panel */
.k-preview-header-categories {
	margin-top: $padding-medium;
	max-height: 3 * ( $category-block-height + $padding-small ); /* show max. 3 lines */
	overflow: auto;
}

/* In the context menu */
.k-category-in-menu {
	max-width: 10em;
	overflow: hidden;
	text-overflow: ellipsis;
	display: inline-block;
	vertical-align: bottom;
}

/* The "Create new category dialog" */
.k-newcategorypanel {
	.k-colorpicker {
		padding-right: $padding-medium;
	}

	.k-pin-check {
		margin-top: $padding-extra-large;

		input {
			margin-left: $padding-small;
		}

		label{
			margin-left: $padding-extra-large;
		}
	}
}

/* The "Rename category dialog" */
.k-renamecategorypanel {
	.k-colorpicker {
		padding-right: $padding-medium;
	}
}
