/* Checkout
--------------------------------------- */
.checkout-container {
	
	// set header to 100%
	.checkout-header {
		width: 100%;
		
		.title {
			text-transform: none;
			font-size: 40px;
			text-transform: none;
		}
	}
	
	// move login/register button under text
	.authentication-wrapper {
		float: none;
		margin-top: 0;
		width: auto;
		max-width: inherit;
		text-align: left;
		position: static;
		margin-bottom: 30px;
	}
	
	
}

// style the login/register button
.am-checkout.-modern .authentication-wrapper .action-auth-toggle {
	
	background-color: #004896;
	color: #fff;
	font-size: 15px;
	padding: 10px;
	text-transform: none;
	text-decoration: none;
	
	&:hover {
		background: #1694d6;
	}
	
}



.amcheckout-main-container.-modern.-layout-3columns {
	display: block;
	
	// adding step numbers
	.amcheckout-column {
		.amcheckout-title {
			&::before {
				content: "1";
				background-color: #fff;
				border-radius: 50%;
				color: #363636;
				width: 30px;
				height: 30px;
				display: inline-block;
				text-align: center;
				margin-right: 10px;
				font-weight: 100;
			}
		}
		&:nth-child(2) {
			.amcheckout-title {
				&::before {
					content: "2";					
				}
			}
			
			&.addStep {
				.amcheckout-title {
					&::before {
						content: "3";					
					}
				}
			} 
			
		}
		&:nth-child(3) {
			.amcheckout-title {
				&::before {
					content: "3";
					float: left;
				}
			}
			
			&.addStep {
				.amcheckout-title {
					&::before {
						content: "4";					
					}
				}
			} 
			
		}
		
		// add check icon
		&:nth-child(4) {
			.amcheckout-title {
				&::before {
					content: '✔';
				}
			}
		}
	}
	
	@media only screen and (min-width: @screen__l) {
	
		margin-right: -15px;
	
		.amcheckout-column {
			width: ~"calc(33.33% - 15px)";
			float: left;
			margin-right: 15px;
			
			&:nth-child(3) {
				margin-right: 0;
			}
			
			&:nth-child(4) {
				width: 65%;
				float: right;
				margin-right: 15px;
			}
			
		}
	}
	
}



// checkout steps container
.amcheckout-step-container {

	margin-bottom: 15px;

	// step titles
	.amcheckout-title {
		padding: 10px 15px;
		background: #f3f3f3;
		border-bottom: 1px solid #fff;
		font-weight: normal;
		text-transform: uppercase;
		
		+ .amcheckout-content {
			> .amcheckout-wrapper {
				padding: 10px 15px;
				border: 1px solid @border-color;
				border-top: none;
				
				.required-fields {
					margin-top: 25px;
					margin-bottom: 25px;
					color: #ff0000; 
				}
				
				.checkout-update-button {
					text-align: right;
					padding: 10px 0;
				}
				
			}	
		}
		
	}
	
	.amcheckout-items .row {
		margin: 0;
	}
	
	.amcheckout-form-login,
	.form-login {
		> fieldset > div:first-child {
			margin-bottom: 20px;
		}
		 .amcheckout-email {
		 	display: block;
		 	
		 	.note {
		 		margin-top: 5px;
		 		line-height: inherit;
		 	}
		 	
		 }
		 
	}
	
	.opc-block-summary {
		margin-top: 50px;
		background: inherit;
		border: 0;
		
		.amcheckout-title {
			+ .amcheckout-content {
			
				background: #fff;
			
				> .amcheckout-wrapper {
					border: none;
					
					> table {
						
						@media only screen and (max-width: @screen__m) {
							&:first-child {
								border-top: 1px solid @border-color-secondary;
								
							}
						}
						
						&:first-child {
							tbody {
								> tr {
									> td:nth-child(4) {
										text-align: right;
										@media only screen and (max-width: @screen__m) {
											text-align: left;
										}
									}
								}
							}
						}
					
						> thead {
							th {
								background: #f3f3f3;
								font-size: 18px;
								font-weight: 300;
							}
							@media only screen and (max-width: @screen__m) {
								display: none;
							}
						}
						
						> tbody > tr td:not(.amount) {
							border-right: 1px solid @border-color-secondary;
							&:first-child {
								border-left: 1px solid @border-color-secondary;
							}
						}
						
						&:not(.table-totals) {
							> tbody > tr td {
								border-bottom: 1px solid @border-color-secondary;
							}
						}
						
						> tbody > tr td {
							vertical-align: top;
							
							
							// mobile table 
							@media only screen and (max-width: @screen__m) {
								&:nth-child(3),
								&:nth-child(4),
								&:nth-child(5),
								&:nth-child(6) {
									float: right;
									width: 100%;
								}
								
								
								// product name 
								&:nth-child(3) {
									border-bottom: none;
								}	
								
								// price 
								&:nth-child(4) {
									border-bottom: none;
									&:before {
										content: 'Preis: ';
										font-weight: 700;
										display: inline-block;
										margin-right: 5px;
									}
								}
								
								// qty 
								&:nth-child(5) {
									border-bottom: none;
								}
								
								
								// price 
								&:nth-child(6) {
									&:before {
										content: 'Summe: ';
										font-weight: 700;
										display: inline-block;
										margin-right: 5px;
											float: left;
									}
								}
								
							}
							
						}
						
						
						

					}
					
					// delete icon
					.delete {
						display: block;
						height: 15px;
						width: 15px;
						cursor: pointer;
						&:after {
							display: block;
							font-family: 'porto-icons';
							content: '\f819';
							color: #9b968b;
							line-height: 20px;
							width: 100%; 
						}
						&:hover {
							&:after {
								color: #e61446;
							}
						}
						
					}
					
					// image
					.product-image-wrapper {
						height: auto;
					}
					
					// product name
					.product-item-name {
						font-size: 18px;
						color: #444;
						text-transform: none;
						
						// stock notice
						+ div {
							background: transparent !important;
							padding: 0 !important;
							margin-top: 20px !important;
							font-size: 14px;
							color: #444;
							font-weight: normal;
							
							@media only screen and (max-width: @screen__m) {
								margin-top: 0 !important;
							}
							
						}
					}
					
					// stock
					.stock {
						> span:first-child {
							display: none;
						}
					}
					
					// price
					.base-price {
						display: block;
						margin-top: 20px;
						color: #999;
						font-size: 13px;
						font-weight: normal;
						> span {
							&:last-child {
								display: block;
							}
						}
					}
					
					// qty
					.details-qty {
						> .label {
							font-weight: 700;
						}
						@media only screen and (min-width: @screen__m) {
							> .label {
								display: none;
							}
						}
						
						margin: 0;
						.qty {
							max-width: 60px;
							text-align: center;
						}
					}
					
					.stock {
						.amstockstatus {
							display: block;
						}
					}
					
					// price
					.subtotal {
						text-align: right;
						@media only screen and (max-width: @screen__m) {
							text-align: left;
						}
						.price {
							font-weight: 400;
						}
					}
					
					
				}
			}
		}
		
		.table-totals {
			font-size: 18px;
			@media only screen and (max-width: @screen__m) {
				font-size: 16px;
			}
			tbody tr th {
				text-align: right;
				@media only screen and (max-width: @screen__m) {
					text-align: left;
					padding-left: 10px;
				}
			}
			
			@media only screen and (max-width: @screen__m) {
				.grand.totals {
					.mark {
						font-size: 1.5rem;
					}
				}
			}
		}
		
		.tax-hint {
			text-align: right;
		}
		
		.cart.item.message.notice {
			display: none;
		}
	}
	
	// discount code
	.checkout-payment-method {
		.payment-option {
			background: #f3f3f3;
			margin: 0;
			
			&.discount-code {
				margin-bottom: 15px;
				
				@media only screen and (min-width: @screen__l) {
					.payment-option-content {
						.form-discount {
							display: -webkit-box;
							display: -moz-box;
							display: -ms-flexbox;
							display: -webkit-flex;
							display: flex;       
							.payment-option-inner {
								margin-right: 10px;
								flex-grow: 0;
								flex-shrink: 0;
								flex-basis: 50%;
							}
						}
					}
				}
				
			}
				
			.payment-option-title {
				border-top: none;
				.action-toggle {
					font-weight: normal;
					text-transform: uppercase;
					color: #363636;
					font-size: 20px;
					&:after {
						display: none !important;
					}
				}
			}
			
			.payment-option-content {
				.action.action-apply {
					background: #004795;
					&:hover {
						background: #0088cc;
					}
				}
			}	
		}
		
		.amcheckout-payment-methods {
			.payment-method-title .label {
				padding: 5px 20px;
			}
			.payment-group .amcheckout-content > .amcheckout-wrapper {
				padding: 5px 0;
			}
			.payment-method._active .payment-method-content > * > * {
				margin: 0;
			}
		} 
	}
	
	.form-shipping-address {
		margin-top: 30px;
		
		.amcheckout-title {
			margin-bottom: 10px;
			width: ~"calc(100% + 16px)";
			margin-left: -8px;
			
			&::before { 
				content: "2" !important;
			}
		}
		
		.fieldset.address [name$=".repertus_post_number"],
		.fieldset.address [name$=".repertus_number"] {
			width: 50%;
		}

	}
	
	.amcheckout-additional-options {
		border: none;
		background: #fff !important;
	}
}

.cart-totals .totals-tax-summary .mark, 
.cart-totals .totals-tax-summary .amount, 
.opc-block-summary .table-totals .totals-tax-summary .mark, 
.opc-block-summary .table-totals .totals-tax-summary .amount {
	border-top-color: @border-color-secondary;
	border-bottom-color: @border-color-secondary;
}

.opc-block-summary .mark .value {
	display: inline-block;
	color: #363636;
}

.opc-block-summary .table-totals .grand {
	th {
		vertical-align: top;
	}
	
	th,
	td {
		padding-top: 14px;
	}
	
	strong { 
		font-weight: 700;
		font-size: 1.8rem;
	}
}


// button
.amcheckout-main-container.-modern.-layout-2columns .amcheckout-step-container.-summary > .checkout-payment-method .actions-toolbar .amasty.checkout, 
.amcheckout-main-container.-modern.-layout-3columns .amcheckout-step-container.-summary > .checkout-payment-method .actions-toolbar .amasty.checkout {
	float: right;
	width: auto;
	margin-right: 15px;
	&:hover {
		background: #0088cc;
	}
}

.amcheckout-main-container.-modern.-layout-2columns .amcheckout-step-container.-summary, 
.amcheckout-main-container.-modern.-layout-3columns .amcheckout-step-container.-summary {
	border: 1px solid @border-color;
}

.block-cart-failed .actions.main .continue, 
.block-cart-failed .actions.main .clear, 
.cart-container .form-cart .actions.main .continue, 
.cart-container .form-cart .actions.main .clear {
	display: inline-block;
}

.opc-estimated-wrapper {
	display: none;
}

._amcheckout-selectable-item, 
.amcheckout-step-container .amcheckout-shipping-address .billing-address-details, 
.amcheckout-step-container .amcheckout-shipping-address .shipping-address-details, 
.amcheckout-step-container .shipping-address-items .shipping-address-item, 
.amcheckout-step-container .amcheckout-shipping-methods .amcheckout-method, 
.amcheckout-step-container .checkout-payment-method .amcheckout-payment-methods .payment-method {
	background: #fff;
	border: none;
}

._amcheckout-selectable-item:hover, 
.amcheckout-step-container .amcheckout-shipping-address .billing-address-details:hover, 
.amcheckout-step-container .amcheckout-shipping-address .shipping-address-details:hover, 
.amcheckout-step-container .shipping-address-items .shipping-address-item:hover, 
.amcheckout-step-container .amcheckout-shipping-methods .amcheckout-method:hover, 
.amcheckout-step-container .checkout-payment-method .amcheckout-payment-methods .payment-method:hover {
	box-shadow: none;
	border: none;
	
}

.amcheckout-step-container { 
	.checkout-shipping-method .checkout-shipping-method .amcheckout-content > .amcheckout-wrapper,
	.checkout-payment-method .amcheckout-payment-methods .amcheckout-content > .amcheckout-wrapper {
		padding: 0;
	}
}

.amcheckout-step-container .amcheckout-shipping-address .amcheckout-button.-edit:hover, 
.amcheckout-step-container .checkout-billing-address .amcheckout-button.-edit:hover {
	background: transparent;
}

// remove payment icons
.checkout-payment-method .payment-method-title .payment-icon {
	display: none;
}

.amcheckout-main-container.-modern.-layout-3columns .amcheckout-step-container .amcheckout-payment-methods .payment-method:not(:last-of-type) {
	margin-bottom: 0;
}

.amcheckout-step-container .amcheckout-summary-container .amcheckout-title {
	background: #f3f3f3;
	color: #363636;
}


// street and house number
fieldset.field.street {

	// hide legend
	> .label {
		display: none;
	}
	
	> .control {
	
	    display: -webkit-box;
	    display: -moz-box;
	    display: -webkit-flexbox;
	    display: -ms-flexbox;
	    display: -webkit-flex;
	    -webkit-flex-wrap: wrap;
	    -moz-flex-wrap: wrap;
	    -ms-flex-wrap: wrap;
	    flex-wrap: wrap;
	
		> .field.additional {
			&:not(:last-child) {
				label {
					position: static;
				}
			}
			
		}
				
		> .field {
 			-webkit-box-flex: 1 0 50%;
 			-moz-box-flex: 1 0 50%;
 			-webkit-flex: 1 0 50%;
 			-ms-flex: 1 0 50%;
 			flex: 1 0 50%;
 			
 			&._required {
 				> label {
 					&:after {
 						content: '*';
						color: #e02b27;
						margin: 0 0 0 4.5px;
						font-size: 16px;
						font-weight: bold;
 					}
 				}
 			}
 			
		}
		
		> .field:nth-child(1) {
			margin-right: 14px;
		}
	
		> .field:nth-child(2) {
			margin-top: 0;
 			-webkit-box-flex: 1 0 85px;
 			-moz-box-flex: 1 0 85px;
 			-webkit-flex: 1 0 85px;
 			-ms-flex: 1 0 85px;
 			flex: 1 0 85px;
		}
			

	}
}

// quick fix
.amcheckout-step-container .checkout-payment-method .amcheckout-payment-methods .payment-group:not(:last-of-type) { margin-bottom: 0 !important; }

// remove box shadows
.amcheckout-step-container input[type='checkbox'] + label:hover:before, 
.amcheckout-step-container input[type='radio'] + label:hover:before, 
.amcheckout-step-container input[type='checkbox']:checked + label:before, 
.amcheckout-step-container input[type='radio']:checked + label:before {
	box-shadow: none;
}


#co-payment-form hr {
	display: none;
}

.amcheckout-main-container.-modern .amcheckout-step-container .amcheckout-additional-options .amcheckout-checkboxes {
	width: 100%;
	margin-bottom: 0;
}
.amcheckout-step-container .amcheckout-additional-options .amcheckout-checkboxes > * {
	margin-bottom: 5px;
}
.repertus-packstation-search button:not(.primary) {
	height: auto;
}
.modal-popup.authentication .block-authentication .actions-toolbar > .primary .action {
	height: auto;
}

.amcheckout-step-container .opc-block-summary .table-totals tbody tr th.amount.hint + td {
	background: #f3f3f3;
	border-top: 0;
	border-right: 0 !important;
}

.amcheckout-main-container .payment-method-hint {
	font-size: 0.9em;
	font-style: italic;
	padding-top: 10px;
}