/*
 * What every widget shares.
 *
 * Classes the markup prints belong to their widget (`custom-<name>__…`), so
 * what the base prints alike is marked with an attribute.
 */

/*
 * The box Elementor stands a widget in is told its width, as Elementor tells
 * its own widgets: a flex item is measured before its width is settled.
 */
.e-con-inner > .custom-widget,
.e-con > .custom-widget {
	width: var(--container-widget-width, 100%);
	--flex-grow: var(--container-widget-flex-grow);
}

/*
 * A media slot is a box first: seen when empty, covered and centred by what
 * arrives. The widget's own class gives the box its size.
 */
[data-custom-media] {
	position: relative;
	overflow: hidden;
	background-color: #FFFFFF;
}

[data-custom-media] > img,
[data-custom-media] > video,
[data-custom-media] > iframe {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	object-fit: cover;
	object-position: center;
}

/*
 * A press keeps what it rests in when it is reached, held or pressed: its ink,
 * its ground, its edge and its shadow. A widget sets the resting values on the
 * custom properties; a state the design colours differently sets them again
 * under its own, heavier selector.
 */
[data-custom-press],
[data-custom-press]:hover,
[data-custom-press]:focus,
[data-custom-press]:focus-visible,
[data-custom-press]:active,
[data-custom-press]:visited {
	color: var(--custom-press-ink, inherit);
	background: var(--custom-press-ground, transparent);
	border-color: var(--custom-press-edge, currentColor);
	box-shadow: var(--custom-press-shadow, none);
	text-decoration: none;
}

/*
 * A field the browser fills in keeps the field's own ink, and its ground is
 * never repainted: the change of ground is told to take forever.
 */
[data-custom-field],
[data-custom-field]:-webkit-autofill,
[data-custom-field]:-webkit-autofill:hover,
[data-custom-field]:-webkit-autofill:focus,
[data-custom-field]:-webkit-autofill:active {
	-webkit-text-fill-color: var(--custom-field-ink, currentColor);
	transition: background-color 600000s 0s;
}
