/**
 * LDV Content Blocks — front-end styling.
 *
 * Mobile-first, no frameworks. Every selector is scoped under .ldv-block.
 * Typography inherits the active theme (LDV fonts) by design — no web-font is
 * loaded by the plugin. Per-callout accent colors use CSS custom properties so
 * the theme can override them.
 *
 * @package ldv-content-blocks
 */

/* Layout wrapper -------------------------------------------------------- */
.ldv-blocks {
	display: flow-root;
}

.ldv-block {
	margin: 1.75rem 0;
	font-family: inherit;
	color: var(--text, #4a5568);
	line-height: 1.6;
}

.ldv-block :where(p):last-child {
	margin-bottom: 0;
}

.ldv-cb-icon {
	display: block;
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
}

/* Block button — red pill. The .ldv-cb- prefix keeps it collision-free. */
.ldv-cb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	padding: 12px 20px;
	border: 0;
	border-radius: 30px;
	background-color: #ec1c24;
	color: #fff !important;
	font-family: inherit;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}
.ldv-cb-btn:hover {
	background-color: #c5161d;
	color: #fff !important;
	transform: translateY(-1px);
}
.ldv-cb-btn:focus-visible {
	outline: 2px solid #0c2340;
	outline-offset: 2px;
}
.ldv-cb-btn:disabled {
	opacity: 0.65;
	cursor: default;
	transform: none;
}

/* ----------------------------------------------------------------------- *
 * Callout
 * ----------------------------------------------------------------------- */
.ldv-block.ldv-callout {
	--ldv-accent: #2563eb;
	--ldv-accent-bg: rgba(37, 99, 235, 0.08);
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	padding: 1rem 1.15rem;
	border-radius: 10px;
}

/* Accent palette per style */
.ldv-block.ldv-callout--tip,
.ldv-block.ldv-callout--info {
	--ldv-accent: #2563eb;
	--ldv-accent-bg: rgba(37, 99, 235, 0.08);
}
.ldv-block.ldv-callout--warning,
.ldv-block.ldv-callout--note {
	--ldv-accent: #d97706;
	--ldv-accent-bg: rgba(217, 119, 6, 0.10);
}
.ldv-block.ldv-callout--success,
.ldv-block.ldv-callout--best_practice {
	--ldv-accent: #16a34a;
	--ldv-accent-bg: rgba(22, 163, 74, 0.10);
}
.ldv-block.ldv-callout--danger {
	--ldv-accent: #dc2626;
	--ldv-accent-bg: rgba(220, 38, 38, 0.08);
}
.ldv-block.ldv-callout--pro_tip {
	--ldv-accent: #7c3aed;
	--ldv-accent-bg: rgba(124, 58, 237, 0.08);
}
.ldv-block.ldv-callout--advice {
	--ldv-accent: #0d9488;
	--ldv-accent-bg: rgba(13, 148, 136, 0.10);
}
.ldv-block.ldv-callout--important {
	--ldv-accent: #ea580c;
	--ldv-accent-bg: rgba(234, 88, 12, 0.10);
}

/* Border styles */
.ldv-block.ldv-callout--left_border {
	background: var(--ldv-accent-bg);
	border-left: 4px solid var(--ldv-accent);
}
.ldv-block.ldv-callout--borderless {
	background: var(--ldv-accent-bg);
	border-left: 0;
}
.ldv-block.ldv-callout--boxed {
	background: var(--ldv-accent-bg);
	border: 1px solid var(--ldv-accent);
}

.ldv-block.ldv-callout .ldv-callout__icon {
	display: inline-flex;
	margin-top: 0.1rem;
}
.ldv-block.ldv-callout .ldv-callout__icon .ldv-cb-icon {
	width: 30px;
	height: 30px;
	flex: 0 0 30px;
}
.ldv-block.ldv-callout .ldv-callout__content {
	min-width: 0;
}
.ldv-block.ldv-callout .ldv-callout__heading {
	margin: 0 0 0.25rem;
	font-family: inherit;
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ldv-accent);
}
.ldv-block.ldv-callout .ldv-callout__body > :first-child {
	margin-top: 0;
}
.ldv-block.ldv-callout .ldv-callout__body > :last-child {
	margin-bottom: 0;
}

/* ----------------------------------------------------------------------- *
 * Quote
 * ----------------------------------------------------------------------- */
.ldv-block.ldv-quote {
	position: relative;
	padding: 2.5rem 2.75rem;
	border: 1px solid var(--line, #e2e8f0);
	border-radius: 16px;
	background: #fff;
}
.ldv-block.ldv-quote::before,
.ldv-block.ldv-quote::after {
	position: absolute;
	font-family: "Scotch Text Comp Sm It", Georgia, "Times New Roman", serif;
	font-size: 4.5rem;
	line-height: 1;
	color: #c7ced8;
}
.ldv-block.ldv-quote::before {
	content: "\201C";
	top: 0.7rem;
	left: 1.1rem;
}
.ldv-block.ldv-quote::after {
	content: "\201D";
	right: 1.1rem;
	bottom: -0.5rem;
}
.ldv-block.ldv-quote .ldv-quote__inner {
	position: relative;
	z-index: 1;
	margin: 0;
	border: 0;
	padding: 0;
	font-style: normal;
	color: var(--text-strong, #0f172a);
}
.ldv-block.ldv-quote .ldv-quote__inner > :first-child {
	margin-top: 0;
}
.ldv-block.ldv-quote .ldv-quote__inner > :last-child {
	margin-bottom: 0;
}

/* ----------------------------------------------------------------------- *
 * Featured quote
 * ----------------------------------------------------------------------- */
.ldv-block.ldv-featured-quote {
	background: var(--bg-alt, #f7f8fa);
	border-radius: 12px;
	padding: 2rem 1.75rem;
	text-align: center;
}
.ldv-block.ldv-featured-quote .ldv-fq__figure {
	margin: 0 auto 1.25rem;
	width: 96px;
	height: 96px;
}
.ldv-block.ldv-featured-quote .ldv-fq__figure img {
	width: 96px;
	height: 96px;
	object-fit: cover;
	border-radius: 50%;
}
.ldv-block.ldv-featured-quote .ldv-fq__body {
	position: relative;
	margin: 0 0 1rem;
	border: 0;
	padding: 0;
	font-family: inherit;
	font-size: 1.5rem;
	line-height: 1.4;
	font-weight: 500;
	letter-spacing: -0.015em;
	color: var(--text-strong, #0f172a);
}
.ldv-block.ldv-featured-quote .ldv-fq__body::before {
	content: "\201C";
}
.ldv-block.ldv-featured-quote .ldv-fq__body::after {
	content: "\201D";
}
.ldv-block.ldv-featured-quote .ldv-fq__meta {
	font-size: 0.95rem;
	color: var(--warmgray, #6b6560);
}
.ldv-block.ldv-featured-quote .ldv-fq__author {
	font-style: normal;
	font-weight: 600;
	color: var(--text, #4a5568);
}
.ldv-block.ldv-featured-quote .ldv-fq__meta a {
	color: var(--red, #ec1c24);
}

/* ----------------------------------------------------------------------- *
 * Pros & Cons
 * ----------------------------------------------------------------------- */
.ldv-block.ldv-pros-cons .ldv-pc {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}
.ldv-block.ldv-pros-cons .ldv-pc__col {
	padding: 1.25rem 1.4rem;
	border-radius: 16px;
	border-left: 4px solid var(--ldv-pc-accent, #1d9e75);
	background: var(--ldv-pc-bg, rgba(29, 158, 117, 0.07));
}
.ldv-block.ldv-pros-cons .ldv-pc__pros {
	--ldv-pc-accent: #1d9e75;
	--ldv-pc-bg: rgba(29, 158, 117, 0.08);
}
.ldv-block.ldv-pros-cons .ldv-pc__cons {
	--ldv-pc-accent: #cc1f1f;
	--ldv-pc-bg: rgba(204, 31, 31, 0.06);
}
.ldv-block.ldv-pros-cons .ldv-pc__head {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	margin-bottom: 0.85rem;
}
.ldv-block.ldv-pros-cons .ldv-pc__head .ldv-cb-icon {
	margin: 0;
	flex: 0 0 24px;
}
.ldv-block.ldv-pros-cons .ldv-pc__title {
	/* !important guards against theme content-area <p> rules that would offset
	   the flex centering with their own margin-bottom. */
	margin: 0 !important;
	font-family: inherit;
	font-weight: 700;
	font-size: 1.15rem;
	line-height: 1;
	letter-spacing: -0.01em;
	color: var(--ldv-pc-accent, #0f172a);
}
.ldv-block.ldv-pros-cons .ldv-pc__list {
	list-style: disc;
	margin: 0;
	padding: 0 0 0 1.25rem;
}
.ldv-block.ldv-pros-cons .ldv-pc__list li {
	margin: 0;
	padding: 0.3rem 0;
	font-size: 16px !important;
	color: var(--text-strong, #0f172a);
}
.ldv-block.ldv-pros-cons .ldv-pc__list li::marker {
	color: var(--ldv-pc-accent, #1d9e75);
}

@media (min-width: 641px) {
	.ldv-block.ldv-pros-cons .ldv-pc {
		grid-template-columns: 1fr 1fr;
	}
}

/* ----------------------------------------------------------------------- *
 * CTA banner
 * ----------------------------------------------------------------------- */
.ldv-block.ldv-cta {
	position: relative;
	overflow: hidden;
	padding: 80px 48px;
	border-radius: 16px;
	background-color: #0a0a0b;
	/* Ambient glow. An editor-set bg image overrides this via the inline
	   style, and .ldv-cta--has-bg adds a contrast overlay. */
	background-image:
		radial-gradient(70% 80% at 20% 50%, rgba(204, 31, 31, 0.30) 0%, transparent 60%),
		radial-gradient(60% 80% at 80% 50%, rgba(24, 95, 165, 0.18) 0%, transparent 65%),
		radial-gradient(40% 60% at 50% 100%, rgba(46, 181, 130, 0.10) 0%, transparent 60%);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	text-align: center;
	color: #fff;
}
.ldv-block.ldv-cta.ldv-cta--has-bg::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}
.ldv-block.ldv-cta .ldv-cta__content {
	position: relative;
	z-index: 1;
	max-width: 760px;
	margin: 0 auto;
}
.ldv-block.ldv-cta .ldv-cta__heading {
	margin: 0 0 16px;
	font-family: inherit;
	font-size: clamp(34px, 4vw, 52px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.025em;
	color: #fff;
}
.ldv-block.ldv-cta .ldv-cta__text {
	margin: 0 auto 28px;
	max-width: 600px;
	font-size: 16px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.72);
}
.ldv-block.ldv-cta .ldv-cta__btn {
	margin-top: 0;
}

/* Light banner style — white card, dark text. Base (.ldv-cta) stays dark so
   rows saved before the option existed render unchanged. */
.ldv-block.ldv-cta.ldv-cta--light {
	background-color: #f7f8fa;
	background-image:
		radial-gradient(70% 80% at 20% 50%, rgba(204, 31, 31, 0.07) 0%, transparent 60%),
		radial-gradient(60% 80% at 80% 50%, rgba(24, 95, 165, 0.06) 0%, transparent 65%),
		radial-gradient(40% 60% at 50% 100%, rgba(46, 181, 130, 0.05) 0%, transparent 60%);
	border: 1px solid var(--line, #e2e8f0);
	color: var(--text, #4a5568);
}
.ldv-block.ldv-cta.ldv-cta--light.ldv-cta--has-bg::before {
	background: rgba(255, 255, 255, 0.78);
}

/* ----------------------------------------------------------------------- *
 * CTA newsletter form
 * ----------------------------------------------------------------------- */
.ldv-block.ldv-cta .ldv-cta__form {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	max-width: 520px;
	margin: 0 auto;
}
.ldv-block.ldv-cta .ldv-cta__form input[type="email"],
.ldv-block.ldv-cta .ldv-cta__form input[type="tel"] {
	flex: 1 1 240px;
	min-width: 0;
	padding: 12px 20px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 30px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.2;
}
.ldv-block.ldv-cta .ldv-cta__form input[type="email"]::placeholder,
.ldv-block.ldv-cta .ldv-cta__form input[type="tel"]::placeholder {
	color: rgba(255, 255, 255, 0.55);
}
.ldv-block.ldv-cta .ldv-cta__form input[type="email"]:focus-visible,
.ldv-block.ldv-cta .ldv-cta__form input[type="tel"]:focus-visible {
	outline: 2px solid #ec1c24;
	outline-offset: 2px;
}
.ldv-block.ldv-cta.ldv-cta--light .ldv-cta__form input[type="email"],
.ldv-block.ldv-cta.ldv-cta--light .ldv-cta__form input[type="tel"] {
	border-color: #d5dae2;
	background: #fff;
	color: var(--text-strong, #0f172a);
}
.ldv-block.ldv-cta.ldv-cta--light .ldv-cta__form input[type="email"]::placeholder,
.ldv-block.ldv-cta.ldv-cta--light .ldv-cta__form input[type="tel"]::placeholder {
	color: #8a94a3;
}

/* CTA Form block: stacked vertical layout — inputs and button full width. */
.ldv-block.ldv-cta .ldv-cta__form--vertical {
	flex-direction: column;
	align-items: stretch;
	max-width: 480px;
}
.ldv-block.ldv-cta .ldv-cta__form--vertical input[type="email"],
.ldv-block.ldv-cta .ldv-cta__form--vertical input[type="tel"] {
	flex: 0 0 auto;
	width: 100%;
}
.ldv-block.ldv-cta .ldv-cta__form--vertical .ldv-cb-btn {
	flex: 0 0 auto;
	width: fit-content;
	margin: 0 auto;
}
.ldv-block.ldv-cta .ldv-cta__recaptcha {
	flex-basis: 100%;
	display: flex;
	justify-content: center;
	margin-top: 4px;
}
.ldv-block.ldv-cta .ldv-newsletter-form.is-success .ldv-cta__recaptcha {
	display: none;
}
.ldv-block.ldv-cta .ldv-form-response {
	flex-basis: 100%;
	min-height: 0;
	margin: 0;
	font-size: 14px;
	color: #2eb582;
}
.ldv-block.ldv-cta .ldv-form-response.is-error {
	color: #ff6b70;
}
.ldv-block.ldv-cta.ldv-cta--light .ldv-form-response.is-error {
	color: #c5161d;
}
.ldv-block.ldv-cta .ldv-newsletter-form.is-success input[type="email"],
.ldv-block.ldv-cta .ldv-newsletter-form.is-success input[type="tel"],
.ldv-block.ldv-cta .ldv-newsletter-form.is-success .ldv-cb-btn {
	display: none;
}
.ldv-block.ldv-cta .ldv-newsletter-form.is-success .ldv-form-response {
	font-size: 16px;
}

@media (max-width: 640px) {
	.ldv-block.ldv-cta {
		padding: 56px 24px;
	}
	.ldv-block.ldv-cta .ldv-cta__form input[type="email"],
	.ldv-block.ldv-cta .ldv-cta__form input[type="tel"],
	.ldv-block.ldv-cta .ldv-cta__form .ldv-cb-btn {
		flex: 1 1 100%;
		width: 100%;
	}
}

/* ----------------------------------------------------------------------- *
 * Content-area overrides
 *
 * Blog/content themes often style content <p> with high-specificity rules
 * (with !important) that would flatten block headings to body-text size and
 * colour. These guards reclaim the intended block typography.
 * ----------------------------------------------------------------------- */
/* Block body paragraphs = 16px. Heading rules below keep their own sizes. */
.ldv-block p {
	font-size: 16px !important;
}

/* Blog-content rules (e.g. `.blog-main-content ul li { font-family: Inter }`)
   reach into the blocks and re-font list items. Force every block text
   element back to the inherited theme body font. */
.ldv-block p,
.ldv-block ul,
.ldv-block ol,
.ldv-block li {
	font-family: inherit !important;
}

/* All block headings — 20px desktop / 18px mobile. */
.ldv-block .ldv-cta__heading,
.ldv-block .ldv-callout__heading,
.ldv-block .ldv-pc__title,
.ldv-block.ldv-featured-quote .ldv-fq__body,
.ldv-block.ldv-featured-quote .ldv-fq__body p {
	font-size: 20px !important;
	line-height: 1.3 !important;
}
@media (max-width: 640px) {
	.ldv-block .ldv-cta__heading,
	.ldv-block .ldv-callout__heading,
	.ldv-block .ldv-pc__title,
	.ldv-block.ldv-featured-quote .ldv-fq__body,
	.ldv-block.ldv-featured-quote .ldv-fq__body p {
		font-size: 18px !important;
	}
}

/* Per-heading colours / margins (size handled above). */
.ldv-block .ldv-cta__heading {
	font-size: 24px !important;
	font-weight: 400 !important;
	color: #fff !important;
	margin: 0 0 12px !important;
}
.ldv-block .ldv-callout__heading {
	font-size: 18px !important;
	color: var(--ldv-accent) !important;
	margin: 0 0 0.25rem !important;
}
.ldv-block .ldv-pc__title {
	color: var(--ldv-pc-accent, #0f172a) !important;
}
.ldv-block.ldv-featured-quote .ldv-fq__body,
.ldv-block.ldv-featured-quote .ldv-fq__body p {
	color: var(--text-strong, #0f172a) !important;
}

/* CTA sub-text: theme body size (no font-size set), just colour + spacing. */
.ldv-block .ldv-cta__text {
	color: rgba(255, 255, 255, 0.72) !important;
	margin: 0 auto 28px !important;
}

/* Light banner: dark heading/text override the guards above. */
.ldv-block.ldv-cta--light .ldv-cta__heading {
	color: var(--text-strong, #0f172a) !important;
}
.ldv-block.ldv-cta--light .ldv-cta__text {
	color: var(--text, #4a5568) !important;
}
