/* -------------------------------------------
	Shop Subpages
	- Base
	- Cart, Checkout Order Review
	- Shop Table
	- Cart & Checkout Styles
	- Cart, Wishlist Empty Pages
	- Round Corners
---------------------------------------------- */

@import '../config';
@import '../mixins';
@import '../direction';

// Base
mark {
	color: inherit;
	background: none;
}

p.form-row {
	line-height: 1;
	width: 100%;

	label:not(.checkbox) {
		display: inline-block;
		margin-bottom: 7px;
		line-height: 1.4;
		// text-transform: capitalize;
	}

	.required {
		text-decoration: none;
	}
}

.select2-container {
	margin-bottom: .4rem;
}

@include mq(sm) {

	p.form-row-first,
	p.form-row-last {
		width: 50%;
	}
}

// Cart, Checkout Order Review
.cart-information,
.woocommerce-checkout-review-order,
.payment-box {
	padding: 3rem;
	border: 1px solid var(--alpha-change-border-color);
	line-height: 2;
}

@include mq(xs, max) {

	.cart-information,
	.woocommerce-checkout-review-order,
	.payment-box {
		padding: 3rem 2rem;
	}
}

.shop_table,
.woocommerce-checkout-review-order {
	ul>li {
		line-height: 1.4;
		margin-bottom: 0;
		padding-bottom: 1.8rem;

		&.woocommerce-info,
		&.woocommerce-error {
			line-height: 1.7;
		}
	}

	ul>li:last-child {
		padding-bottom: 0;
	}

	ul {
		padding-top: 5px;
		padding-bottom: 5px;
	}
}

// Shop Table
.shop_table {
	margin-bottom: 0;
	text-align: $left;
	border-collapse: separate;

	td,
	th {
		padding: side-values(1rem 0 .5rem);
		border-top: 1px solid var(--alpha-change-border-color);
		border-bottom: none;
		vertical-align: middle;
	}

	>tbody {
		border-bottom: 1px solid var(--alpha-change-border-color);
	}

	thead th {
		padding: .3rem 0;
		border-top: 0;
		color: var(--alpha-change-color-dark-1);
		font-size: 1.6rem;
		font-weight: 600;
		line-height: 1.875;

		&:last-child {
			padding-right: 1rem;
		}
	}

	.product-thumbnail {
		position: relative;
		margin: auto;
	}

	&:not(.cart).product-price {
		font-weight: 600;
		white-space: nowrap;

		del {
			color: var(--alpha-grey-color-light);
		}
	}

	.product-quantity {
		.quantity-wrapper {
			width: 100%;
		}
	}

	.product-stock-status {
		white-space: nowrap;
	}

	.product-name h3 {
		font-size: 1.4rem;
	}

	.remove {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 20px;
		height: 20px;
		position: absolute;
		top: 12px;
		#{$right}: 12px;
		z-index: 3;
		background: var(--alpha-change-color-light-1);
		color: var(--alpha-change-color-dark-1);
		font-size: 1.2rem;
		line-height: 12px;
		text-align: center;
		border-radius: 50%;
		box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2);

		&:hover {
			color: var(--alpha-primary-color);
		}
	}

	.btn-link+.btn-link {
		margin-#{$left}: .5rem;
	}

	.blockMsg {
		display: none !important;
	}


	tr :is(td, th):last-child {
		text-align: $right;
	}

	.store-empty :is(td, th):last-child {
		text-align: center;
	}

	tr td.actions {
		text-align: $left;
	}

	tr.shipping td {
		text-align: $left;
	}
}

// Cart & Checkout Styles
.cart-subtotal {

	th,
	td {
		border-top: 0;
		font-size: 1.6rem;
		font-weight: 600;
		color: var(--alpha-change-color-dark-1);
	}
}

.order-total {
	color: var(--alpha-change-color-dark-1);

	th,
	td {
		padding: 2rem 0 1.6rem;
		border-bottom: 1px solid var(--alpha-border-color, #e1e1e1);
	}

	strong {
		font-weight: 600;
		font-size: 1.6rem;
	}
}

.shipping+.order-total {

	th,
	td {
		border-top: 1px solid var(--alpha-change-border-color);
	}
}

.cart_item>.product-name {
	padding-#{$right}: 3rem;
	color: var(--alpha-change-color-dark-1);
	font-size: 1.4rem;
	font-weight: 500;
}

dl.variation {
	dt {
		font-size: 1.1em;
		float: left;
		margin-#{$right}: 5px;
		margin-top: -1px;
	}

	p {
		margin-bottom: 0;
	}
}

.form-coupon {
	max-width: 100%;
	padding: 0;

	.button {
		border-width: 1px;
		border-color: var(--alpha-grey-color);

		&:hover,
		&:focus,
		&:active {
			border-color: var(--alpha-change-color-dark-1);
		}
	}
}

// Round Corners
.alpha-rounded-skin {
	.status {
		border-radius: var(--alpha-corner-sm);
	}

	.cart-information,
	.woocommerce-checkout-review-order,
	.payment-box,
	.checkout_coupon,
	.woocommerce-form-login-toggle+.woocommerce-form-login,
	.woocommerce-form-login-toggle+.woocommerce-form-login .button {
		border-radius: var(--alpha-corner-md);
	}
}