@import '../mixins.less';

body.responsive-layout {
	.vamtam-box-outer-padding,
	.limit-wrapper,
	header.main-header .header-padding,
	body.has-blocks:not(.fl-builder) .the-content-parent > *,
	&:not(.vamtam-is-elementor) .vamtam-main:not(.layout-full) article,
	.page-wrapper > .vamtam-body-sidebar,
	&.single-post .single-post-wrapper .post-meta {
		padding-left: 20px;
		padding-right: 20px;
	}

	.vamtam-body-sidebar {
		border-top: solid 1px var(--vamtam-default-line-color);;
		padding-top: var(--vamtam-sidebar-content-margin);
	}

	.woocommerce-tabs .limit-wrapper {
		padding-left: 0;
		padding-right: 0;
	}

	#sub-header {
		border-top: none;
	}

	#commentform .form-submit {
		margin: 0 !important;
	}

	.comments .comment-author {
		display: none;
	}

	th {
		padding: 0.5em;
	}

	td {
		.wp-block-table.is-style-stripes &,
		& {
			padding: 0.5em;
		}
	}

	h3 .vamtam-button {
		margin-top: 20px;
	}

	blockquote.simple .quote-content {
		padding: 0%;
	}

	#header-404 {
		background-position-y: 30px !important;
		background-size: 100px !important;
		.line-1 {
			padding: 50px 0px 0px 0px;
			font-size: 120px;
		}
	}

	.widget.widget_search {
		margin-top: 10px;
	}

	// WC Products
	&:not(.vamtam-limited-layout) ul.products li.product:not(.product-category) {
		.vamtam-product-content {
			padding-left: 20px;
			padding-right: 20px;
		}

		&:hover {
			> a img,
			.vamtam-product-content,
			.vamtam-product-content > * {
				transform: translateY(0);
			}
		}

		.vamtam-add-to-cart-wrap > a[href] {
			position: static;
			transform: translateY(0);
			opacity: 1;
		}
	}

	// WC Products Categories
	ul.products li.product-category.product {
		> a {
			display: flex;
			flex-direction: column;
			height: 100%;
		}

		.vamtam-hover-wrap {
			position: relative;
			height: auto;

			.vamtam-product-cat-btn {
				opacity: 1;
				position: relative;
				transform: translateY(0);
			}
		}
		.vamtam-product-cat-content {
			flex: 1;
			padding-top: 0;
			padding-left: 20px;
			padding-right: 20px;
			padding-bottom: 45px;

			&, > * {
				transform: translateY(0);
			}
		}

		&:hover {
			> a img,
			.vamtam-product-cat-content,
			.vamtam-product-cat-content > * {
				transform: translateY(0);
			}
		}
	}


	// Standard cart / Menu cart widget styles.
	.vamtam-cart-main,
	.elementor-widget-woocommerce-menu-cart {
		&,
		.elementor-menu-cart__main {
			.product-remove {
				grid-row: 1/2;
				align-self: flex-start;
			}

			.product-price {
				grid-column: 1/4;
			}

			.product-name {
				padding-top: 0;
				padding-left: 20px;
				padding-right: 25px;
			}
		}

		// Menu cart only.
		.elementor-menu-cart__main {
			padding: 50px 20px;
			width: 100vw;
			height: 100vh;
		}

		// Standard cart only.
		> .woocommerce-cart-form__contents {
			.cart_item {
				grid-template-columns: ~"min(25%, 70px) "auto auto;
				padding-top: 20px;
				padding-bottom: 20px;

				.product-price {
					&:before {
						display: block;
					}
				}
			}
		}
	}

	// Standard cart
	&.woocommerce.woocommerce-cart {

		.col2-set .col-2 {
			padding: 0;
		}

		.cross-sells {
			ul.products {
				grid-template-columns: 1fr;
				li.product {
					padding-bottom: 30px;
				}
			}
		}

		.cross-sells,
		.vamtam-cart-main {
			padding: 0;
		}

		.cart_totals {
			table.shop_table {
				.order-total,
				.cart-subtotal {
					display: flex;
					align-content: center;
					> th {
						display: block;
					}
					> td {
						margin-left: auto;
						&::before {
							display: none;
						}
					}
				}
			}
		}
	}

	// Checkout
	&.woocommerce.woocommerce-checkout {
		.woocommerce-login-form,
		.woocommerce-coupon-form {
			float: none;
			width: 100%;
			margin: 0;
			padding-left: 0;
			padding-right: 0;
		}
		.woocommerce-login-form form.woocommerce-form-login {
			padding-left: 0 !important;
			padding-right: 0 !important;
		}
		.checkout_coupon {
			padding: 10px;
		}
		.woocommerce .col2-set .col-2 {
			padding-left: 0;
			padding-right: 0;
		}
	}

	.woocommerce {
		&.woocommerce-cart,
		&.woocommerce-checkout {
			.meta-header .meta-header-inside {
				padding: 0;
			}
		}
		&.woocommerce-cart {
			#sub-header .meta-header-inside {
				max-height: 1vh;
			}
		}
	}

	.elementor-post__text {
		padding: 0;
	}

	.alignright,
	.alignleft {
		&:not(.wp-caption) img,
		&.wp-caption {
			max-width: 50vw;
		}
	}

	.loop-wrapper.regular {
		.post {
			width: 100%;
		}
	}
}

// Estudiar-only.
.vamtam-theme-table-styles {
	table {
		th, td {
			padding: 10px;
		}
	}
}

// ---------------- Custom Widget Styles -------------- //

// Added here so when moved to individual widget styles there won't be any specificity alteration to be made.

// Section mobile
.elementor-section {
	&.elementor-element {
		padding:0 20px;
	}
}

// Tabs widget mobile.
.elementor-widget-tabs {
	.elementor-tab-mobile-title {
		font-family: var(--vamtam-h3-font-family);
		font-size: 18px;
		letter-spacing: 1.5px;
		line-height: 26px;
		color: var(--vamtam-accent-color-4);
		text-transform: uppercase;
		&.elementor-active {
			color: var(--vamtam-accent-color-3);
		}
	}

	// Bijoux-after.
	&.vamtam-mobile-tabs {
		.elementor-tab-mobile-title {
			display: flex;
			align-items: center;
			min-height: 50px;
			padding: 10px 0;
			border: 0;
			border-color: var(--vamtam-accent-color-4);
			border-style: solid;
			border-bottom-width: 1px !important;
			&.elementor-active {
				border-color: var(--vamtam-accent-color-3);
				margin-bottom: 50px;
				+ .elementor-tab-content + .elementor-tab-mobile-title {
					margin-top: 30px;
					border-top-width: 1px !important;
				}
			}
		}
	}

	// Title numbering mask.
	&.vamtam-has-numbering-bg {
		.elementor-tabs .elementor-tab-mobile-title {
			display: flex;
		}
	}

	// Estudiar-only.
	&.vamtam-has-theme-hr-tabs-style {
		.elementor-tabs-wrapper {
			.elementor-tab-title {
				margin-left: 20px;
				margin-bottom: 20px;
			}
		}
	}
}

// Products archive mobile.
.elementor-widget-wc-archive-products {
	&.elementor-element.elementor-widget {
		.products.vamtam-wc {
			grid-template-columns: 1fr;
		}
	}

	// WC products override.
	&.elementor-widget.elementor-wc-products {
		.products.vamtam-wc .product {
			&.sale span.price {
				top: 40px;
				margin: 10px	;
			}
			span.onsale {
				top: 0;
				left: 0;
				margin: 0;
				font-size: 16px;
				min-width: 40px;
				min-height: 40px;
				line-height: 40px;
			}
			.vamtam-product-content {
				padding: 0 20px 30px 20px;
			}
		}
	}
}

// Form.
.elementor-widget-form {
	// Caridad-only.
	.elementor-field-type-checkbox {
		.elementor-field-subgroup.elementor-subgroup-inline {
			grid-template-columns: 1fr;
			align-items: center;
		}
	}
}

// Menu cart.
.elementor-widget-woocommerce-menu-cart {
	.elementor-menu-cart__container .elementor-menu-cart__main {
		min-width: 100%;
	}

	// Caridad-after.
	.elementor-menu-cart__wrapper .elementor-menu-cart__container > .elementor-menu-cart__main {
		padding-left: 0;
		padding-right: 0;
	}
	> .vamtam-elementor-menu-cart__header,
	> .widget_shopping_cart_content .cart_item,
	> .widget_shopping_cart_content > :not(.woocommerce-cart-form__contents) {
		padding-left: 20px; // Should also be replicated in Elementor selector (woocommerce-menu-cart--fixed-mobile-cart-padding).
		padding-right: 20px; // Should also be replicated in Elementor selector (woocommerce-menu-cart--fixed-mobile-cart-padding).
	}
}

// Product Description.
.elementor-widget-woocommerce-product-short-description {
	.woocommerce-product-details__short-description {
		.limit-wrapper {
			padding-left: 0;
			padding-right: 0;
		}
	}
}

// Testimonial-Carousel.
.elementor-widget-testimonial-carousel {
	// Estudiar-only
	&.vamtam-has-theme-arrows-style {
		:is(.elementor-main-swiper.swiper-container, .elementor-main-swiper.swiper) {
			.swiper-wrapper {
				margin-top: 50px;
			}
		}
		.elementor-swiper-button-prev,
		.elementor-swiper-button-next {
			left: 0;
		}
	}
}

// Product Add To Cart.
.elementor-widget-woocommerce-product-add-to-cart {
	&.elementor-add-to-cart-mobile--align-justify {
		.added_to_cart {
			flex-basis: 100%;
		}
	}
}
