/* SC Always balance headings and paragraph text */
.elementor-heading-title {
	text-wrap: balance;
}

/* SC Icon alignment fix */
.elementor-icon-wrapper {
	display: flex;
}

/* SC Elementor fix overwrite default word breaking */
.e-loop-item * {
	word-break: normal !important;
}

/* SC Inherit link colour */
.inherit-link-colour a,
.inherit-link-colour a:hover {
	color: inherit !important;
}

/* SC Adjust padding below lists */
body ul,
body ol {
	margin-top: 0px;
	margin-bottom: 20px;
}

/* SC Remove margin from last item in text widget */
.elementor-widget-text-editor :last-child {
	margin-bottom: 0px;
}

/* SC Fix heading margins in text and accordion widgets */
.elementor-widget-text-editor
	:is(
		h1:not(.elementor-widget-heading h1),
		h2:not(.elementor-widget-heading h2),
		h3:not(.elementor-widget-heading h3),
		h4:not(.elementor-widget-heading h4),
		h5:not(.elementor-widget-heading h5),
		h6:not(.elementor-widget-heading h6)
	),
.elementor-tab-content
	:is(
		h1:not(.elementor-widget-heading h1),
		h2:not(.elementor-widget-heading h2),
		h3:not(.elementor-widget-heading h3),
		h4:not(.elementor-widget-heading h4),
		h5:not(.elementor-widget-heading h5),
		h6:not(.elementor-widget-heading h6)
	) {
	margin-top: 0px;
	margin-bottom: 20px;
}
.wp-block-heading {
	margin-bottom: 20px;
}

/* SC Remove default heading margin */
body :is(h1, h2, h3, h4, h5, h6) {
	margin-top: 0;
	margin-bottom: 0;
}

/* SC Format blog categories and tag widgets */
.elementor-widget-wp-widget-categories h5,
.elementor-widget-wp-widget-tag_cloud h5 {
	display: none;
}
.elementor-widget-wp-widget-categories ul,
.elementor-widget-wp-widget-cbc-taxonomy-video-widget ul {
	margin-bottom: 0px;
	margin-block-start: 0em;
	margin-block-end: 0em;
	padding-inline-start: 0px;
	list-style-type: none;
}

/* SC Center error/success message on Elementor form, and input/select text */
.center-form-message .elementor-message,
.center-form-message input,
.center-form-message select,
.center-form-message label,
.center-form-message textarea {
	text-align-last: center;
	text-align: center;
}
.center-form-message .elementor-message {
	display: block;
}
.center-form-message .elementor-field-group,
.center-form-message .elementor-column {
	justify-content: center;
	text-align: center;
}

/* SC Give slide out menu sub-items a left margin */
.slide-out-menu .elementor-nav-menu--dropdown .elementor-sub-item {
	margin-left: 20px !important;
	border-left: none !important;
}
.slide-out-menu .elementor-nav-menu ul ul {
	margin-left: 20px;
}

/* SC Remove the default dark background on menu item click for the slide out menu */
.slide-out-menu
	.elementor-nav-menu--dropdown
	.elementor-item.elementor-item-active,
.slide-out-menu .elementor-nav-menu--dropdown .elementor-item.highlighted,
.slide-out-menu .elementor-nav-menu--dropdown .elementor-item:focus,
.slide-out-menu .elementor-nav-menu--dropdown .elementor-item:hover,
.slide-out-menu .elementor-sub-item.elementor-item-active,
.slide-out-menu .elementor-sub-item.highlighted,
.slide-out-menu .elementor-sub-item:focus,
.slide-out-menu .elementor-sub-item:hover {
	background: transparent;
}

/* SC align last child bottom */
@media (min-width: 767px) {
	.align-last-child-bottom [data-element_type="container"]:last-child {
		height: 100%;
	}
	.align-last-child-bottom [data-element_type="container"] :last-child {
		margin-top: auto;
	}
	/* For non-container elements */
	.align-last-child-bottom :last-child {
		margin-top: auto;
	}
}

/* SC Fix toggle/accordion formatting */
.elementor-toggle .elementor-tab-title,
.elementor-toggle .elementor-tab-title .fas,
.elementor-accordion .elementor-tab-title,
.elementor-accordion .elementor-tab-title .fas {
	line-height: inherit !important;
}

/* SC Fix toggle/accordion formatting on new line */
.elementor-toggle-title,
.elementor-accordion-title {
	display: flex;
	align-items: baseline;
}

/* SC Custom WooCommerce search form */
.sc-woocommerce-product-search-form .elementor-search-form__container {
	min-height: 50px;
	display: flex;
	transition: 0.2s;
	overflow: hidden;
	border: 0 solid transparent;
}
.sc-woocommerce-product-search-form .elementor-search-form__container input {
	padding-left: calc(50px / 3);
	padding-right: calc(50px / 3);
}
.sc-woocommerce-product-search-form
	.elementor-search-form__container
	:is(input:focus-visible, input:focus, button:focus) {
	outline: none;
}
.sc-woocommerce-product-search-form .elementor-search-form__container button {
	min-width: 50px;
	border: 0;
}

/* SC Disable table hover colour added by theme */
table tbody tr:hover > td,
table tbody tr:hover > th {
	background-color: unset !important;
}

/* SC TEMPORARY fixes the single post categories/tags not sitting on one line (looks fine in editor) */
.sc-post-cats-tags .elementor-icon-list-text {
	display: flex;
	flex-direction: row;
	gap: 5px;
	white-space: nowrap;
}

/* SC Remove social icon hover transparency */
.elementor-social-icon:hover {
	opacity: 1;
}

/* SC Hover animation on tiles */
.hover-post-tile:hover {
	top: -5px;
	transition: all 0.2s ease-in-out;
}
.hover-post-tile {
	transition: all 0.2s ease-in-out !important;
	position: relative;
	top: 0px;
}

/* SC Hide Google Recaptcha badge */
.grecaptcha-badge {
	visibility: hidden;
}

/* SC Hide inset shadow on active form fields */
.elementor-field-group .elementor-field-textual:focus {
	box-shadow: none !important;
}

/* SC Fix links in lists that display as block/flex */
.elementor-widget .elementor-icon-list-item .elementor-icon-list-text a {
	display: inline !important;
}
