/**
 * Image Attribution — front-end styles.
 */

/* --------------------------------------------------------------------------
 * Wrapper around the image
 * ---------------------------------------------------------------------- */
.iab-wrap {
	position: relative;
	display: inline-block;
	max-width: 100%;
	line-height: 0;
}

.iab-wrap > img,
.iab-wrap > a > img,
.iab-wrap > figure {
	max-width: 100%;
	height: auto;
}

.iab-wrap.alignleft {
	float: left;
	margin-right: 1em;
}

.iab-wrap.alignright {
	float: right;
	margin-left: 1em;
}

.iab-wrap.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

/* Divi Image module: match the <img>'s own box so the module keeps its
   sizing / alignment, and sit above Divi's resting-state image overlay. */
.iab-wrap--divi {
	line-height: 0;
}

.iab-wrap--divi > img {
	display: block;
}

.iab-wrap--divi .iab-attribution {
	z-index: 11;
}

/* --------------------------------------------------------------------------
 * The overlay box
 * ---------------------------------------------------------------------- */
.iab-attribution {
	position: absolute;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	max-width: calc(100% - 12px);
	margin: 6px;
	padding: 3px 7px;
	border-radius: 3px;
	background: rgba(0, 0, 0, 0.62);
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.35;
	text-align: left;
	text-shadow: none;
	pointer-events: auto;
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.iab-pos-bottom-left  { left: 0;  bottom: 0; }
.iab-pos-bottom-right { right: 0; bottom: 0; }
.iab-pos-top-left     { left: 0;  top: 0; }
.iab-pos-top-right    { right: 0; top: 0; }

.iab-attribution a {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.iab-attribution a:hover,
.iab-attribution a:focus {
	text-decoration: none;
}

.iab-attribution__prefix {
	opacity: 0.9;
}

.iab-attribution__license {
	opacity: 0.85;
	white-space: nowrap;
}

.iab-attribution__credit + .iab-attribution__license::before {
	content: "·";
	margin-right: 0.35em;
	opacity: 0.7;
}

/* Text container — truncates in compact mode, expands on interaction */
.iab-attribution__inner {
	display: inline-block;
	overflow: hidden;
	max-width: 46vw;
	white-space: nowrap;
	text-overflow: ellipsis;
	vertical-align: middle;
}

.iab-style-compact:not(.is-open):not(:hover):not(:focus-within) .iab-attribution__inner {
	max-width: 160px;
}

.iab-attribution.is-open .iab-attribution__inner,
.iab-attribution:hover .iab-attribution__inner,
.iab-attribution:focus-within .iab-attribution__inner {
	max-width: 70vw;
	white-space: normal;
}

/* Toggle button — only used on touch devices */
.iab-attribution__toggle {
	display: none;
	flex: 0 0 auto;
	width: 15px;
	height: 15px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
	font: italic 700 11px/15px Georgia, "Times New Roman", serif;
	text-align: center;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

@media (hover: none) and (pointer: coarse) {
	.iab-style-compact .iab-attribution__toggle {
		display: inline-block;
	}

	.iab-style-compact:not(.is-open) .iab-attribution__inner {
		display: none;
	}
}

/* --------------------------------------------------------------------------
 * Inline attribution (shortcode / template tag, no positioning)
 * ---------------------------------------------------------------------- */
.iab-inline-attribution {
	display: inline-block;
	font-size: 0.8em;
	line-height: 1.4;
	opacity: 0.75;
}

.iab-inline-attribution .iab-attribution__license::before {
	content: "·";
	margin: 0 0.35em;
	opacity: 0.6;
}

/* --------------------------------------------------------------------------
 * Footer fallback list
 * ---------------------------------------------------------------------- */
.iab-footer {
	clear: both;
	margin: 2rem 0 0;
	padding: 1rem 0;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
	font-size: 13px;
	line-height: 1.5;
}

.iab-footer__heading {
	margin: 0 0 0.5rem;
	font-size: 14px;
	font-weight: 600;
}

.iab-footer__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.iab-footer__item {
	margin: 0 0 0.25rem;
	padding: 0;
}

.iab-footer__item .iab-attribution__prefix {
	opacity: 0.8;
}

.iab-footer__item .iab-attribution__credit + .iab-attribution__license::before {
	content: "·";
	margin: 0 0.35em;
	opacity: 0.6;
}

/* --------------------------------------------------------------------------
 * Print — show full credits and the footer list
 * ---------------------------------------------------------------------- */
@media print {
	.iab-attribution__inner {
		max-width: none !important;
		white-space: normal !important;
	}

	.iab-attribution__toggle {
		display: none !important;
	}

	#iab-footer-attributions[hidden] {
		display: block !important;
	}
}
