@import "grid";
@import "color_picker";

/* table multiselect */
.table-multiselect {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	height: auto;
	padding: 10px;
	padding-bottom: 5px;
	.link-field {
		width: 100%;
	}
}

.table-multiselect.form-control input {
	width: 100%;
	display: inline-block;
	outline: none;
	border: none;
	padding: 0;
	margin-bottom: var(--margin-sm);
	font-size: var(--text-xs);
}

.table-multiselect .awesomplete {
	width: 100%;
	display: inline;
}

.awesomplete .input-with-feedback {
	background-color: var(--control-bg);
	color: var(--text-color);
}

/* multiselect list */
.multiselect-list {
	.status-text {
		position: absolute;
		top: 4px;
	}

	.dropdown-menu {
		width: 100%;
	}

	li {
		padding: var(--padding-sm);
	}

	.selectable-item {
		cursor: pointer;
		@include flex(flex, space-between, center, null);
		.icon {
			display: none;
		}
	}

	.selectable-item.selected {
		background-color: var(--yellow-highlight-color);

		.icon {
			display: block;
		}
	}

	.selectable-item:hover, .selectable-item.highlighted {
		background-color: var(--fg-hover-color);
	}

	.selectable-items {
		max-height: 200px;
		overflow: auto;

		.multiselect-check {
			margin-left: var(--margin-sm);
		}
	}
}

.frappe-control {
	font-size: var(--text-md);
	.control-label.reqd:after {
		content: ' *';
		color: var(--red-400);
	}
	.ql-editor:not(.read-mode) {
		background-color: var(--control-bg);
	}
	.address-box {
		background-color: var(--control-bg);
		padding: var(--padding-sm);
		margin-bottom: var(--margin-sm);
		border: 1px solid var(--border-color);
		border-radius: var(--border-radius);
		font-size: var(--text-sm);
		word-wrap: break-word;
		p:last-child {
			margin-bottom: 0;
		}
	}
}

.frappe-control:not([data-fieldtype='MultiSelectPills']):not([data-fieldtype='Table MultiSelect']) {
	&.has-error {
		input {
			border: 1px solid var(--error-border);

			&:focus {
				box-shadow: 0 0 0 $input-btn-focus-width var(--error-bg);
			}
		}
	}
}

.frappe-control[data-fieldtype='MultiSelectPills'],
.frappe-control[data-fieldtype='Table MultiSelect'] {
	&.has-error {
		.control-input {
			border: 1px solid var(--error-border);
			border-radius: var(--border-radius);
		}
	}
}

.ace_editor {
	background-color: var(--control-bg);
	color: var(--text-color);
	.ace_gutter {
		z-index: auto;
		background: var(--control-bg);
		color: var(--text-light);
		.ace_gutter-active-line {
			background-color: var(--control-bg-on-gray);
		}
	}
	.ace_marker-layer .ace_active-line {
		background-color: var(--control-bg-on-gray);
	}
	.ace_print-margin {
		background-color: var(--dark-border-color);
	}
}

.frappe-control[data-fieldtype="Attach"],
.frappe-control[data-fieldtype="Attach Image"] {
	.attached-file {
		position: relative;
		padding: 6px 10px;
		background: var(--control-bg);
		border-radius: var(--border-radius);
		font-size: var(--text-md);
	}
}

/* progress bar */
.progress, .progress-bar {
	box-shadow: none;
}

a.progress-small {
	.progress-chart {
		width: 40px;
		margin-top: 4px;
		float: right;
	}

	.progress {
		margin-bottom: 0;
	}

	.progress-bar {
		transition: unset;
		background-color: var(--green-500);
	}
}

.progress-bar-success {
	background-color: var(--green-500);
}

.progress-bar-danger {
	background-color: var(--red-500);
}

.progress-bar-warning {
	background-color: var(--orange-500);
}