/** RESET some of the css settings that are set by default in the browser **/
html,
body {
	min-width: var(--hi-min-width-screen);
}

html {
	overflow-x: hidden;
}

body {
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - var(--hi-height-wp-admin-bar));
	text-underline-offset: var(--hi-text-decoration-offset);
	text-decoration-thickness: var(--hi-text-decoration-thickness);

	& > main {
		position: relative;
		flex: 1;
	}
}

* {
	box-sizing: border-box;
}

/** TEXT **/
body p {
	margin: 0 0 var(--hi-spacing-paragraph);
}

body b,
body strong {
	font-weight: var(--hi-font-weight-body-bold);
}

body i {
	font-style: italic;
}

/* Links */
body a,
body a:focus,
body a:visited {
	cursor: pointer;
	color: var(--hi-color-text-link);
	text-decoration: var(--hi-text-decoration-link);
	text-underline-offset: var(--hi-text-decoration-offset-link, var(--hi-text-decoration-offset));
	text-decoration-thickness: var(--hi-text-decoration-thickness-link, var(--hi-text-decoration-thickness));

	&:not(.hi-disabled):not(:disabled) {
		&:hover,
		&:focus-visible {
			color: var(--hi-color-text-link-hover);
			text-decoration: var(--hi-text-decoration-link-hover);
			text-underline-offset: var(--hi-text-decoration-offset-link-hover, var(--hi-text-decoration-offset));
			text-decoration-thickness: var(--hi-text-decoration-thickness-link-hover, var(--hi-text-decoration-thickness));

			&:focus-visible {
				outline: var(--hi-outline-focus);
				outline-offset: var(--hi-outline-offset-focus);
			}
		}
		
		&:active {
			color: var(--hi-color-text-link-active);
			text-decoration: var(--hi-text-decoration-link-active);
			text-underline-offset: var(--hi-text-decoration-offset-link-active, var(--hi-text-decoration-offset));
			text-decoration-thickness: var(--hi-text-decoration-thickness-link-active, var(--hi-text-decoration-thickness));
		}
	}
}

/* Lists */
body ul,
body ol {
	margin: var(--hi-spacing-list) 0;
	padding: 0 0 0 var(--hi-spacing-list-marker);
	/** space for bullet/number **/
}

body li {
	margin: 0 0 var(--hi-spacing-list-item);
	padding: 0;
}

body ul {
	list-style: var(--hi-list-style-ul-1);

	& ul {
		list-style: var(--hi-list-style-ul-2);

		& ul {
			list-style: var(--hi-list-style-ul-3);
		}
	}
}

body ol {
	list-style: var(--hi-list-style-ol-1);

	& ol {
		list-style: var(--hi-list-style-ol-2);

		& ol {
			list-style: var(--hi-list-style-ol-3);
		}
	}
}

/* Labels */
body label,
body p:has( > label:first-child:last-child ) {
	display: inline-block;
	margin: 0 0 var(--hi-spacing-bottom-label);
	font-size: var(--hi-font-size-label);
	line-height: var(--hi-line-height-label);
	font-weight: var(--hi-font-weight-label);
	color: var(--hi-color-text-label);

	&:is(p) {
		display: block;
	}

	&:is(label):has( input),
	&:is(label):has( select),
	&:is(label):has( textarea) {
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		align-items: flex-start;
		gap: var(--hi-spacing-bottom-label);
		margin: var(--hi-spacing-vertical-input) 0;

		&:has( input[type="checkbox"]),
		&:has( input[type="radio"]) {
			flex-direction: row;
		}

		&:first-child {
			margin-top: 0;
		}
		&:last-child {
			margin-bottom: 0;
		}

		& input,
		& select,
		& textarea {
			margin: 0;
		}
	}

	&:is(p):has( input):not(:first-child),
	&:is(p):has( select):not(:first-child),
	&:is(p):has( textarea):not(:first-child) {
		margin-top: var(--hi-spacing-vertical-input)
	}
	&:is(p):has( input):not(:last-child),
	&:is(p):has( select):not(:last-child),
	&:is(p):has( textarea):not(:last-child) {
		margin-bottom: var(--hi-spacing-vertical-input)
	}
}

/* Titles */
body h1,
body .hi-h1 {
	display: block;
	margin: var(--hi-spacing-top-h1) 0 var(--hi-spacing-bottom-h1);
	padding: 0;

	color: var(--hi-color-text-h1);
	font-family: var(--hi-font-family-h1);
	font-weight: var(--hi-font-weight-h1);
	font-size: var(--hi-font-size-h1);
	line-height: var(--hi-line-height-h1);
	text-decoration: var(--hi-text-decoration-h1);
	text-underline-offset: var(--hi-text-decoration-offset-h1, var(--hi-text-decoration-offset));
	text-decoration-thickness: var(--hi-text-decoration-thickness-h1, var(--hi-text-decoration-thickness));

	& b,
	& strong {
		color: var(--hi-color-text-h1-bold);
		font-weight: var(--hi-font-weight-h1-bold);
	}
}

body h2,
body .hi-h2 {
	display: block;
	margin: var(--hi-spacing-top-h2) 0 var(--hi-spacing-bottom-h2);
	padding: 0;

	color: var(--hi-color-text-h2);
	font-family: var(--hi-font-family-h2);
	font-weight: var(--hi-font-weight-h2);
	font-size: var(--hi-font-size-h2);
	line-height: var(--hi-line-height-h2);
	text-decoration: var(--hi-text-decoration-h2);
	text-underline-offset: var(--hi-text-decoration-offset-h2, var(--hi-text-decoration-offset));
	text-decoration-thickness: var(--hi-text-decoration-thickness-h2, var(--hi-text-decoration-thickness));

	& b,
	& strong {
		color: var(--hi-color-text-h2-bold);
		font-weight: var(--hi-font-weight-h2-bold);
	}
}

body h3,
body .hi-h3 {
	display: block;
	margin: var(--hi-spacing-top-h3) 0 var(--hi-spacing-bottom-h3);
	padding: 0;

	color: var(--hi-color-text-h3);
	font-family: var(--hi-font-family-h3);
	font-weight: var(--hi-font-weight-h3);
	font-size: var(--hi-font-size-h3);
	line-height: var(--hi-line-height-h3);
	text-decoration: var(--hi-text-decoration-h3);
	text-underline-offset: var(--hi-text-decoration-offset-h3, var(--hi-text-decoration-offset));
	text-decoration-thickness: var(--hi-text-decoration-thickness-h3, var(--hi-text-decoration-thickness));

	& b,
	& strong {
		color: var(--hi-color-text-h3-bold);
		font-weight: var(--hi-font-weight-h3-bold);
	}
}

body h4,
body .hi-h4 {
	display: block;
	margin: var(--hi-spacing-top-h4) 0 var(--hi-spacing-bottom-h4);
	padding: 0;

	color: var(--hi-color-text-h4);
	font-family: var(--hi-font-family-h4);
	font-weight: var(--hi-font-weight-h4);
	font-size: var(--hi-font-size-h4);
	line-height: var(--hi-line-height-h4);
	text-decoration: var(--hi-text-decoration-h4);
	text-underline-offset: var(--hi-text-decoration-offset-h4, var(--hi-text-decoration-offset));
	text-decoration-thickness: var(--hi-text-decoration-thickness-h4, var(--hi-text-decoration-thickness));

	& b,
	& strong {
		color: var(--hi-color-text-h4-bold);
		font-weight: var(--hi-font-weight-h4-bold);
	}
}

body h5,
body .hi-h5 {
	display: block;
	margin: var(--hi-spacing-top-h5) 0 var(--hi-spacing-bottom-h5);
	padding: 0;

	color: var(--hi-color-text-h5);
	font-family: var(--hi-font-family-h5);
	font-weight: var(--hi-font-weight-h5);
	font-size: var(--hi-font-size-h5);
	line-height: var(--hi-line-height-h5);
	text-decoration: var(--hi-text-decoration-h5);
	text-underline-offset: var(--hi-text-decoration-offset-h5, var(--hi-text-decoration-offset));
	text-decoration-thickness: var(--hi-text-decoration-thickness-h5, var(--hi-text-decoration-thickness));

	& b,
	& strong {
		color: var(--hi-color-text-h5-bold);
		font-weight: var(--hi-font-weight-h5-bold);
	}
}

body h6,
body .hi-h6 {
	display: block;
	margin: var(--hi-spacing-top-h6) 0 var(--hi-spacing-bottom-h6);
	padding: 0;

	color: var(--hi-color-text-h6);
	font-family: var(--hi-font-family-h6);
	font-weight: var(--hi-font-weight-h6);
	font-size: var(--hi-font-size-h6);
	line-height: var(--hi-line-height-h6);
	text-decoration: var(--hi-text-decoration-h6);
	text-underline-offset: var(--hi-text-decoration-offset-h6, var(--hi-text-decoration-offset));
	text-decoration-thickness: var(--hi-text-decoration-thickness-h6, var(--hi-text-decoration-thickness));

	& b,
	& strong {
		color: var(--hi-color-text-h6-bold);
		font-weight: var(--hi-font-weight-h6-bold);
	}
}

/* Blockquote (cite) */
body blockquote {
	margin-left: 0;
	margin-right: 0;
}
/** END TEXT **/

/** INPUTS **/
body input:not([type="image"], [type="range"], [type="checkbox"], [type="radio"], [type="button"]),
body select,
body textarea {
	width: 100%;
	max-width: 100%;
	min-width: var(--hi-min-width-input);
	height: var(--hi-height-input);
	margin: var(--hi-spacing-vertical-input) 0;
	padding: 0 var(--hi-padding-horizontal-input);

	font-size: var(--hi-font-size-input);
	font-weight: var(--hi-font-weight-input);
	line-height: var(--hi-height-input);

	color: var(--hi-color-text-input);
	background-color: var(--hi-color-background-input);

	border-width: var(--hi-border-width-input);
	border-style: var(--hi-border-style-input);
	border-color: var(--hi-color-border-input);
	border-radius: var(--hi-border-radius-input);

	opacity: var(--hi-opacity-input);
	transition: var(--hi-transition-input);

	&:is(textarea) {
		height: var(--hi-height-textarea);
		min-height: var(--hi-height-input);
	}

	&:is(select) {
		-moz-appearance: none;
		-webkit-appearance: none;
		appearance: none;

		cursor: pointer;

		padding-right: calc( var(--hi-size-icon-m) + var(--hi-padding-horizontal-input)*2 );
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='180 -360 600 1200'%3E%3Cpath d='M1015 10q-10-10-23-10t-23 10L512 492 55 10Q45 0 32 0T9 10Q0 20 0 34t9 24l480 506q10 10 23 10t23-10l480-506q9-10 9-24t-9-24z'%20fill%3D%27slategray%27/%3E%3C/svg%3E");
		background-size: var(--hi-size-icon-m);
		background-repeat: no-repeat;
		background-position: calc( 100% - var(--hi-padding-horizontal-input) ) center;
		
		/* For IE10 */
		&::-ms-expand {
			display: none;
		}
		& optgroup {
			font-weight: var(--hi-font-weight-optgroup);
			color: var(--hi-color-text-optgroup);
			background-color: var(--hi-color-background-optgroup);
		}
		& option {
			cursor: pointer;
			
			text-indent: 0;
			color: var(--hi-color-text-option);
			background-color: var(--hi-color-background-option);
		}
	}

	&:not(.hi-disabled):not(:disabled) {
		&:hover,
		&:focus-visible {
			color: var(--hi-color-text-input-hover);
			background-color: var(--hi-color-background-input-hover);
			border-color: var(--hi-color-border-input-hover);
			opacity: var(--hi-opacity-input-hover);

			&:focus-visible {
				outline: var(--hi-outline-focus);
				outline-offset: var(--hi-outline-offset-focus);
			}
		}

		&:active {
			color: var(--hi-color-text-input-active);
			background-color: var(--hi-color-background-input-active);
			border-color: var(--hi-color-border-input-active);
			opacity: var(--hi-opacity-input-active);
		}
	}
	
	&.hi-disabled,
	&:disabled {
		color: var(--hi-color-text-input-disabled);
		background-color: var(--hi-color-background-input-disabled);
		border-color: var(--hi-color-border-input-disabled);
		opacity: var(--hi-opacity-input-disabled);
	}

	&:first-child {
		margin-top: 0;
	}

	&:last-child {
		margin-bottom: 0;
	}
}
/* Checkbox and Radio */
body input[type="checkbox"],
body input[type="radio"] {
	min-height: calc(var(--hi-font-size-label) * var(--hi-line-height-label));
}
/* Input group */
body fieldset,
body fieldset > p:first-child:last-child {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	width: 100%;
	
	row-gap: var(--hi-spacing-vertical-input);
	column-gap: var(--hi-spacing-horizontal-input);
	margin: var(--hi-spacing-vertical-input) 0;
	padding: var(--hi-padding-vertical-fieldset-inputs) var(--hi-padding-horizontal-fieldset-inputs);
	
	background-color: var(--hi-color-background-fieldset-inputs);

	border-width: var(--hi-border-width-fieldset-inputs);
	border-style: var(--hi-border-style-fieldset-inputs);
	border-color: var(--hi-color-border-fieldset-inputs);
	border-radius: var(--hi-border-radius-fieldset-inputs);
		
	& > *,
	& > label:has(input),
	& > label:has(select),
	& > label:has(textarea) {
		width: 100%;
		margin: 0 !important;
		padding: 0;
	}

	&:is(p:first-child:last-child) > br { /* for contact form 7 */
		display: none;
	}
}
/** END INPUTS **/

/** BUTTONS **/
body button,
body button:focus,
body button:visited,
body button:active,
body input[type="button"],
body input[type="button"]:focus,
body input[type="button"]:visited,
body input[type="button"]:active,
body input[type="submit"],
body input[type="submit"]:focus,
body input[type="submit"]:visited,
body input[type="submit"]:active,
body .wp-element-button,
body .wp-element-button:focus,
body .wp-element-button:visited,
body .wp-element-button:active,
body .wp-element-button > a:first-child:last-child {
	cursor: pointer;
	min-width: var(--hi-min-width-button);
	height: auto;
	min-height: var(--hi-min-height-button);
	display: flex;
	align-items: center;
	justify-content: center;
	word-break: keep-all;

	gap: var(--hi-spacing-icon-button-icon);
	margin: var(--hi-spacing-vertical-button) 0;
	padding: var(--hi-padding-vertical-button) var(--hi-padding-horizontal-button);

	font-size: var(--hi-font-size-button);
	font-weight: var(--hi-font-weight-button);
	line-height: var(--hi-line-height-button);
	text-decoration: var(--hi-text-decoration-button);
	text-underline-offset: var(--hi-text-decoration-offset-button, var(--hi-text-decoration-offset));
	text-decoration-thickness: var(--hi-text-decoration-thickness-button, var(--hi-text-decoration-thickness));

	color: var(--hi-color-text-button);
	background-color: var(--hi-color-background-button);

	border-style: var(--hi-border-style-button);
	border-width: var(--hi-border-width-button);
	border-color: var(--hi-color-border-button);
	border-radius: var(--hi-border-radius-button);

	opacity: var(--hi-opacity-button);
	transition: opacity var(--hi-transition-time-button);

	&.wp-element-button:has(> a:first-child:last-child) {
		padding: 0;
		border: none;

		& > a:first-child:last-child {
			width: 100%;
			margin: 0;
		}
	}

	&:not(.hi-disabled):not(:disabled) {
		&:hover,
		&:focus-visible {
			text-decoration: var(--hi-text-decoration-button-hover);
			text-underline-offset: var(--hi-text-decoration-offset-button-hover, var(--hi-text-decoration-offset));
			text-decoration-thickness: var(--hi-text-decoration-thickness-button-hover, var(--hi-text-decoration-thickness));

			color: var(--hi-color-text-button-hover);
			background-color: var(--hi-color-background-button-hover);
			border-color: var(--hi-color-border-button-hover);
			opacity: var(--hi-opacity-button-hover);

			&:focus-visible {
				outline: var(--hi-outline-focus);
				outline-offset: var(--hi-outline-offset-focus);
			}
		}

		&:active {
			text-decoration: var(--hi-text-decoration-button-active);
			text-underline-offset: var(--hi-text-decoration-offset-button-active, var(--hi-text-decoration-offset));
			text-decoration-thickness: var(--hi-text-decoration-thickness-button-active, var(--hi-text-decoration-thickness));

			color: var(--hi-color-text-button-active);
			background-color: var(--hi-color-background-button-active);
			border-color: var(--hi-color-border-button-active);
			opacity: var(--hi-opacity-button-active);
		}
	}

	&:first-child {
		margin-top: 0;
	}

	&:last-child {
		margin-bottom: 0;
	}
}

/* Outline buttons style*/
body button.is-style-outline,
body button.is-style-outline:focus,
body button.is-style-outline:visited,
body input[type="button"].is-style-outline,
body input[type="button"].is-style-outline:focus,
body input[type="button"].is-style-outline:visited,
body input[type="submit"].is-style-outline,
body input[type="submit"].is-style-outline:focus,
body input[type="submit"].is-style-outline:visited,
body .wp-element-button.is-style-outline,
body .wp-element-button.is-style-outline:focus,
body .wp-element-button.is-style-outline:visited,
body .wp-block-button.is-style-outline .wp-element-button,
body .wp-block-button.is-style-outline .wp-element-button:focus,
body .wp-block-button.is-style-outline .wp-element-button:visited {
	--hi-text-decoration-button: var(--hi-text-decoration-button-outline);
	--hi-color-text-button: var(--hi-color-text-button-outline);
	--hi-color-background-button: var(--hi-color-background-button-outline);
	--hi-color-border-button: var(--hi-color-border-button-outline);

	/* on hover */
	--hi-text-decoration-button-hover: var(--hi-text-decoration-button-outline-hover);
	--hi-color-text-button-hover: var(--hi-color-text-button-outline-hover);
	--hi-color-background-button-hover: var(--hi-color-background-button-outline-hover);
	--hi-color-border-button-hover: var(--hi-color-border-button-outline-hover);
}

/* Icon buttons style*/
body button.hi-button-icon,
body button.hi-button-icon:hover,
body button.hi-button-icon:focus,
body button.hi-button-icon:visited,
body button.hi-button-icon:active,
body button:has( > svg:first-child:last-child),
body button:has( > svg:first-child:last-child):hover,
body button:has( > svg:first-child:last-child):focus,
body button:has( > svg:first-child:last-child):visited,
body button:has( > svg:first-child:last-child):active,
body input[type="button"].hi-button-icon,
body input[type="button"].hi-button-icon:hover,
body input[type="button"].hi-button-icon:focus,
body input[type="button"].hi-button-icon:visited,
body input[type="button"].hi-button-icon:active,
body input[type="button"]:has( > svg:first-child:last-child),
body input[type="button"]:has( > svg:first-child:last-child):hover,
body input[type="button"]:has( > svg:first-child:last-child):focus,
body input[type="button"]:has( > svg:first-child:last-child):visited,
body input[type="button"]:has( > svg:first-child:last-child):active,
body input[type="submit"].hi-button-icon,
body input[type="submit"].hi-button-icon:hover,
body input[type="submit"].hi-button-icon:focus,
body input[type="submit"].hi-button-icon:visited,
body input[type="submit"].hi-button-icon:active,
body input[type="submit"]:has( > svg:first-child:last-child),
body input[type="submit"]:has( > svg:first-child:last-child):hover,
body input[type="submit"]:has( > svg:first-child:last-child):focus,
body input[type="submit"]:has( > svg:first-child:last-child):visited,
body input[type="submit"]:has( > svg:first-child:last-child):active,
body .wp-element-button.hi-button-icon,
body .wp-element-button.hi-button-icon:hover,
body .wp-element-button.hi-button-icon:focus,
body .wp-element-button.hi-button-icon:visited,
body .wp-element-button.hi-button-icon:active,
body .wp-block-button.hi-button-icon .wp-element-button,
body .wp-block-button.hi-button-icon .wp-element-button:hover,
body .wp-block-button.hi-button-icon .wp-element-button:focus,
body .wp-block-button.hi-button-icon .wp-element-button:visited,
body .wp-block-button.hi-button-icon .wp-element-button:active,
body .wp-element-button:has( > svg:first-child:last-child),
body .wp-element-button:has( > svg:first-child:last-child):hover,
body .wp-element-button:has( > svg:first-child:last-child):focus,
body .wp-element-button:has( > svg:first-child:last-child):visited,
body .wp-element-button:has( > svg:first-child:last-child):active {
	/* set size */
	width: var(--hi-size-button-icon);
	height: var(--hi-size-button-icon);
	padding: 0;

	/* remove text */
	--hi-font-size-button: 0;
	--hi-line-height-button: 0;
	--hi-color-text-button: transparent;
	--hi-text-decoration-button: none;

	/* change background and border */
	--hi-color-background-button: var(--hi-color-background-button-icon);
	--hi-color-border-button: var(--hi-color-border-button-icon);

	/* on hover */
	--hi-text-decoration-button-hover: none;
	--hi-color-text-button-hover: transparent;
	--hi-color-background-button-hover: var(--hi-color-background-button-icon-hover);
	--hi-color-border-button-hover: var(--hi-color-border-button-icon-hover);
	
	/* on active */
	--hi-text-decoration-button-active: none;
	--hi-color-text-button-active: transparent;
	--hi-color-background-button-active: var(--hi-color-background-button-icon-active);
	--hi-color-border-button-active: var(--hi-color-border-button-icon-active);

	& i,
	& svg,
	& .hi-icon,
	&::before,
	&::after {
		display: flex;
		justify-content: center;
		align-items: center;

		width: var(--hi-size-icon-button-icon);
		height: var(--hi-size-icon-button-icon);
		margin: auto;
		padding: 0;

		font-size: var(--hi-size-icon-button-icon);
		line-height: var(--hi-size-icon-button-icon);
		color: var(--hi-color-icon-button-icon);
	}

	&:not(:disabled):not(.hi-disabled):hover,
	&:not(:disabled):not(.hi-disabled):focus-visible {
		--hi-color-icon-button-icon: var(--hi-color-icon-button-icon-hover);
	}
	&:not(:disabled):not(.hi-disabled):active {
		--hi-color-icon-button-icon: var(--hi-color-icon-button-icon-active);
	}
}

/* Button group */
body .wp-block-buttons {
	margin-block: var(--hi-spacing-vertical-button);

	flex-wrap: wrap;
	align-items: stretch;
	row-gap: var(--hi-padding-vertical-block-buttons);
	column-gap: var(--hi-padding-horizontal-block-buttons);

	& .wp-element-button,
	&:first-child {
		margin-top: 0;
	}

	& .wp-element-button,
	&:last-child {
		margin-bottom: 0;
	}

}

/** END BUTTONS **/

/** CAPTIONS **/
body figcaption,
body .blocks-gallery-caption,
body .wp-element-caption {
	display: block;
	margin: var(--hi-spacing-caption) 0 0;
	padding: 0;

	color: var(--hi-color-caption);
	font-family: var(--hi-font-family-caption);
	font-weight: var(--hi-font-weight-caption);
	font-size: var(--hi-font-size-caption);
	line-height: var(--hi-line-height-caption);
	font-style: var(--hi-font-style-caption);

	text-decoration: var(--hi-text-decoration-caption);
	text-underline-offset: var(--hi-text-decoration-offset-caption, var(--hi-text-decoration-offset));
	text-decoration-thickness: var(--hi-text-decoration-thickness-caption, var(--hi-text-decoration-thickness));
	text-shadow: none;

	& strong,
	& b {
		color: var(--hi-color-text-caption-bold);
		font-weight: var(--hi-font-weight-caption-bold);
	}

	& a,
	& a:focus,
	& a:visited {
		color: var(--hi-color-text-caption-link);
		text-decoration: var(--hi-text-decoration-caption-link);
		text-underline-offset: var(--hi-text-decoration-offset-caption-link, var(--hi-text-decoration-offset));
		text-decoration-thickness: var(--hi-text-decoration-thickness-caption-link, var(--hi-text-decoration-thickness));

		&:hover,
		&:focus-visible {
			color: var(--hi-color-text-caption-link-hover);
			text-decoration: var(--hi-text-decoration-caption-link-hover);
			text-underline-offset: var(--hi-text-decoration-offset-caption-link-hover, var(--hi-text-decoration-offset));
			text-decoration-thickness: var(--hi-text-decoration-thickness-caption-link-hover, var(--hi-text-decoration-thickness));
		}
		&:active {
			color: var(--hi-color-text-caption-link-active);
			text-decoration: var(--hi-text-decoration-caption-link-active);
			text-underline-offset: var(--hi-text-decoration-offset-caption-link-active, var(--hi-text-decoration-offset));
			text-decoration-thickness: var(--hi-text-decoration-thickness-caption-link-active, var(--hi-text-decoration-thickness));
		}
	}
}

/** END CAPTIONS **/

/** BLOCK QUOTES **/
body blockquote,
body .wp-block-quote {
	display: block;
	margin: 0;
	padding: var(--hi-padding-quote);

	color: var(--hi-color-quote);
	font-family: var(--hi-font-family-quote);
	font-weight: var(--hi-font-weight-quote);
	font-size: var(--hi-font-size-quote);
	line-height: var(--hi-line-height-quote);
	font-style: var(--hi-font-style-quote);
	text-decoration: var(--hi-text-decoration-quote);
	text-underline-offset: var(--hi-text-decoration-offset-quote, var(--hi-text-decoration-offset));
	text-decoration-thickness: var(--hi-text-decoration-thickness-quote, var(--hi-text-decoration-thickness));
	
	background-color: var(--hi-color-background-quote);

	border-radius: var(--hi-border-radius-quote);
	border-width: var(--hi-border-width-quote);
	border-style: var(--hi-border-style-quote);
	border-color: var(--hi-color-border-quote);

	& strong,
	& b {
		color: var(--hi-color-text-quote-bold);
		font-weight: var(--hi-font-weight-quote-bold);
	}

	& a,
	& a:focus,
	& a:visited {
		color: var(--hi-color-text-quote-link);
		text-decoration: var(--hi-text-decoration-quote-link);
		text-underline-offset: var(--hi-text-decoration-offset-quote-link, var(--hi-text-decoration-offset));
		text-decoration-thickness: var(--hi-text-decoration-thickness-quote-link, var(--hi-text-decoration-thickness));

		&:hover,
		&:focus-visible {
			color: var(--hi-color-text-quote-link-hover);
			text-decoration: var(--hi-text-decoration-quote-link-hover);
			text-underline-offset: var(--hi-text-decoration-offset-quote-link-hover, var(--hi-text-decoration-offset));
			text-decoration-thickness: var(--hi-text-decoration-thickness-quote-link-hover, var(--hi-text-decoration-thickness));
		}

		&:active {
			color: var(--hi-color-text-quote-link-active);
			text-decoration: var(--hi-text-decoration-quote-link-active);
			text-underline-offset: var(--hi-text-decoration-offset-quote-link-active, var(--hi-text-decoration-offset));
			text-decoration-thickness: var(--hi-text-decoration-thickness-quote-link-active, var(--hi-text-decoration-thickness));
		}
	}

	& cite {
		color: var(--hi-color-quote-cite);
		font-family: var(--hi-font-family-quote-cite);
		font-weight: var(--hi-font-weight-quote-cite);
		font-size: var(--hi-font-size-quote-cite);
		line-height: var(--hi-line-height-quote-cite);
		font-style: var(--hi-font-style-quote-cite);
		text-decoration: var(--hi-text-decoration-quote-cite);
		text-underline-offset: var(--hi-text-decoration-offset-quote-cite, var(--hi-text-decoration-offset));
		text-decoration-thickness: var(--hi-text-decoration-thickness-quote-cite, var(--hi-text-decoration-thickness));
	}
}
/** END BLOCK QUOTES **/

/** CODE **/
body pre,
body .wp-block-preformatted,
body kbd,
body code,
body .wp-block-code,
body .wp-block-code code {
	unicode-bidi: isolate;
	overflow-wrap: break-word;
	white-space: pre-wrap;

	font-family: var(--hi-font-family-code);
	font-weight: var(--hi-font-weight-code);
	font-size: var(--hi-font-size-code);
	line-height: var(--hi-line-height-code);
	text-decoration: var(--hi-text-decoration-code);
	text-underline-offset: var(--hi-text-decoration-offset-code, var(--hi-text-decoration-offset));
	text-decoration-thickness: var(--hi-text-decoration-thickness-code, var(--hi-text-decoration-thickness));

	&.wp-block-code {
		text-align: center;

		& code {
			text-align: left;
		}
	}

	&:not(.wp-block-code):not(:is(code)):not(:is(kbd)) {
		display: block;
		margin: var(--hi-spacing-code) auto;

		&:first-child {
			margin-top: 0;
		}

		&:last-child {
			margin-top: 0;
		}
	}

	&:last-child {
		margin-bottom: 0;
	}

	& b,
	& strong {
		font-weight: var(--hi-font-weight-code-bold);
	}
}
/** END CODE **/

/** SEPARATOR **/
body hr,
body .wp-block-separator {
	width: 100%;
	max-width: min(100%, calc(var(--wp--style--global--content-size) - var(--hi-spacing-horizontal-screen)*2));
	margin: var(--hi-padding-vertical-block-buttons) auto;
	padding: 0;
	
	border-width: var(--hi-border-width-separator);
	border-style: var(--hi-border-style-separator);
	border-color: var(--hi-color-border-separator);

	&.is-style-wide {
		border-width: var(--hi-border-width-separator-wide);
		border-style: var(--hi-border-style-separator-wide);
		border-color: var(--hi-color-border-separator-wide);
	}
	
	/*
	&.is-style-dots.alignwide::before {
		letter-spacing: 5em;
		padding-left: 5em;
	}
	&.is-style-dots.alignfull::before {
		letter-spacing: 10em;
		padding-left: 10em;
	}
	*/
}
/** END SEPARATOR **/

/** IMAGES **/
body figure,
body img,
body figcaption {
	max-width: 100%;
	height: auto;
	border: none;
	margin: 0;
	padding: 0;

	&:focus-visible {
		outline: var(--hi-outline-focus);
		outline-offset: var(--hi-outline-offset-focus);
	}
}
body iframe {
	max-width: 100%;
	border: none;
	margin: 0;
	padding: 0;

	&:focus-visible {
		outline: var(--hi-outline-focus);
		outline-offset: var(--hi-outline-offset-focus);
	}
}

body figcaption {
	font-size: var(--hi-font-size-caption);
	line-height: var(--hi-line-height-caption);
	text-shadow: none;
}

/** END IMAGES **/

/** AUDIO **/
body audio,
body .wp-block-audio audio {
	width: 100%;
	min-width: var(--hi-min-width-audio);
	height: var(--hi-height-audio);
}
/** END AUDIO **/

/** TABLES **/
body table,
body .wp-block-table {
	margin: 0;
	padding: 0;
	border: none;

	& thead,
	& tbody,
	& tfoot,
	& tr {
		margin: 0;
		padding: 0;
		border: none;
	}

	& th,
	& td {
		margin: 0;
		padding: var(--hi-padding-vertical-table) var(--hi-padding-horizontal-table);

		color: var(--hi-color-text-table);
		background-color: var(--hi-color-background-table);
		border: var(--hi-border-table);

		&:is(th) {
			color: var(--hi-color-text-table-th);
			font-family: var(--hi-font-family-table-th);
			font-weight: var(--hi-font-weight-table-th);
			font-size: var(--hi-font-size-table-th);
			line-height: var(--hi-line-height-table-th);
			text-decoration: var(--hi-text-decoration-table-th);
			text-underline-offset: var(--hi-text-decoration-offset-table-th, var(--hi-text-decoration-offset));
			text-decoration-thickness: var(--hi-text-decoration-thickness-table-th, var(--hi-text-decoration-thickness));

			background-color: var(--hi-color-background-table-th);

			& b,
			& strong {
				color: var(--hi-color-text-table-th-bold);
				font-weight: var(--hi-font-weight-table-th-bold);
			}
		}
	}

	& thead tr th {
		border-bottom: var(--hi-border-table-th);
	}

	& tbody tr th:first-child {
		border-right: var(--hi-border-table-th);
	}

	& tbody tr th:last-child {
		border-left: var(--hi-border-table-th);
	}

	& tfoot td,
	& tfoot th {
		color: var(--hi-color-text-table-tfoot);
		font-family: var(--hi-font-family-table-tfoot);
		font-weight: var(--hi-font-weight-table-tfoot);
		font-size: var(--hi-font-size-table-tfoot);
		line-height: var(--hi-line-height-table-tfoot);
		text-decoration: var(--hi-text-decoration-table-tfoot);
		text-underline-offset: var(--hi-text-decoration-offset-table-tfoot, var(--hi-text-decoration-offset));
		text-decoration-thickness: var(--hi-text-decoration-thickness-table-tfoot, var(--hi-text-decoration-thickness));

		background-color: var(--hi-color-background-table-tfoot);
		border-top: var(--hi-border-table-tfoot);

		& b,
		& strong {
			color: var(--hi-color-text-table-tfoot-bold);
			font-weight: var(--hi-font-weight-table-tfoot-bold);
		}

		&:is(th) {
			color: var(--hi-color-text-table-th);
			font-weight: var(--hi-font-weight-table-th);
			background-color: var(--hi-color-background-table-th);

			& b,
			& strong {
				color: var(--hi-color-text-table-th-bold);
				font-weight: var(--hi-font-weight-table-th-bold);
			}
		}
	}

	&.is-style-stripes tbody tr:nth-child(odd) {
		background-color: var(--hi-color-background-table-stripes);

		& th,
		& td {
			background-color: transparent;
		}
	}

	/* Change font size using wordpress class */
	&.has-body-xs-font-size {
		/* Header and th cells */
		--hi-font-size-table-th: var(--hi-font-size-has-body-xs-table-th);
		--hi-line-height-table-th: var(--hi-line-height-has-body-xs-table-th);
		/* Footer */
		--hi-font-size-table-tfoot: var(--hi-font-size-has-body-xs-table-tfoot);
		--hi-line-height-table-tfoot: var(--hi-line-height-has-body-xs-table-tfoot);
	}

	&.has-body-s-font-size {
		/* Header and th cells */
		--hi-font-size-table-th: var(--hi-font-size-has-body-s-table-th);
		--hi-line-height-table-th: var(--hi-line-height-has-body-s-table-th);
		/* Footer */
		--hi-font-size-table-tfoot: var(--hi-font-size-has-body-s-table-tfoot);
		--hi-line-height-table-tfoot: var(--hi-line-height-has-body-s-table-tfoot);
	}

	&.has-body-l-font-size {
		/* Header and th cells */
		--hi-font-size-table-th: var(--hi-font-size-has-body-l-table-th);
		--hi-line-height-table-th: var(--hi-line-height-has-body-l-table-th);
		/* Footer */
		--hi-font-size-table-tfoot: var(--hi-font-size-has-body-l-table-tfoot);
		--hi-line-height-table-tfoot: var(--hi-line-height-has-body-l-table-tfoot);
	}

	&.has-body-xl-font-size {
		/* Header and th cells */
		--hi-font-size-table-th: var(--hi-font-size-has-body-xl-table-th);
		--hi-line-height-table-th: var(--hi-line-height-has-body-xl-table-th);
		/* Footer */
		--hi-font-size-table-tfoot: var(--hi-font-size-has-body-xl-table-tfoot);
		--hi-line-height-table-tfoot: var(--hi-line-height-has-body-xl-table-tfoot);
	}
}

/** END TABLES **/

/** REMOVE TOP MARGINS **/
/* TOP when is the first element */
body h1:first-child,
body .hi-h1:first-child,
body h2:first-child,
body .hi-h2:first-child,
body h3:first-child,
body .hi-h3:first-child,
body h4:first-child,
body .hi-h4:first-child,
body h5:first-child,
body .hi-h5:first-child,
body h6:first-child,
body .hi-h6:first-child,
body p:first-child,
body ul:first-child,
body ol:first-child,
body li:first-child,
body blockquote:first-child,
body figure:first-child {
	margin-top: 0;
}

body li > ul:first-child,
body li > ol:first-child {
	margin-top: var(--hi-spacing-list-item);
}

/* BOTTOM when is the last element */
body h1:last-child,
body .hi-h1:last-child,
body h2:last-child,
body .hi-h2:last-child,
body h3:last-child,
body .hi-h3:last-child,
body h4:last-child,
body .hi-h4:last-child,
body h5:last-child,
body .hi-h5:last-child,
body h6:last-child,
body .hi-h6:last-child,
body p:last-child,
body ul:last-child,
body ol:last-child,
body li:last-child,
body blockquote:last-child,
body figure:last-child {
	margin-bottom: 0;
}

body li:not(:last-child) > ul:last-child,
body li:not(:last-child) > ol:last-child {
	margin-top: var(--hi-spacing-list-item);
}

/** END REMOVE MARGINS **/

/** WORDPRESS UPDATE **/
.wp-block-cover,
.wp-block-cover-image {
    align-items: center;
    background-position: 50%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    min-height: 430px;
    overflow: hidden;
    overflow: clip;
    padding: 1em;
    position: relative;
}
.wp-block-cover .wp-block-cover__image-background,
.wp-block-cover video.wp-block-cover__video-background,
.wp-block-cover-image .wp-block-cover__image-background,
.wp-block-cover-image video.wp-block-cover__video-background {
    border: none;
    bottom: 0;
    box-shadow: none;
    height: 100%;
    left: 0;
    margin: 0;
    max-height: none;
    max-width: none;
    object-fit: cover;
    outline: none;
    padding: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
}
body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__image-background,
body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__video-background {
    z-index: 0;
}
body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__background,
body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__gradient-background,
body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__inner-container,
body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)).has-background-dim:not(.has-background-gradient):before {
    z-index: 1;
}
/** END WORDPRESS UPDATE **/