/* D4 Icon Box — base styles. Elementor's generated CSS (from the widget's
   responsive controls) supplies sizing, spacing, colour and the per-corner
   offset values; this file only sets up structure. */

.d4ib,
a.d4ib {
	position: relative;
	display: block;
	color: inherit;
	text-decoration: none;
}

a.d4ib:hover {
	color: inherit;
	text-decoration: none;
}

.d4ib-row {
	position: relative;
	display: flex;
	gap: 15px;
}

.d4ib-pos-top {
	flex-direction: column;
}

.d4ib-pos-left {
	flex-direction: row;
}

.d4ib-pos-right {
	flex-direction: row-reverse;
}

.d4ib-icon-wrap {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.d4ib-icon-wrap i {
	display: inline-block;
}

.d4ib-icon-wrap svg {
	display: block;
}

/* Inlined uploaded SVG icons (see render_icon_markup() in the widget) have
   their hardcoded fill/stroke colours rewritten to `currentColor`, element
   by element — so each part keeps whether it was filled, stroked or
   neither (an intentional `fill="none"` on a line icon is left alone), but
   all of it now follows the `color` this widget's Icon Colour control sets
   on .d4ca-icon-svg below. This is what makes an SVG's own lines
   recolourable, which an <img>-embedded SVG (Elementor's default render)
   can never be. */
.d4ib-icon-wrap svg.d4ca-icon-svg {
	color: inherit;
}

/* Stacked / Framed views get a padded container around the icon. */
.d4ib-view-stacked .d4ib-icon-wrap,
.d4ib-view-framed .d4ib-icon-wrap {
	padding: 0.5em;
	background-color: #f1f1f1;
}

.d4ib-view-framed .d4ib-icon-wrap {
	border: 3px solid currentColor;
	background-color: transparent;
}

.d4ib-shape-circle .d4ib-icon-wrap {
	border-radius: 50%;
}

.d4ib-shape-square .d4ib-icon-wrap {
	border-radius: 4px;
}

/* Custom position mode — the icon is pulled out of flow and pinned to a
   corner of the row, then nudged with the per-edge spacing controls. */
.d4ib-mode-custom .d4ib-row {
	position: relative;
}

.d4ib-mode-custom .d4ib-icon-wrap {
	position: absolute;
	z-index: 10;
}

.d4ib-anchor-top-left .d4ib-icon-wrap {
	top: 0;
	left: 0;
	right: auto;
	bottom: auto;
}

.d4ib-anchor-top-right .d4ib-icon-wrap {
	top: 0;
	right: 0;
	left: auto;
	bottom: auto;
}

.d4ib-anchor-bottom-left .d4ib-icon-wrap {
	bottom: 0;
	left: 0;
	top: auto;
	right: auto;
}

.d4ib-anchor-bottom-right .d4ib-icon-wrap {
	bottom: 0;
	right: 0;
	top: auto;
	left: auto;
}

.d4ib-mode-custom .d4ib-content {
	width: 100%;
}

.d4ib-content {
	min-width: 0;
}

.d4ib-title {
	margin: 0 0 10px;
}

.d4ib-title:last-child {
	margin-bottom: 0;
}

.d4ib-description {
	margin: 0;
}
