/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */

/* Fighting against CKEditor resets */
.ck-filteredlist {
	min-width: 250px;
	max-width: 250px;

	color: var(--fgColor-muted);
	font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;

	& * {
		color: inherit;
		font-family: inherit;
	}

	& .select-menu-header {
		background: var(--overlay-bgColor);
		padding: 8px 10px;
		border-bottom: 1px solid var(--borderColor-muted);
		line-height: 16px;

		& .select-menu-title {
			font-weight: 600;
			color: var(--fgColor-default);
			line-height: inherit;
		}
	}

	& .select-menu-filters {
		background-color: var(--overlay-bgColor);

		& input {
			padding: 5px 12px;
			font-size: 14px;
			line-height: 20px;
			color: var(--fgColor-default);
			background-color: var(--bgColor-default);
			border: 1px solid var(--borderColor-default);
			border-radius: 6px;
			outline: none;
			box-shadow: var(--shadow-inset);
			min-width: auto;
		}
	}

	& .select-menu-header code,
	& .select-menu-item code {
		color: var(--fgColor-default);
		font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
		font-size: 12px;
		line-height: 16px;
		margin-left: 5px;

		& * {
			color: inherit;
			font-family: inherit;
			font-size: inherit;
			line-height: inherit;
		}
	}

	& .ck.ck-button:not(.ck-disabled).select-menu-item {
		cursor: pointer;
		border: 0;
		color: var(--fgColor-default) !important;
		border-bottom: 1px solid var(--borderColor-muted);
		padding: calc(0.2 * var(--ck-line-height-base) * var(--ck-font-size-base)) calc(0.4 * var(--ck-line-height-base) * var(--ck-font-size-base));
		line-height: 18px;

		&.github-writer-create-reply {
			border-bottom: 0;
		}

		&:hover,
		&:active,
		&:focus {
			color: var(--fgColor-on-emphasis) !important;
			background-color: var(--fgColor-accent);
			box-shadow: none;

			& .description {
				color: var(--fgColor-default) !important;
			}
		}

		& * {
			cursor: inherit;
			color: inherit;
			background-color: inherit;
		}
		& .description {
			color: var(--fgColor-muted) !important;
		}
	}

	& .ck-button__label.select-menu-item-heading {
		font-size: 14px;
		font-weight: 600;
		vertical-align: baseline;

		& .description {
			vertical-align: inherit;
		}
	}

	& .ck-list > .ck-list__item.ck-list__item.ck-list__item {
		padding: 0;
	}

	& .select-menu-footer {
		color: var(--fgColor-default);
		border-bottom: 0;
	}

	& .form-control {
		&:focus {
			border-color: var(--fgColor-accent);
			outline: none;
			box-shadow: var(--button-primary-shadow-selected);
		}
	}

	&.github-writer-savedreplies {
		width: 300px;
		max-width: 300px;

		& .description {
			display: block;
		}
	}
}
