@import './FigmaIcons';
@import './PrismCodeEditor';

* {
	-webkit-font-smoothing: antialiased;
}

body {
	font: normal normal 400 11px/15px Inter, Roboto, sans-serif;
	color: #333;
	outline: none;
}

.modal-content,
.tab-content {
	user-select: none;
	cursor: default;
	position: relative;
	box-sizing: border-box;
	padding: 16px 8px;
	width: 100%;
	max-height: calc(100% - 36px);
	overflow: auto;
	&.no-padding {
		padding: 0px;
	}

	&.no-overflow {
		overflow: hidden;
	}

	h1 {
		font-size: 14px;
		font-weight: 440;
		line-height: 24px;
	}

	h2 {
		text-transform: capitalize;
		font-weight: 600;
		font-size: 11px;
		color: #333;
		margin-bottom: 16px;
	}

	h3 {
		color: #aaa;
		font-weight: inherit;
		font-size: inherit;
		margin-bottom: 8px;
		padding-left: 8px;
	}

	button {
		background-color: transparent;
		display: block;
		text-align: center;
		height: 32px;
		line-height: 30px;
		max-width: 180px;
		min-width: 74px;
		padding: 0 12px;
		color: #333;
		font-weight: 400;
		background-color: transparent;
		box-sizing: border-box;
		border: 1px solid #333;
		border-radius: 3px;
		outline: none;
		&:active {
			background-color: rgba(0, 0, 0, 0.1);
		}
		&:focus {
			border: 2px solid #18a0fb;
			line-height: 26px;
			padding: 0 11px;
		}
		&:disabled {
			color: #fff;
			background-color: rgba(0, 0, 0, 0.3);
			border: 1px solid transparent;
		}
		&.primary {
			color: #fff;
			background-color: #18a0fb;
			border-color: #18a0fb;
			&:active {
				background-color: #18a0fb;
				border-color: rgba(0, 0, 0, 0.3);
			}
			&:focus {
				border-color: #aaa;
				background-clip: border-box;
			}
			&:disabled {
				color: #fff;
				background-color: rgba(0, 0, 0, 0.3);
				border: none;
			}
		}
	}

	input,
	textarea {
		font-family: Inter, Roboto, sans-serif;
		background-color: transparent;
		border: 1px solid transparent;
		color: #333;
		margin: 1px 0;
		padding: 0 0 0 7px;
		height: 28px;
		box-sizing: border-box;
		background-clip: padding-box;
		border-radius: 2px;
		cursor: default;
		&:hover {
			border: 1px solid rgba(0, 0, 0, 0.1);
		}
		&:not(:disabled):not(:hover):placeholder-shown {
			color: #aaa;
			background: linear-gradient(90deg, transparent 6px, rgba(0, 0, 0, 0.1) 0);
			background-size: calc(100% - 6px) 1px;
			background-position: left bottom -1px;
			background-repeat: repeat-x;
		}
		&:focus {
			border: 1px solid #18a0fb;
			outline: 1px solid #18a0fb;
			outline-offset: -2px;
		}
		&.no-border {
			border: none;
			&:focus {
				border: none;
				box-shadow: none;
				outline: none;
				margin-left: 10px;
			}
		}
	}

	input:focus {
		height: 30px;
		margin: 0;
	}

	input[type='checkbox'] {
		width: 12px;
		height: 12px;
		margin: 1px 18px 1px 1px;
		-webkit-appearance: none;
		appearance: none;
		border: none;
		padding-left: 8px;
		&:after {
			content: '';
			display: -webkit-inline-box;
			display: -webkit-inline-flex;
			display: -ms-inline-flexbox;
			display: inline-flex;
			width: 12px;
			height: 12px;
			border: 1px solid #333;
			border-radius: 2px;
			box-sizing: border-box;
			background-color: #fff;
		}
		&:checked:after {
			border: 1px solid #18a0fb;
			background-color: #18a0fb;
			background-image: url(https://www.figma.com/images/checkbox_check.svg);
			background-position: 50%;
			background-repeat: no-repeat;
		}
		&:focus {
			border-color: transparent;
			box-shadow: none;
			outline: none;
		}
	}

	.checkboxGroup {
		display: flex;
		align-items: center;
		height: 32px;
	}

	a {
		cursor: pointer;
		color: #18a0fb;
		display: flex;
		align-items: center;
		.figma-icon,
		span {
			color: #18a0fb;
			display: inline-block;
		}
		span {
			margin-left: 8px;
			padding-bottom: 2px;
		}
	}
}

.top-bar-button {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	&.has-badge svg {
		padding-top: 3px;
	}
	&.has-badge::after {
		content: '';
		width: 13px;
		height: 13px;
		border-radius: 10px;
		background: #f24822;
		position: absolute;
		top: 10px;
		right: 3px;
	}
	&.active,
	&.active:hover {
		background: #18a0fb;
	}
	&:hover {
		background-color: #050505;
	}
}

.plugin-dropdown-option {
	font-size: 12px;
	color: #fff;
	padding: 0 6px;
	align-items: center;
	flex: 0 0 24px;
	line-height: 24px;
	text-align: left;
	white-space: nowrap;
	display: flex;
	&:hover {
		background: #18a0fb;
	}
	.plugin-dropdown-option-text {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		padding-left: 10px;
		padding-right: 6px;
		max-width: 200px;
		&.padded {
			padding-left: 26px;
		}
	}
	.plugin-dropdown-option-shortcut {
		margin-left: auto;
		padding-left: 24px;
		margin-right: 12px;
	}
	.plugin-dropdown-option-chevron {
		font-family: 'FigmaIcons';
		margin-left: auto;
		margin-right: 10px;
		line-height: 22px;
		&::after {
			content: '\16e';
			font-size: 16px;
		}
	}
	&.padded {
		.plugin-dropdown-option-text {
			padding-left: 26px;
		}
	}
}

.plugin-dropdown-submenu {
	position: fixed;
	min-width: 200px !important;
	z-index: 14;
	font-size: 14px;
	display: flex;
	cursor: default;
	font: normal normal 400 11px/15px Inter, Roboto, sans-serif;
	-webkit-box-orient: vertical;
	-webkit-box-direction: normal;
	flex-direction: column;
	background-color: #222;
	min-width: 120px;
	padding: 8px 0;
	z-index: 14;
	box-shadow: 0 5px 17px rgba(0, 0, 0, 0.2), 0 2px 7px rgba(0, 0, 0, 0.15), inset 0 0 0 0.5px #000,
		0 0 0 0.5px rgba(0, 0, 0, 0.1);
	border-radius: 3px;
}

.v--modal-overlay {
	height: 0 !important;
	width: 0 !important;
	background-color: rgba(0, 0, 0, 0.3) !important;
	z-index: 11 !important;
}

.overlay-fade-enter-active,
.overlay-fade-leave-active {
	transition: all 0s !important;
}

.v--modal.v--modal-box {
	-webkit-font-smoothing: antialiased;
	user-select: none;
	cursor: default;
	border-radius: 2px;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.15), 0 0 0 0.5px rgba(0, 0, 0, 0.2);
	overflow: hidden;
	background: #fff;
	.modal {
		width: 100%;
		height: 100%;
	}
}

.modal-header {
	font: normal normal 600 11px/32px Inter, Roboto, sans-serif;
	height: 40px;
	color: #333;
	display: flex;
	-webkit-box-pack: justify;
	-webkit-justify-content: space-between;
	justify-content: space-between;
	-webkit-box-align: center;
	-webkit-align-items: center;
	align-items: center;
	padding-left: 16px;
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	border-bottom: 1px solid #e5e5e5;
	.modal-close-button {
		font-family: 'FigmaIcons';
		color: #333;
		font-weight: 400;
		height: 32px;
		width: 32px;
		padding-right: 4px;
		display: flex;
		align-items: center;
		justify-content: center;
		&::after {
			content: '\103';
			font-size: 16px;
			height: 12px;
			line-height: 16px;
		}
	}
	&.header-large {
		height: 48px;
		line-height: 48px;
		padding-left: 12px;
		.modal-close-button {
			height: 48px;
			width: 48px;
		}
		.modal-tabs {
			padding: 0px;
			border-bottom: none;
		}
	}
}

.modal-tabs {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	flex-shrink: 0;
	height: 40px;
	line-height: 40px;
	padding: 0 8px;
	border-bottom: 1px solid #e5e5e5;
}

.modal-tab {
	text-transform: capitalize;
	color: #aaa;
	font-weight: 500;
	padding: 0 8px;
	&.active {
		color: #333;
		font-weight: 600;
	}
	&:hover {
		color: #333;
	}
}
