/*
 * The article column styles its descendants (p, a, img, ul ...) at a specificity that beats a single
 * class, so the title, description and status are divs, and the image rule is one class deeper. WordPress
 * gives lazy images with sizes="auto" contain-intrinsic-size 3000px 1500px, which enlarges small images;
 * the PHP sets the real size inline on each image to override it.
 * Layout is driven by the width of the box's own column (container query), not the viewport,
 * so it also holds if the article template changes. The Elementor post-content rule caps every
 * direct child at 760px; the !important pair below lifts that for this box only.
 */
.mep-rcta {
	--mep-navy: #1f2a44;
	--mep-gold: #d7b96e;
	--mep-error: #b3261e;
	container: mep-rcta / inline-size;
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 960px !important;
	margin-block: 32px;
	margin-inline: auto !important;
	color: var(--mep-navy);
	font-family: "Poppins", sans-serif;
}
.mep-rcta *, .mep-rcta *::before, .mep-rcta *::after { box-sizing: border-box; }

/* Default (narrowest): image beside title and description, form full width below. */
.mep-rcta .mep-rcta__card {
	display: grid;
	grid-template-columns: 62px minmax(0, 1fr);
	grid-template-areas: "media body" "form form";
	column-gap: 16px;
	row-gap: 14px;
	align-items: start;
	padding: 20px;
	background: linear-gradient(135deg, #f6f1fa 0%, #fbf5e6 100%);
	border: 1px solid rgba(31, 42, 68, 0.12);
	border-radius: 16px;
}
.mep-rcta .mep-rcta__media { grid-area: media; align-self: start; width: 62px; }
.mep-rcta .mep-rcta__body { grid-area: body; min-width: 0; }
.mep-rcta .mep-rcta__form { grid-area: form; position: relative; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.mep-rcta .mep-rcta__media .mep-rcta__img { display: block; width: auto; max-width: 100%; height: auto; max-height: 85px; margin: 0 auto; border-radius: 0; object-fit: contain; transform: rotate(-8deg); filter: drop-shadow(0 2px 3px rgba(31, 42, 68, 0.16)); }
.mep-rcta .mep-rcta__media.is-broken { display: none; }
.mep-rcta .mep-rcta__title { margin: 0 0 6px; font-family: inherit; overflow-wrap: anywhere; font-size: 18px; line-height: 1.25; font-weight: 700; color: var(--mep-navy); }
.mep-rcta .mep-rcta__desc { margin: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; color: rgba(31, 42, 68, 0.85); }

.mep-rcta .mep-rcta__label, .mep-rcta .mep-rcta__consent { display: block; font-size: 13px; line-height: 1.35; }
.mep-rcta .mep-rcta__label { margin: 0; font-weight: 600; }
.mep-rcta .mep-rcta__input, .mep-rcta .mep-rcta__button { display: block; width: 100%; max-width: 100%; height: 44px; min-height: 44px; margin: 0; border-radius: 999px; font: inherit; font-size: 15px; line-height: 1.2; }
.mep-rcta .mep-rcta__input { padding: 0 18px; background: #fff; border: 1px solid rgba(31, 42, 68, 0.35); color: var(--mep-navy); box-shadow: none; }
.mep-rcta .mep-rcta__input::placeholder { color: #5f6677; opacity: 1; }
.mep-rcta .mep-rcta__input:focus-visible, .mep-rcta .mep-rcta__button:focus-visible, .mep-rcta .mep-rcta__consent input:focus-visible { outline: 3px solid var(--mep-navy); outline-offset: 2px; box-shadow: 0 0 0 2px #fff; }
.mep-rcta .mep-rcta__consent { display: flex; gap: 10px; align-items: center; min-height: 44px; margin: 0; color: rgba(31, 42, 68, 0.9); }
.mep-rcta .mep-rcta__consent input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--mep-navy); }
.mep-rcta .mep-rcta__button { appearance: none; height: auto; padding: 10px 18px; border: 0; background: var(--mep-gold); color: var(--mep-navy); font-weight: 600; text-align: center; white-space: normal; overflow-wrap: anywhere; text-wrap: balance; cursor: pointer; }
.mep-rcta .mep-rcta__button:hover, .mep-rcta .mep-rcta__button:focus { background: #cfae5c; color: var(--mep-navy); border: 0; text-decoration: none; }
.mep-rcta .mep-rcta__button:disabled { opacity: 0.6; cursor: default; }
.mep-rcta .mep-rcta__status { margin: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.mep-rcta .mep-rcta__status:empty { margin-top: -8px; }
.mep-rcta .mep-rcta__status.is-ok { color: var(--mep-navy); font-weight: 600; }
.mep-rcta .mep-rcta__status.is-error { color: var(--mep-error); }
.mep-rcta .mep-rcta__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mep-rcta-notice { padding: 10px 14px; border: 1px dashed #c8463e; border-radius: 8px; font-size: 14px; }

/* Very narrow column: image above the text so the title keeps a readable width. */
@container mep-rcta (max-width: 319px) {
	.mep-rcta .mep-rcta__card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "media" "body" "form"; }
	.mep-rcta .mep-rcta__media { width: 62px; margin-left: 4px; }
	.mep-rcta .mep-rcta__media .mep-rcta__img { max-height: 68px; }
}

/* Two columns: image left, text and form stacked on the right. */
@container mep-rcta (min-width: 480px) {
	.mep-rcta .mep-rcta__card { grid-template-columns: 84px minmax(0, 1fr); grid-template-areas: "media body" "media form"; column-gap: 20px; padding: 20px 24px; }
	.mep-rcta .mep-rcta__media { align-self: center; width: 84px; }
	.mep-rcta .mep-rcta__media .mep-rcta__img { max-height: 105px; }
	.mep-rcta .mep-rcta__title { font-size: 20px; }
	.mep-rcta .mep-rcta__desc { font-size: 15px; }
}

/* Three zones: image, text, form. */
@container mep-rcta (min-width: 680px) {
	.mep-rcta .mep-rcta__card { grid-template-columns: 84px minmax(0, 1fr) minmax(0, clamp(264px, 36%, 340px)); grid-template-areas: "media body form"; column-gap: 28px; align-items: center; }
	.mep-rcta .mep-rcta__form::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: -14px; width: 1px; background: rgba(31, 42, 68, 0.14); }
}

@container mep-rcta (min-width: 880px) {
	.mep-rcta .mep-rcta__card { grid-template-columns: 92px minmax(0, 1fr) minmax(0, clamp(300px, 36%, 340px)); padding: 22px 24px; }
	.mep-rcta .mep-rcta__media { width: 92px; }
	.mep-rcta .mep-rcta__media .mep-rcta__img { max-height: 119px; }
	.mep-rcta .mep-rcta__title { font-size: 22px; margin-bottom: 8px; }
}

/* The image file failed to load (script adds .mep-rcta--noimg): close the empty image column. */
.mep-rcta--noimg .mep-rcta__card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "body" "form"; }
@container mep-rcta (min-width: 680px) {
	.mep-rcta--noimg .mep-rcta__card { grid-template-columns: minmax(0, 1fr) minmax(0, clamp(264px, 36%, 340px)); grid-template-areas: "body form"; }
}
@container mep-rcta (min-width: 880px) {
	.mep-rcta--noimg .mep-rcta__card { grid-template-columns: minmax(0, 1fr) minmax(0, clamp(300px, 36%, 340px)); }
}
