@import '../style/index';

@modal-prefix-cls: ~'@{prefix}-modal';

@modal-color: #666;

@container-background: #F8F8F8;
@header-background: #EDEDED;
@close-icon-color: #CECECE;

@body-font-color: #3D3D3D;
@body-border-radius: 2px;

@footer-background: #F5F5F5;
@footer-border: 1px solid #E8E8E8;

@confirm-icon-color: #FAAD14;
@info-icon-color: #1890ff;
@success-icon-color: #52c41a;
@error-icon-color: #f5222d;
@warning-icon-color: #FAAD14;

@confirm-loading-border: 1px solid #DDD;
@confirm-loading-border-top: 1px solid #FFF;

.@{modal-prefix-cls} {
	font-family: Tahoma, "Microsoft Yahei", sans-serif;
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: @z-index-modal-mask;
	&-mask {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: @modal-color;
		opacity: 0.6;

	}

	&-container {
		min-height: 160px;
		min-width: 400px;
		max-width: 50%;
		margin: 0 auto;
		top: 20%;
		position: relative;
		background: @container-background;
		border-radius: @body-border-radius;
		white-space: normal;
		animation: modal-fade-in 0.5s;

		@-webkit-keyframes modal-fade-in {
			0% {
				opacity: 0;
				top: 10%;
			}
			100% {
				opacity: 1;
			}
		}
	};

	&-header {
		border-radius: 2px;
		padding: 10px 14px 10px 17px;
		text-align: left;
		font-size: 14px;
		background: @header-background;

		.@{modal-prefix-cls}-title {
			color: @modal-color;
		}

		.close-icon {
			float: right;
			position: relative;
			color: @close-icon-color;
			cursor: pointer;
		}
	}

	&-body {
		max-height: calc(100vh - 200px);
		min-height: 80px;
		font-size: 14px;
		color: @body-font-color;
		padding: 20px;
		overflow: auto;
	}

	&-footer {
		height: 32px;
		padding: 10px 20px;
		background: @footer-background;
		text-align: right;
		border-top: @footer-border;
		border-radius: 0 0 2px 2px;

		.@{modal-prefix-cls}-confirm-btn {
			margin-right: 15px;
		}

		.@{modal-prefix-cls}-confirm-loading {
			display: inline-block;
			width: 10px;
			height: 10px;
			border-radius: 50%;
			animation: load 1.5s infinite linear;
			margin-right: 10px;
			border: @confirm-loading-border;
			border-top: @confirm-loading-border-top;
			@keyframes load {
				from {
					transform: rotate(0deg);
				}
				to {
					transform: rotate(360deg);
				}
			}
		}
	}
}

.info-area {
	max-width: 400px;

	.icon-style {
		font-size: 24px;
		vertical-align: text-top;
		padding: 10px;
	}

	.confirm-style {
		color: @confirm-icon-color;
	}

	.info-style {
		color: @info-icon-color;
	}

	.success-style {
		color: @success-icon-color;
	}

	.error-style {
		color: @error-icon-color;
	}

	.warning-style {
		color: @warning-icon-color;
	}

	.more-info {
		color: @modal-color;
		max-width: 350px;
		font-size: 14px;
		display: inline;
		vertical-align: text-top;
		line-height: 26px;
	}
}
