/*
 * Epicod Layout Builder: front-end rules the plugin owns, so themes don't
 * have to carry them.
 *
 * Border radius: templates/row.php and templates/column.php add
 * .elb-has-radius and --elb-radius-tl/-tr/-br/-bl on .row-wrapper / .column.
 * Desktop uses the values as set; at the themes' mobile breakpoint
 * (@screen-md, 1024px — where spacing halves too) every corner is halved.
 *
 * The class is repeated to outrank theme rules like `.page-section.row .column`
 * (0,3,0); this file loads after the theme stylesheet.
 */
.elb-has-radius.elb-has-radius.elb-has-radius {
	border-top-left-radius: var(--elb-radius-tl, 0px);
	border-top-right-radius: var(--elb-radius-tr, 0px);
	border-bottom-right-radius: var(--elb-radius-br, 0px);
	border-bottom-left-radius: var(--elb-radius-bl, 0px);
}

@media (max-width: 1024px) {
	.elb-has-radius.elb-has-radius.elb-has-radius {
		border-top-left-radius: calc(var(--elb-radius-tl, 0px) / 2);
		border-top-right-radius: calc(var(--elb-radius-tr, 0px) / 2);
		border-bottom-right-radius: calc(var(--elb-radius-br, 0px) / 2);
		border-bottom-left-radius: calc(var(--elb-radius-bl, 0px) / 2);
	}
}

/* Background overlay layer follows the box's corners. */
.elb-has-radius::before,
.elb-has-radius::after {
	border-radius: inherit;
}

/*
 * Visibility: rows, tabs sections and blocks set to hide on desktop or mobile
 * (templates add .elb-hide-desktop / .elb-hide-mobile). Same 1024px
 * breakpoint as the themes' mobile styles.
 */
@media (min-width: 1025px) {
	.elb-hide-desktop {
		display: none !important;
	}
}

@media (max-width: 1024px) {
	.elb-hide-mobile {
		display: none !important;
	}
}
