/** element 样式优化 */
@import './themes/default.scss';

/* 表格样式优化 */
.el-table {
	.caret-wrapper {
		height: 14px;
	}

	.sort-caret.ascending {
		top: -5px;
	}

	.sort-caret.descending {
		bottom: -3px;
	}

	th.gutter {
		display: table-cell !important;
	}

	&.y-table-default-head th {
		background: none;
	}

	.cell.el-tooltip {
		min-width: auto;
	}

	td.el-table-column--selection.el-table__cell .cell,
	th.el-table-column--selection.el-table__cell .cell {
		padding-left: 0;
		padding-right: 0;
	}
}

.el-table__body tr.current-row:hover > td.el-table__cell {
	background: var(--el-color-primary-light-9);
}

.el-table__expand-icon > .el-icon {
	font-weight: bold;
}

.el-table__column-filter-trigger {
	line-height: 16px;
}

.el-table__column-filter-trigger i {
	font-weight: bold;
}

.el-table--border.el-loading-parent--relative {
	border-color: var(--el-border-color-lighter);
}

.el-table--border .el-loading-mask {
	right: 1px;
	bottom: 1px;
}

/* 分页样式优化 */
.el-pagination {
	font-weight: normal;
	text-align: center;
	white-space: normal;
}

.el-table + .el-pagination {
	margin-top: 15px;
	display: flex;
	justify-content: center;
}

.el-pagination.y-pagination-circle {
	.el-pager li,
	.btn-prev,
	.btn-next {
		border-radius: 50%;
		margin: 0 2px;
	}
}

/* 弹窗样式优化 */
.el-dialog {
	border-radius: 4px;
	pointer-events: auto;
	padding: 0;
	&.is-fullscreen {
		border-radius: 0;
		max-width: inherit;

		&.y-dialog-fullscreen {
			display: flex;
			flex-direction: column;

			& > .el-dialog__body {
				flex: auto;
				overflow: auto;
			}
		}
	}
}

.el-dialog__header {
	display: flex;
	align-items: center;
	border-bottom: 1px solid var(--border-color-lighter);
	box-sizing: border-box;
	padding: 15px;

	&.show-close {
		padding-right: 15px;
	}
}

.el-dialog__title {
	flex: 1;
	font-size: 16px;
}

.el-dialog__headerbtn {
	top: auto;
	right: auto;
	line-height: 1;
	font-size: 18px;
	width: 20px;
	height: 20px;
	position: static;
	display: flex;
	justify-content: center;
	align-items: center;

	& > i {
		display: block;
	}

	& + .el-dialog__headerbtn {
		margin-left: 10px;
	}

	& > .el-icon-full-screen,
	& > .el-icon-_compress {
		transform: scale(0.85);
		line-height: 0;
	}
}

.el-dialog__body {
	padding: 20px;
}

.el-dialog__footer {
	padding: 15px;
	border-top: 1px solid var(--border-color-lighter);
}

.el-dialog:not(.y-dialog-form) .el-dialog__body {
	.el-form .el-form-item:last-child {
		margin-bottom: 7px;
	}
}

.y-dialog-form .el-dialog__body {
	padding-bottom: 5px;
}
