@import "variables";
.cp-vinRequest {}
.cp-vinRequest-filter {
	flex-wrap: wrap;
	align-items: flex-end;
	margin-bottom: 16px;

	.filter__search {
		min-width: 320px;
		.form-group {
			display: flex;
			.form-field {
				flex-grow: 1;
				.form-control {
					@include border-radius(3px 0 0 3px !important);
					border-right: 0;
				}
			}
			.form-btn {
				.btn {
					@include border-radius(0 3px 3px 0 !important);
				}
			}
		}
	}
	.filter__status {
		min-width: 120px;
	}
	.filter__duration {
		width: 280px;
		min-width: 240px;
		max-width: 100%;
	}
	.form-group {
		.form-label {
			font-size: 13px;
		}
	}
	@media(max-width: 1199px){
		//flex-direction: column;
		//align-items: flex-start;
		.filter__search {
			width: 320px;
			max-width: 100%;
			min-width: auto;
		}
		.filter__column {
			width: 280px;
			max-width: 100%;
			min-width: auto;
			//margin-left: 0;
		}
	}
}
.cp-vinRequest-table {
	position: relative;
	overflow: hidden;
	overflow-x: auto;
	table.table-requests {
		width: 100%;
		font-size: 12px;
		line-height: 1.25;
		tr {
			th {
				padding: 4px 12px;
				&:not(:first-child){
					border-left: 1px solid #d2d2d2;
				}
			}
			td {
				padding: 4px 12px;
				border-bottom: 1px solid #e1e1e1;
				vertical-align: top;
				&:not(:first-child){
					border-left: 1px solid #e1e1e1;
				}
			}
		}
		& > thead {
			tr {
				td, th {
					background: #e9e9e9;
					.js-table-sort {
						vertical-align: middle;
					}
				}
			}
		}
		& > tbody {
			.tr-hide {
				& > td {
					padding: 0;
				}
			}
			&:not(.in) {
				.visible-off {
					display: none;
				}
				.tr-hide {
					display: none;
					visibility: hidden;
				}
			}
			&.in {
				& > tr {
					&:first-child {
						td {
							background: #d5e6f6;
							&:not(:first-child){
								border-left: 1px solid darken(#e1e1e1, 5%);
							}
						}
					}
				}
				.visible-on {
					display: none;
				}
			}
		}
		//
		.btn {
			padding: 4px 12px;
			font-size: 12px;
		}
		input.form-control {
			height: 30px;
			padding: 4px 12px;
			font-size: 12px;
		}
		svg {
			display: block;
		}
		//
		.table-requests-form {
			background: #d5e6f6;
			border-bottom: 2px solid #fff;
			.messageBox {
				line-height: 1.5;
				.form-pseudo-textarea {
					background: rgba(255,255,255,.25);
					border: 1px solid #E1E1E1;
					padding: 8px;
					line-height: 1.5;
				}
			}
			.visible-x3,
			.visible-denied,
			.visible-replace,
			.visible-success {
				display: none;
			}
			.visible-denied {
				&:not(.needCredit){
					.messageBox.noCredit {
						display: none;
					}
				}
				&.needCredit {
					.messageBox.withCredit {
						display: none;
					}
				}
			}
			&.x3 {
				.visible-x3 {
					display: block;
					.alert {
						position: relative;
						margin-right: 65px;
						font-size: 14px;
						font-weight: bold;
						.arrow {
							position: absolute; top: 0; left: 100%;
							margin-left: 20px;
							@include transform(rotate(-15deg));
						}
					}
				}
			}
			&.denied {
				background: #ffb3b3;
				.visible-denied {
					display: block;
				}
			}
			&.replace {
				background: #fce18a;
				.visible-replace {
					display: block;
				}
			}
			&.success {
				background: #b8e986;
				.visible-success {
					display: block;
				}
			}
		}
	}
}
.cp-vinRequest-resultList {
	margin: 0;
	padding: 0;
	list-style: none;
	li {
		span {
			display: inline-block;
			padding: 4px 8px;
		}
		&.warning {
			span {
				background: #ffe180;
			}
		}
		&.success {
			span {
				background: #b8e986;
			}
		}
	}
}
.cp-vinRequest-spare {
	border-top: 1px solid rgba(255,255,255,.9) !important;
	width: 100%;
	font-size: 12px;
	line-height: 1.25;
	tr {
		th, td {
			border-bottom: 1px solid rgba(255,255,255,.9) !important;
			//padding: 4px 12px;
			&:not(:first-child){
				border-left: 1px solid rgba(255,255,255,.9) !important;
			}
		}
		td {
			background: #d5e6f6;
		}
		.td-replacement {
			width: 175px;
			min-width: 175px;
		}
		&.success {
			td {
				background: #b8e986;
			}
		}
		&.denied {
			td {
				background: #ffb3b3;
			}
		}
		&.replace {
			td {
				background: #fce18a;
			}
		}
	}
	thead {
		tr {
			th, td {
				background: none;
			}
		}
	}
	tbody {}
	.status-list {
		display: flex;
		//justify-content: space-between;
		margin: 0;
		padding: 0;
		list-style: none;
		font-size: 14px;
		& > li {
			&:not(:first-child){
				padding-left: 8px;
			}
		}
		.form-check {
			label {
				padding-left: 18px;
				&:hover {
					color: $blue;
				}
			}
		}
	}
}
.cp-vinRequest-message {
	//background: #ffe180;
	display: flex;
	padding: 12px;
	.message-left {
		width: 60%;
		max-width: 60%;
		padding-left: 24px;
		order: 2;
		//padding-right: 24px;
		.form-group {
			max-width: 720px;
		}
	}
	.message-right {
		width: 40%;
		max-width: 520px;
		//margin-left: auto;
		order: 1;
	}
}
.cp-vinRequest-spare-replacement {
	min-width: 180px;
	max-width: 200px;
	//white-space: nowrap;
	.u-replace {
		white-space: nowrap;
	}
	.u-form {
		display: none;
		.form-group {
			display: flex;
			.form-actions {
				//align-self: center;
				padding-right: 4px;
				padding-top: 8px;
				.closer {
					position: relative; top: auto; right: auto; bottom: auto; left: auto;
				}
			}
			.form-field {
				flex-grow: 1;
				.form-control {
					//width: 108px;
				}
			}
			.form-btn {
				padding-left: 4px;
			}
		}
	}
	.u-result {
		display: none;
	}
	&.form {
		.u-replace {
			display: none;
		}
		.u-form {
			display: block;
		}
	}
	&.result {
		.u-replace {
			display: none;
		}
		.u-form {
			display: none;
		}
		.u-result {
			display: block;
		}
	}
}