.roark-agent-iframe-widget {
	width: 100%;
	/* Clip any overflow from iframe content */
	overflow-x: hidden;
}

/* `--direct` (AbstractExposeAgentIframeWidget::render()) intentionally has NO
   `.roark-card` frame (no border, no box-shadow): the cross-origin CRM form
   already draws its own bordered box, so a full `.roark-card` around it used
   to double the framing ("card-in-card"). A
   template that wants that card LOOK around the surrounding section puts
   `.roark-card` on the column/section instead (see
   PropertyHomeTemplate::toolCardStyle(), used for the modal-button tiles,
   not this one). `--modal` never had a frame either — the modal dialog
   itself is the card (.roark-agent-iframe-modal-dialog below).

   The CRM document itself (markmakler.expowand.de/…) has a plain white
   `<body>` with square corners and no outer padding — checked, no URL param
   exists to make it transparent/embed-styled (see AbstractExposeAgentIframe-
   Widget::buildIframeUrl(); CRM tech debt to add one is tracked, not fixed
   here). Against Roark's light-grey page background (#F5F8FC home /
   #f7f7f9 exposé) that shows as a hard-edged white rectangle, so we round
   the wrapper ourselves: white background + the exposé card radius token +
   `overflow: hidden` clips the iframe's own square corners to match, and a
   small top inset keeps the CRM form's own heading off the rounded edge.
   Left/right/bottom get no inset — the iframe's white body blends into the
   wrapper's white background there, so it still reads as one seamless
   rounded panel rather than a white box inside a white box. */
.roark-agent-iframe-widget--direct {
	background: #fff;
	border-radius: var(--roark-radius-card, 10px);
	overflow: hidden;
	padding-top: 12px;
}

/* Centered like the former custom heading widget these titles replaced. */
.roark-agent-iframe-widget__title {
	margin: 0 0 8px;
	text-align: center;
}

.roark-agent-iframe-widget__description {
	margin: 0 0 18px;
	text-align: center;
}

/* roark-home-tool-cta: scoped to the "Immobilien-Tools & Beratung" tiles on
   the demo home page (PropertyHomeTemplate::buildToolsCardsSection) — the
   button itself is a plain inline-block <button> with no text-align of its
   own, so it defaults to the left edge of the widget's block container
   (title/description above it are individually centered, the button wasn't).
   Scoped via this class rather than globally on .roark-agent-iframe-widget so
   the expose-page sidebar instances of the same widget are unaffected. */
.roark-home-tool-cta .roark-agent-iframe-widget {
	text-align: center;
}

@media (max-width: 767px) {
	.roark-home-tool-cta .roark-agent-iframe-open {
		display: block;
		width: 100%;
	}
}

/* roark-home-cards-row: shared by two 50/50 rows on the demo home page —
   the "Lagebewertung"/"Immobilienbewertung" modal tiles
   (PropertyHomeTemplate::buildToolsCardsSection) and the "Suchauftrag"/
   "Zinsrechner" direct-iframe row (buildSearchAlertCardsSection). Elementor's
   own column "Gap" setting adds padding to `.elementor-element-populated`,
   the same box toolCardStyle() already pads for the tile card's own content,
   so using it there would fight that padding instead of adding space between
   the two cards. A plain flex `gap` on the row's own container does not have
   that conflict, and (since `gap` sets both row-gap and column-gap) also
   covers the stacked-mobile layout for free. */
.roark-home-cards-row > .elementor-container {
	gap: 24px;
}

@media (max-width: 767px) {
	/* Tighter row gap on mobile — the two direct iframes (Suchauftrag,
	   Zinsrechner) stack, so this is now vertical spacing between them.
	   Side inset comes only from the column's own 16px mobile padding (the
	   page-wide gutter — PropertyHomeTemplate::buildSearchAlertCardsSection())
	   since the widget itself carries no card padding (see the `--direct`
	   note above); previously section+column padding, card padding AND the
	   iframe's own padding stacked on top of each other ("triple padding"),
	   squeezing the CRM form's buttons to ~185px and wrapping words like
	   "Modernisierung/Umbau". */
	.roark-home-cards-row > .elementor-container {
		gap: 16px;
	}
}

.roark-agent-iframe {
	display: block;
	width: 100%;
	border: 0;
	/* Prevent iframe from showing its own scrollbars */
	overflow: hidden;
}

/* Direct (inline) iframes: height is driven by content via JS postMessage.
   min-height is set inline from PHP widget setting as fallback. */
.roark-agent-iframe--direct {
	height: auto;
	overflow: hidden;
}

/* Functional only — visual appearance (background, border, typography, radius,
   padding, shadow) is provided by .elementor-button + Elementor's button styling. */
.roark-agent-iframe-open {
	cursor: pointer;
}

.roark-agent-iframe-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	padding: 24px;
	/* Backdrop behind the dialog */
	background: rgba(0, 0, 0, 0.5);
}

.roark-agent-iframe-modal.is-open {
	display: block;
}

/* Prevent the background page from scrolling behind the open modal — same
   mechanism as the shared inquiry modal (see inquiry-modal.css's
   body.roark-inquiry-modal-open). */
body.roark-agent-iframe-opened {
	overflow: hidden;
}

/* Phones: reclaim the wide backdrop padding so the dialog gets full width */
@media (max-width: 480px) {
	.roark-agent-iframe-modal {
		padding: 12px;
	}
}

.roark-agent-iframe-modal-dialog {
	max-width: 960px;
	margin: 0 auto;
	overflow: hidden;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: var(--roark-radius-card, 8px);
}

.roark-agent-iframe-modal-header {
	display: flex;
	/* Title-less header (the iframe carries its own) — just the close button,
	   pinned to the end like a native dialog's corner close control. */
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	background: transparent;
	border-bottom: 1px solid transparent;
}

.roark-agent-iframe-close {
	padding: 0;
	border: 0;
	background: transparent;
	/* Readable on the white dialog background (was white-on-white) */
	color: #6b7280;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.roark-agent-iframe-close:hover {
	color: #1f2937;
}
