/* GUTENBERG PAGE BUILDER & KADENCE PLUGIN */

// VARS
$scrollableContentHeightMobile: calc(100vh - 171px); /* PM mobile page height */
$scrollableContentHeightTablet: calc(100vh - 252px); /* PM tablet page height */
$scrollableContentHeight: calc(100vh - 240px); /* PM page height */

// GENERAL
.wp-block-kadence-rowlayout {
	&.no-overflow,
	&.no-overflow [id^="kt-layout-id_"] { overflow: visible !important; } /* No overflow */
	.ui.message { margin-bottom: 20px !important; } /* Add space after notice */
}
.kt-row-layout-inner, .kb-row-layout-wrap:not(.z-index-big):not(.z-index-bigger), .kt-row-column-wrap, .wp-block-kadence-column { z-index: auto !important; } /* Z-index */
.wp-block-kadence-tab { display: none; } /* Hide tab content on page load */
.kt-tabs-title-list {
	@include mobile { display: none !important; } /* Hide pc tabs on mobile */

	.kt-tab-title { height: auto !important; /* Fixed tabs height */
		&:focus { outline: 0; } /* Remove tab focus outline */
	}
	.kt-tab-title-active .item-count { background: $mainColor; color: $whiteColor; } /* Active tab */
	+ .ui.dropdown { margin-bottom: 20px; display: none; /* Hide mobile tabs on pc */
		@include mobile { display: block; } /* Show mobile tabs on pc */
	}
}
.category-title-wrapper {
	~ h1 { display: none; } /* Hide page titile when is category (blog/news/job/request) */
	~ .news-slider-wrapper { display: none; } /* Hide slider when is category (blog/news/job/request) */
}
.kt-block-spacer .kt-divider { height: 1px; } /* Spacer height */
.kb-user-info-name { word-break: break-all; } /* Word break for user info block */
.wp-block-kadence-tabs .kt-tabs-wrap .kt-tabs-content-wrap .wp-block-kadence-tab { border: 0; } /* Hide tab border */

// BUTTON
.wp-block-kadence-advancedbtn {
	.kt-button.button {
		&.contact-button-link,
		&.feature-button-link {
			display: none;
		}
	}
}

// CAROUSEL
.wp-block-kadence-advancedgallery { overflow: visible !important; }
.kt-blocks-carousel {
	.slick-slider .slick-arrow,
	.splide .splide__arrow { width: 40px; height: 40px; border-radius: 20px; box-shadow: 0px 5px 10px 0px rgb(18 28 144 / 10%); }

	&.kb-blocks-advanced-carousel .slick-slider.kt-carousel-arrowstyle-blackonlight .slick-arrow { background: rgba(255, 255, 255, 0.1); opacity: 1; }

	&:not(.kb-blocks-advanced-carousel) {
		.slick-slider {
			&.kt-carousel-arrowstyle-blackonlight .slick-arrow { background: rgba(255, 255, 255, 1); opacity: 1; }
			.slick-prev.slick-arrow { transform: translate(-50%, -50%); }
			.slick-next.slick-arrow { transform: translate(50%, -50%); }
		}

		.splide {
			&.kt-carousel-arrowstyle-blackonlight .splide__arrow { background: rgba(255, 255, 255, 1); opacity: 1; }
			.splide__arrows {
				.splide__arrow {
					&.splide__arrow--prev.slick-prev { transform: translate(-50%, -50%); right: auto }
					&.splide__arrow--next.slick-next { transform: translate(50%, -50%); left: auto; }
				}
			}
		}
	}
}

// POST GRID CAROUSEL
.wp-block-kadence-postgrid {
	.kt-post-grid-layout-carousel-wrap {
		.splide__arrows {
			.splide__arrow { width: 40px; height: 40px; border-radius: 20px; box-shadow: 0px 5px 10px 0px rgb(18 28 144 / 10%); background: rgba(255, 255, 255, 1); opacity: 1;
				&.splide__arrow--prev { left: -1.5em; }
				&.splide__arrow--next { right: -1.5em; }
			}
		}
	}
}

// ORDER
.order-efd-row-wrapper span, .order-er-row-wrapper span, .order-extra-row-wrapper span { font-size: 16px; color: $headlinesColor3; font-weight: 700; } /* Order prices */
.order-list-wrapper { /* Custom extras & tips list */
	li {
		&:not(:last-child) { padding-bottom: 20px; border-bottom: 1px solid #f1f2f3; }
		&:not(:first-child) { padding-top: 20px; }
	}
	.cp-title-extra {
		padding-right: 150px; color: $headlinesColor3; font-size: 16px;
		@include tablet { font-size: 14px; }
		@include mobile { font-size: 13px; }
	}
	.cp-price-extra { float: right; text-align: right; font-size: 16px; color: $headlinesColor3; font-weight: 700; }
}
.order-info-head-wrapper .kt-blocks-info-box-title [href="#copy"] { color: $whiteColor; }

// POST NEW
.post-new-wrapper {
	.post-new-optional-fields-row-wrapper { display: none; }
	&.post-new-job-form-row-wrapper,
	&.post-new-request-form-row-wrapper {
		.kt-tab-title-active { /* Tab title align */
			svg { color: $mainColor; }
		}
		.kt-tabs-title-list.kb-tabs-list-columns .kt-tab-title { text-align: left;
			@include tablet { display: grid; text-align: center;
				> span { margin-bottom: 10px; }
				.kb-svg-icon-wrap { display: block; }
			}

			@include mobile {
				.kt-title-text, .kt-title-sub-text { display: none; }
			}
		}
		.package-field-wrapper { display: none; } /* Hide packages on page load */
		.ui.section.divider { margin-top: 0; margin-bottom: 0; } /* Remove code divider space */
		.field_separator { display: none; } /* Hide code divider */
		.kt-inside-inner-col { position: unset; /* Align instructions to the right */
			@include tablet { display: flex; flex-flow: column; } /* Reverse field and popup on tablet */
		}
	}
}
.ui.form .post-new-wrapper.post-new-job-form-row-wrapper .tooltip-handler .delete-extra-wrapper { right: 0; /* Inline Delete extra and Multiple */
	@include mobile { bottom: 8px; }
}

// SINGLE JOB
.job-user-info-wrapper {
	.kt-infobox-textcontent {
		> * { display: inline-block; }
		.kt-blocks-info-box-title { display: block; }
	}
}
.job-other-jobs-row-wrapper {
	.kt-accordion-panel { overflow: initial;
		.jobs-carousel {
			&.owl-theme {
				.nav-prev { margin-left: -32px; }
				.nav-next { margin-right: -32px; }
			}
		}
	}
}

// SINGLE REQUEST
.request-locations-row-wrapper { display: none; }

// MY ACCOUNT
.wp-block-kadence-column .job-bulk-action-button { position: absolute; right: 120px; top: 0; background: transparent !important; /* Job bulk action */
	i { display: none; }
}

// MY REQUESTS
.wp-block-kadence-column .request-bulk-action-button { position: absolute; right: 120px; top: 0; background: transparent !important; /* Request bulk action */
	i { display: none; }
}

// USER PROFILE
.user-has-cover + .wp-block-kadence-rowlayout .photo-wrapper { margin-top: -150px; } /* User photo */
.user-profile-contact-row-wrapper { margin-bottom: 30px; }
.user-profile-custom-offer-row-wrapper .request-custom-offer { margin-top: -30px; display: block; }

// PM
.is-page-pm {
	.header-wrapper-menu {
		@include mobile { display: none; } /* Hide header menu for mobile */
	}
	.wp-block-kadence-advancedbtn .search-users-btn-close.kt-button { display: none; } /* Conversation search button */
	.wp-block-kadence-advancedbtn .search-message-btn-close.kt-button { display: none; } /* PM search button */
	.pm-conversations-section-row-wrapper {
		@include mobile { margin-bottom: 0 !important; }
		.pm-conversations-row-wrapper { height: $scrollableContentHeight; overflow-y: auto;
			@include tablet { height: $scrollableContentHeightTablet; }
			@include mobile { height: $scrollableContentHeightMobile; }
		} /* Scrollable conversations */
	}
	&:not(.is-page-pm-single) .pm-content-section-row-wrapper {
		@include mobile { display: none; } /* Hide conversations content for mobile */
	}
	&.is-page-pm-single {
		.pm-conversations-section-row-wrapper {
			@include mobile { display: none; } /* Hide conversations list for mobile */
		}
		.pm-content-section-row-wrapper.wp-block-kadence-column {
			&:first-child {
				.kt-inside-inner-col { justify-content: flex-start; } /* PM single vertical alignment */
			}
			.pm-content-single-row-wrapper {
				.user-status-wrapper { position: absolute; bottom: 0; left: 30px; } /* User status */
				.pm-settings-menu.icon-button { margin-right: 5px; } /* Settings button */
				.pm-messages-row-wrapper { display: flex; flex-direction: column-reverse; overflow-y: auto; height: $scrollableContentHeight; /* Scrollable message content */
					@include tablet { height: $scrollableContentHeightTablet; }
					@include mobile { height: $scrollableContentHeightMobile; }

					> .kt-row-layout-inner { margin-bottom: auto !important; }
					.pm-list { margin-bottom: 70px;
						@include mobile { margin-bottom: 50px; }
					}
					.search-messages-result-wrapper{ margin-bottom: 70px;
						@include mobile { margin-bottom: 50px; }
						.pm-list { margin-bottom: initial;
							@include mobile { margin-bottom: initial; }
						}
					}
				}
			}
		}
		.wp-block-kadence-column .message-settings-action-button { position: absolute; right: 238px; top: 0; background: transparent !important; /* Message settings action */
			@include tablet { right: 215px; }
			@include mobile { right: 202px; }
			@include breakpoint-down(xs) { right: 38px; }
			i { display: none; }
		}
		.kadence-info-box-image-intrisic { padding-bottom: 100%; width: 96px; height: 0px; max-width: 100%; }
		.wp-block-kadence-advancedbtn .kb-btn-wrap .message-custom-offer-action-btn,
		.wp-block-kadence-advancedbtn.kb-buttons-wrap .message-custom-offer-action-btn {
			@include breakpoint-down(xs) {
				&.kt-button { padding: 8px;
					.kt-btn-svg-icon { padding-right: 0; }
					.kt-btn-inner-text { display: none; }
				}
			}
		}
	}
}

// HERO - HOMEPAGE CAROUSEL
.wp-block-kadence-slider.home-hero-slider .kt-blocks-carousel { padding: 0; }
.wp-block-kadence-slider.home-hero-slider .message-bubble-left:before { content: ""; position: absolute; top: 100%; right: 35px; width: 22px; height: 35px; opacity: 0.1; background-image: url("../images/homepage/message-bubble-arrow.svg"); background-repeat: no-repeat; background-position: center center; }
.wp-block-kadence-slider.home-hero-slider .message-bubble-right:before { content: ""; position: absolute; top: 100%; right: 35px; width: 22px; height: 35px; opacity: 0.1; background-image: url("../images/homepage/message-bubble-arrow.svg"); background-repeat: no-repeat; background-position: center center; transform: scale(-1, 1); }
@media screen and (min-width: 1025px) {
	.wp-block-kadence-slider.home-hero-slider .home-hero-slider-review-bubble-wrapper .kt-row-column-wrap { margin-left: 0 !important; }
	.wp-block-kadence-slider.home-hero-slider .message-bubble-left-wrapper .kt-row-column-wrap { margin-left: 0 !important; }
	.wp-block-kadence-slider.home-hero-slider .message-bubble-right-wrapper .kt-row-column-wrap { margin-right: 0 !important; }
}

// PHOTO CATEGORY - HOMEPAGE CAROUSEL
.photo-categories-wrapper .kb-gallery-ul {
	.kt-blocks-carousel { overflow: visible !important; }
	.kadence-blocks-gallery-item .kadence-blocks-gallery-item-inner .kadence-blocks-gallery-item__caption { text-align: left; padding: 25px; }
}

// NEWS CAROUSEL
.news-carousel-wrapper {
	&.wp-block-kadence-postgrid {
		.kt-blocks-post-grid-item {
			.kt-blocks-post-top-meta { position: absolute; top: -50px; left: 0; border: 4px solid $whiteColor; padding: 7px 12px; background: $grayBackground2; border-radius: 10px; }
		}
		.kt-blocks-post-date{
			&:before { content: "\f073"; font-family: 'outline-icons'; padding-right: 10px; font-weight: 400; }
		}
		.kadence-splide-slider-wrap, .slick-track { display: flex; margin: 10px !important;
			.kt-post-slider-item { display: flex; height: auto; }
		}

		.splide__arrows {
			.splide__arrow { width: 40px; height: 40px; border-radius: 20px; box-shadow: 0px 5px 10px 0px rgb(18 28 144 / 10%); background: rgba(255, 255, 255, 1); opacity: 1;
				&.splide__arrow--prev { left: -1em; }
				&.splide__arrow--next { right: -1em; }
			}
		}
	}
}

// GET INSPIRED - HOMEPAGE CAROUSEL
.seller-projects-carousel-wrapper {
	&.wp-block-kadence-postgrid {
		.kadence-splide-slider-wrap, .slick-track { margin-bottom: 10px !important; }
		.kt-blocks-post-grid-item {
			.entry-title {
				a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
			}
		}
	}
}

.jobs-images-carousel ~ .seller-projects-carousel-wrapper { display: none; } /* hide initial and show with JS if content exist */

// CATEGORIES - HOMEPAGE - LOGGED IN CAROUSEL
.category-icons-carousel-wrapper {
	.kb-gallery-ul {
		.kt-blocks-carousel { overflow: visible !important; }
		.kb-slide-item.kb-gallery-carousel-item.splide__slide { display: flex; height: auto;
			.kadence-blocks-gallery-item { background-color: $whiteColor; border-radius: 6px; flex-basis: 100%;
				.kadence-blocks-gallery-item-inner {
					figure { padding: 15px 0 0 0; }
					.kb-gal-image-radius { width: 50px; height: 50px; }
				}
			}
		}
	}
}

// AUTHENTICATION
.user-login-modal-wrapper,
.user-lost-password-modal-wrapper,
.user-register-modal-wrapper { /* full form width for modal */
	.wp-block-kadence-rowlayout.login-wrapper-row,
	.wp-block-kadence-rowlayout.lost-password-wrapper-row,
	.wp-block-kadence-rowlayout.register-wrapper-row {
		> .kt-row-layout-inner { margin: 0 !important;
			> .kt-row-column-wrap { max-width: 100% !important; }
		}
	}
}

.user-login-modal-wrapper,
.user-lost-password-modal-wrapper,
.user-register-modal-wrapper { /* full form width for modal */
	.kb-row-layout-wrap.login-wrapper-row.wp-block-kadence-rowlayout,
	.kb-row-layout-wrap.lost-password-wrapper-row.wp-block-kadence-rowlayout,
	.kb-row-layout-wrap.register-wrapper-row.wp-block-kadence-rowlayout { margin: 0 !important;
		.kt-row-column-wrap { max-width: 100% !important; }
	}
}

// RESPONSIVE
@media only screen and (min-width: 768px) { /* Tablet */
	.explore-categories-row-wrapper .kt-gutter-default > .wp-block-kadence-column { margin-right: 0; } /* Homepage categories table */
}
@media (min-width: 768px) and (max-width: 1024px) {
	.kt-tab-layout-row.kt-v-gutter-default.kt-row-column-wrap > .wp-block-kadence-column { margin-bottom: 20px; } /* Decrease the space between columns on mobile */
}
@media only screen and (max-width: 767px) { /* Mobile */
	.kt-mobile-layout-row.kt-v-gutter-default.kt-row-column-wrap > .wp-block-kadence-column { margin-bottom: 20px; } /* Decrease the space between columns on mobile */
	.without-responsive-dropdown .kt-tabs-title-list { display: flex !important; } /* Topup submenu */
}