@import '../mixins.less';

body.responsive-layout {
	--vamtam-content-space-l: 25px;

	.responsive-override-fonts(primary-font-, tablet);
	.responsive-override-fonts(h1-, tablet);
	.responsive-override-fonts(h2-, tablet);
	.responsive-override-fonts(h3-, tablet);
	.responsive-override-fonts(h4-, tablet);
	.responsive-override-fonts(h5-, tablet);
	.responsive-override-fonts(h6-, tablet);
	.responsive-override-fonts(em-, tablet);

	.alignwide,
	.alignfull {
		&.wp-block-columns {
			margin-left: 20px !important;
			margin-right: 20px !important;
		}
	}

	#scroll-to-top {
		bottom: 20px;
	}

	&.error404 .vamtam-main {
		padding-left: 50px;
		padding-right: 50px;

		#header-404 .line-2 {
			display: none;
		}
	}

	.vamtam-main:not(.layout-full) {
		.vamtam-box-outer-padding,
		.limit-wrapper {
			padding-left: 0;
			padding-right: 0;
		}
	}

	&.woocommerce.single,
	& {
		&:not(.layout-full) .page-wrapper > article:last-child > .page-content:last-child {
			padding-bottom: 80px;
		}
	}

	&.vamtam-limited-layout:not(.has-page-header) {
		&.woocommerce,
		&.single-jetpack-portfolio,
		&,
		&.archive {
			article > .page-content {
				padding-top: 30px;
			}
		}
	}

	&.has-page-header {
		article > .page-content {
			padding-top: 60px;

			.meta-top {
				padding-top: 0;
			}
		}
	}

	header.main-header .header-padding,
	.vamtam-main:not(.layout-full) article,
	.page-wrapper > .vamtam-body-sidebar,
	.vamtam-main:not(.layout-full) .vamtam-related-content {
		padding-left: 30px;
		padding-right: 30px;
	}

	.limit-wrapper .limit-wrapper {
		padding: 0;
	}

	.vamtam-expand-scroll-content {
		width: auto !important;
	}

	.vamtam-main:not(.layout-full) .comments-wrapper {
		margin-bottom: 80px;
		padding-left: 0px;
		padding-right: 0px;
	}

	#main.layout-full .comments-wrapper {
		max-width: 100%;
	}
	.comments-wrapper {
		label {
			padding-left: 0;
		}
	}

	#commentform {
		p {
			margin-left: 0 !important;
		}

		.comment-form-cookies-consent {
			> input {
				align-self: flex-start;
			}
			> label {
				margin-top: -.2em; // To negate line-height (first-line).
			}
		}
	}

	&.page-template-guestbook-php {
		#comments-list {
			margin-bottom: 30px;
		}
		.limit-wrapper {
			padding-left: 10px;
			padding-right: 10px;
		}
		#commentform {
			padding-top: 20px;
			padding-bottom: 0px;
		}
		.respond-box {
			padding: 10px;

			#reply-title {
				display: none;
			}
		}

	}

	#commentform .form-submit {
		float: none;
	}

	.comment-notes {
		padding-bottom: 20px;
		clear: both;
	}

	.comments,
	.woocommerce #reviews #comments {
		.comment-meta-left {
			flex-flow: column;
			align-items: flex-start;
			max-width: 60%;

			.comment-time {
				border-left: 0;
				padding-left: 0;
			}
		}

		.comment-author {
			flex: 0 1 30px;
		}

		.avatar {
			max-width: 30px !important;
		}

		.comment {
			min-height: inherit;

			.comment {
				padding-left: 0;
				margin-left: 15px;
				padding-top: 15px;

				.comment-content {
					padding-left: 15px;
					padding-bottom: 15px;
				}
			}
		}
	}
	.quantity input.qty,
	#quantity input.qty {
		padding: 5px;
	}

	.error-message {
		display: none;
	}

	html {
		background-image: none;
	}

	.move-into-slider .icon.shortcode.box {
		padding: 0.1em;
	}

	.move-into-slider {
		margin-top: 0px;
	}

	aside.left {
		order: 3;
	}
	.vamtam-body-sidebar {
		margin-top: 0 !important;
	}

	.vamtam-body-sidebar,
	.page-wrapper > article {
		width: auto;
		max-width: none;
		flex: 0 1 auto ;
	}
	.page-wrapper {
		flex-direction: column;
	}
	aside .menu-item > .sub-menu {
		display: none !important;
	}

	.vamtam-woocommerce-cart-form-wrapper {
		flex-direction: column;

		.vamtam-cart-collaterals {
			flex-basis: auto;
			padding: 0px !important;
		}

	}

	// Standart cart
	&.woocommerce.woocommerce-cart {
		.cross-sells {
			ul.products {
				grid-template-columns: repeat(2, 1fr);
			}
		}

		.vamtam-cart-main {
			padding: 0;
		}

		.vamtam-cart-main > .vamtam-cart__header,
		.vamtam-cart-main > .woocommerce-cart-form__contents .cart_item {
			padding-right: 0;
			padding-left: 0;
		}

		.woocommerce {
			display: flex;
			flex-direction: column;
			grid-column-gap: 0px;
			grid-row-gap: 30px;
		}
	}

	&.single-post .single-post-wrapper {
		.post-media {
			margin-left: 0;
			margin-right: 0;

			.media-inner {
				position: relative;
				display: block;
				min-height: 20px;
			    max-width: 900px;
			}
		}

		.meta-top {
			flex-flow: column;
			max-width: 100%;

			.meta-left {
				&.has-author {
					grid-template-columns: auto;
				}

				> div {
					padding: 0;

					&:only-of-type {
						align-self: flex-start !important;
					}
				}
			}

			.meta-right {
				padding-top: 10px;
			}

			.avatar {
				display: none;
			}

			.meta-left-top {
				grid-column: span 2/auto;
			}
		}

		p {
			margin: 10px 0px 20px 0px;
		}
	}

	.page-header h1 a {
		font-size: 100%;
	}
	#sub-header {
		position: relative;
		z-index: 2;

		.meta-header header.page-header {
			flex-direction: column;
			text-align: center;
			align-items: center;

			.desc {
				margin: 0;
			}
		}

		.meta-header {
			background-attachment: scroll !important;
		}

		.meta-header-inside {
			position: relative;
			text-align: start !important;

			.desc {
			    font-size: 100%;
			}
		}
	}
	// Fitness-only.
	&.woocommerce-page.post-type-archive-product #sub-header {
		header.page-header {
			text-align: center;
		}
	}

	.respond-box {
		margin-top: 0;

		.respond-box-title {
			padding-left: 0;
			padding-right: 0;
		}
	}

	.loop-wrapper.regular {
		.post-media {
			order: -1;
			flex-basis: 100%;
			padding-right: 0;
		}

		.list-item {
			width: calc( 50% - 65px/2 ) !important;

			h3 {
				margin-bottom: 15px;
			}
		}

		.post-article {
			.post-media {
				float: none;
				max-width: 100%;
				width: 100%;
				margin-bottom: 10px;

				img {
					max-width: 100%;
				}
			}

			.post-content-outer {
				&.single-post {
					padding-left: 0;
				}

				.post-meta div {
					border: none;

					&.blog-buttons a:after {
						display: none;
					}
				}
			}
		}
	}

	.sep-text:not(.keep-always) {
		.content {
			display: block;
			white-space: normal;
		}
	}

	.vamtam-hide-lowres {
		display: none;
	}


	.wp-caption.alignleft {
		margin-left: 0px;
	}

	.page-wrapper > aside {
		max-width: 100%;
		width: auto;
	}

	.wpforms-container.vamtam-one-row {
		.wpforms-form,
		.wpforms-field-container {
			flex-direction: column;
		}
	}

	// Standard cart
	.vamtam-cart-main {

		.vamtam-cart__header {
			margin-bottom: 10px;
		}

		> .vamtam-cart__header,
		> .woocommerce-cart-form__contents .cart_item {
			padding-right: 20px;
			padding-left: 20px;
		}

		.cart_item {
			grid-template-rows: auto;
			grid-template-columns: max-content 60% minmax(20%,auto);
		}

		.product-thumbnail {
			grid-row: 1/3;
			> a, > a > img {
				display: block;
			}
		}

		.product-remove {
			align-self: auto;
			grid-column: 4;
		}

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

	//Checkout
	&.woocommerce-checkout {
		.woocommerce form .form-row {
			padding: 0;
		}

		.woocommerce-notices-wrapper {
			padding-top: 0;
			margin-top: 0;
		}

		form.woocommerce-checkout {
			.woocommerce-billing-fields > h3 {
				margin-top: 0;
			}

			display: flex;
			flex-direction: column;
			grid-column-gap: 0px;
			grid-row-gap: 30px;

			#order_review_heading {
				margin-bottom: -15px;
			}

			#payment {
				padding: 20px;
			}
		}

		.meta-header-inside {
			height: auto !important;
			padding: 0 !important;

			> .page-header > h3 {
				display: flex;
				justify-content: center;
				align-items: center;
			}
		}
	}

	.checkout-breadcrumb {
		margin: 30px 0;
	}

	// Caridad-after.
	&.woocommerce div.product .woocommerce-tabs .panel {
		padding-left: 0;
		padding-right: 0;
	}
}

body.admin-bar.dialog-prevent-scroll {
	max-height: calc( 100vh - 46px );
}
