/*
 * Datawrapper charts restored into imported archive bodies.
 *
 * Asana 1218450483448755. The scrape dropped 1,129 Datawrapper iframes out of
 * 615 archive posts but kept the Vocento wrapper they sat in, so each chart is
 * spliced back into its original empty `iframe-container` shell (see
 * modules/shared/archive-empty-embed.css, whose :empty rules stop matching the
 * moment a shell is filled -- nothing to revert there).
 *
 * WHY THIS FILE EXISTS
 * modules/default/content-block.css:35 sets
 *
 *   .content-block img, .content-block iframe, .content-block video
 *     { max-width: 100%; height: auto; }
 *
 * `height: auto` on an iframe resolves to the 150px default intrinsic height of
 * a replaced element, and a presentational `height="722"` attribute loses to any
 * CSS rule at all. So a restored chart renders as a 150px letterbox showing its
 * first three rows. This is not theoretical: post 103375 (`y6qpk/16`) is the one
 * Datawrapper chart that survived the import and it has been clipped to 150px on
 * the beta ever since -- measured in Chromium, not inferred.
 *
 * Each restored iframe therefore carries its height in an INLINE style, which
 * outranks the rule above, and this file only has to supply `display: block`
 * (the iframes are inline replaced elements, so without it koi's line-height
 * adds a few px of baseline gap under every chart) plus a defensive `height:
 * auto` exemption for any chart that somehow reaches the page without one.
 *
 * WHY THE HEIGHT IS NOT PURELY STATIC
 * A Datawrapper chart has no intrinsic height and reflows with its container:
 * the same table measures 722px at a 1280px viewport and 879px at 390px. No
 * single baked-in number can be right at both. The inline height is the
 * desktop measurement, so first paint is correct for most traffic and CLS stays
 * near zero, and js/datawrapper-embed.js then corrects it from the chart's own
 * `datawrapper-height` postMessage. That listener is first-party and makes no
 * request of its own -- it only listens to the iframe already on the page.
 *
 * @package Relevo
 */

.detail section.detail-component[data-voc-component="iframe-container"] > iframe[src*="datawrapper.dwcdn.net"] {
	display: block;
	width: 0;
	min-width: 100% !important;
	border: none;
}

/*
 * Fallback only. Every restored chart ships an inline height that already beats
 * content-block.css; this catches one that does not, so it grows to its content
 * instead of collapsing to the 150px replaced-element default.
 */
.content-block iframe[src*="datawrapper.dwcdn.net"]:not([style*="height"]) {
	height: 400px;
}
