@use 'sass:color' as color;

.dlp-progress-form-wrapper {
	text-align: center;
	max-width: 700px;
	margin: 40px auto;

	.error {
		text-align: left;
	}

	.dlp-progress-steps {
		padding: 0 0 24px;
		margin: 0;
		list-style: none outside;
		overflow: hidden;
		color: #ccc;
		width: 100%;
		display: -webkit-inline-flex;
		display: -ms-inline-flexbox;
		display: inline-flex;

		li {
			width: 25%;
			float: left;
			padding: 0 0 0.8em;
			margin: 0;
			text-align: center;
			position: relative;
			border-bottom: 4px solid #ccc;
			line-height: 1.4em;
		}

		li::before {
			content: "";
			border: 4px solid #ccc;
			border-radius: 100%;
			width: 4px;
			height: 4px;
			position: absolute;
			bottom: 0;
			left: 50%;
			margin-left: -6px;
			margin-bottom: -8px;
			background: #fff;
		}

		li.active {
			border-color: #0073aa;
			color: #0073aa;

			&::before {
				border-color: #0073aa;
			}
		}

		li.done {
			border-color: #0073aa;
			color: #0073aa;

			&::before {
				border-color: #0073aa;
				background: #0073aa;
			}
		}
	}

	.button {
		font-size: 1.25em;
		padding: 0.5em 1em !important;
		line-height: 1.5em !important;
		margin-right: 0.5em;
		margin-bottom: 2px;
		height: auto !important;
		border-radius: 4px;
		margin: 0;
		opacity: 1;
	}

	.error .button {
		font-size: 1em;
	}

	.dlp-actions {
		overflow: hidden;
		border-top: 1px solid #eee;
		margin: 0;
		padding: 23px 24px 24px;
		line-height: 3em;

		.button {
			float: right;
		}

		.dlp-importer-toggle-advanced-options {
			color: #999;
		}
	}

	.dlp-importer,
	.dlp-progress-form-content {
		background: #fff;
		overflow: hidden;
		padding: 0;
		margin: 0 0 16px;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13);
		color: #555;
		text-align: left;

		header {
			border-bottom: 1px solid #eee;
			margin: 0;
			padding: 24px 24px 0;
		}

		section {
			padding: 24px 24px 0;
		}

		h2 {
			margin: 0 0 24px;
			color: #555;
			font-size: 24px;
			font-weight: normal;
			line-height: 1em;
		}

		p {
			font-size: 1em;
			line-height: 1.75em;
			font-size: 16px;
			color: #555;
			margin: 0 0 24px;
		}

		.form-row {
			margin-top: 24px;
		}

		.spinner {
			display: none;
		}

		.dlp-importer-options th,
		.dlp-importer-options td {
			vertical-align: top;
			line-height: 1.75em;
			padding: 0 0 24px 0;

			label {
				color: #555;
				font-weight: normal;
			}

			input[type="checkbox"] {
				margin: 0 4px 0 0;
				padding: 7px;
			}

			input[type="text"],
			input[type="number"] {
				padding: 7px;
				height: auto;
				margin: 0;
			}

			.dlp-importer-file-url-field-wrapper {
				border: 1px solid #ddd;
				-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
				box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
				background-color: #fff;
				color: #32373c;
				outline: 0;
				line-height: 1;
				display: block;

				code {
					background: none;
					font-size: smaller;
					padding: 0;
					margin: 0;
					color: #999;
					padding: 7px 0 0 7px;
					display: inline-block;
				}

				input {
					font-family: Consolas, Monaco, monospace;
					border: 0;
					margin: 0;
					outline: 0;
					box-shadow: none;
					display: inline-block;
					min-width: 100%;
				}
			}
		}

		.dlp-importer-options th {
			width: 35%;
			padding-right: 20px;
		}

		progress {
			width: 100%;
			height: 42px;
			margin: 0 auto 24px;
			display: block;
			-webkit-appearance: none;
			border: none;
			display: none;
			background: #f5f5f5;
			border: 2px solid #eee;
			border-radius: 4px;
			padding: 0;
			box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.2);
		}

		progress::-webkit-progress-bar {
			background: transparent none;
			border: 0;
			border-radius: 4px;
			padding: 0;
			box-shadow: none;
		}

		progress::-webkit-progress-value {
			border-radius: 3px;
			box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.4);
			background: #a46497;
			background: linear-gradient(to bottom, #a46497, color.scale(#0073aa, $lightness: -30%) ), #a46497;
			transition: width 1s ease;
		}

		progress::-moz-progress-bar {
			border-radius: 3px;
			box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.4);
			background: #0073aa;
			background: linear-gradient(to bottom, #0073aa,  color.scale(#0073aa, $lightness: -30%) ), #0073aa;
			transition: width 1s ease;
		}

		progress::-ms-fill {
			border-radius: 3px;
			box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.4);
			background: #0073aa;
			background: linear-gradient(to bottom, #0073aa, color.scale(#0073aa, $lightness: -30%) ), #0073aa;
			transition: width 1s ease;
		}

		&.dlp-importer__importing {

			.spinner {
				display: block;
			}

			progress {
				display: block;
			}

			.dlp-actions {
				display: none;
			}
		}

		.dlp-importer-mapping-table-wrapper,
		.dlp-importer-error-log {
			padding: 0;
		}

		.dlp-importer-mapping-table,
		.dlp-importer-error-log-table {
			margin: 0;
			border: 0;
			box-shadow: none;
			width: 100%;
			table-layout: fixed;

			td,
			th {
				border: 0;
				padding: 12px;
				vertical-align: middle;
				word-wrap: break-word;

				select {
					width: 100%;
				}
			}

			tbody tr:nth-child(odd) td,
			tbody tr:nth-child(odd) th {
				background: #fbfbfb;
			}

			th {
				font-weight: bold;
			}

			td:first-child,
			th:first-child {
				padding-left: 24px;
			}

			td:last-child,
			th:last-child {
				padding-right: 24px;
			}

			.dlp-importer-mapping-table-name {
				width: 50%;

				.description {
					color: #999;
					margin-top: 4px;
					display: block;

					code {
						background: none;
						padding: 0;
						white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
						word-wrap: break-word; /* IE */
						word-break: break-all;
					}
				}
			}
		}

		.dlp-importer-done {
			text-align: center;
			padding: 48px 24px;
			font-size: 1.5em;
			line-height: 1.75em;

			&::before {

				// @include icon( "\e015" );
				color: #0073aa;
				position: static;
				font-size: 100px;
				display: block;
				float: none;
				margin: 0 0 24px;
			}
		}
	}
}
