/* =====================================================================
   DBY block styles — the single-post body components as native block
   STYLES (Styles panel) so posts are written in the block editor with no
   HTML. Registered in inc/blocks.php.

   This sheet loads on the front end AND inside the editor canvas, so
   selectors are block classes only — never scope them to .dby-article or
   Elementor wrappers. Colour fallbacks mirror the Kit globals because the
   editor canvas doesn't load dby.css.
   ===================================================================== */

/* Core's "constrained" Group layout caps children at the theme content
   size (800px) and centres them; inside these components the children
   should fill the box whatever the column width. */
.wp-block-group.is-style-dby-callout > *,
.wp-block-group.is-style-dby-offer-box > *,
.wp-block-group.is-style-dby-numbered > *,
.wp-block-group.is-style-dby-numbered > .wp-block-group > * { max-width: none; }

/* ---- Callout (Group or Paragraph) ---------------------------------- */
.is-style-dby-callout {
	background: var(--cream, #F4F0EB);
	border-left: 5px solid var(--terra, #E77241);
	border-radius: 0 16px 16px 0;
	padding: 22px 26px;
	margin-top: 28px;
	margin-bottom: 28px;
}
.wp-block-group.is-style-dby-callout > p,
.wp-block-group.is-style-dby-callout > ul,
.wp-block-group.is-style-dby-callout > ol,
.wp-block-group.is-style-dby-callout > h2,
.wp-block-group.is-style-dby-callout > h3,
.wp-block-group.is-style-dby-callout > h4 { margin-top: 0; margin-bottom: .8em; }
.wp-block-group.is-style-dby-callout > :last-child { margin-bottom: 0; }

/* ---- Numbered Points (Group of Groups) ------------------------------
   Outer group = the set (restarts the count); each inner Group is one
   point: heading + paragraph, numbered by a CSS counter. */
.wp-block-group.is-style-dby-numbered {
	counter-reset: dby-point;
	margin-top: 26px;
	margin-bottom: 26px;
}
.wp-block-group.is-style-dby-numbered > .wp-block-group {
	counter-increment: dby-point;
	position: relative;
	padding-left: 62px;
	margin-top: 0;
	margin-bottom: 26px;
}
.wp-block-group.is-style-dby-numbered > .wp-block-group:last-child { margin-bottom: 0; }
.wp-block-group.is-style-dby-numbered > .wp-block-group::before {
	content: counter(dby-point);
	position: absolute;
	left: 0;
	top: 2px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--terra, #E77241);
	color: #fff;
	font-family: var(--dby-font, 'Nunito Sans', ui-sans-serif, -apple-system, "Segoe UI", Arial, sans-serif);
	font-weight: 900;
	font-size: 19px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}
.wp-block-group.is-style-dby-numbered > .wp-block-group > h2,
.wp-block-group.is-style-dby-numbered > .wp-block-group > h3,
.wp-block-group.is-style-dby-numbered > .wp-block-group > h4 {
	color: var(--navy, #004077);
	font-size: 21px;
	line-height: 1.3;
	margin-top: 0;
	margin-bottom: .4em;
}
.wp-block-group.is-style-dby-numbered > .wp-block-group > p,
.wp-block-group.is-style-dby-numbered > .wp-block-group > ul,
.wp-block-group.is-style-dby-numbered > .wp-block-group > ol {
	font-size: 18.5px;
	margin-top: 0;
	margin-bottom: .6em;
}
.wp-block-group.is-style-dby-numbered > .wp-block-group > :last-child { margin-bottom: 0; }
@media (max-width: 600px) {
	.wp-block-group.is-style-dby-numbered > .wp-block-group { padding-left: 54px; }
	.wp-block-group.is-style-dby-numbered > .wp-block-group::before { width: 40px; height: 40px; font-size: 17px; }
}

/* ---- Offer Box (Group) --------------------------------------------- */
.wp-block-group.is-style-dby-offer-box {
	background: var(--navy, #004077);
	color: #fff;
	border-radius: 20px;
	padding: 32px 34px;
	margin-top: 40px;
	margin-bottom: 40px;
}
.wp-block-group.is-style-dby-offer-box > h2,
.wp-block-group.is-style-dby-offer-box > h3,
.wp-block-group.is-style-dby-offer-box > h4 {
	color: var(--sky, #66D9E8);
	font-size: 22px;
	line-height: 1.3;
	margin-top: 0;
	margin-bottom: .5em;
}
.wp-block-group.is-style-dby-offer-box > p,
.wp-block-group.is-style-dby-offer-box > ul,
.wp-block-group.is-style-dby-offer-box > ol {
	color: rgba(255, 255, 255, .93);
	font-size: 18px;
	margin-top: 0;
	margin-bottom: 1em;
}
.wp-block-group.is-style-dby-offer-box > .wp-block-buttons { margin-top: 22px; margin-bottom: 0; }
.wp-block-group.is-style-dby-offer-box > :last-child { margin-bottom: 0; }
.wp-block-group.is-style-dby-offer-box a:not(.wp-block-button__link) { color: #fff; text-decoration: underline; }
@media (max-width: 600px) {
	.wp-block-group.is-style-dby-offer-box { padding: 24px 22px; }
}

/* ---- Pill buttons (Button block) ----------------------------------- */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-button.is-style-dby-pill .wp-block-button__link,
.wp-block-button.is-style-dby-pill-navy .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding: 12px 12px 12px 30px;
	font-family: var(--dby-font, 'Nunito Sans', ui-sans-serif, -apple-system, "Segoe UI", Arial, sans-serif);
	font-weight: 800;
	font-size: 18px;
	line-height: 1.2;
	border-radius: 9999px;
	border: none;
	text-decoration: none;
	text-align: left;
	max-width: 100%;
	transition: transform .18s ease, background .18s ease;
}
.wp-block-button.is-style-dby-pill .wp-block-button__link::after,
.wp-block-button.is-style-dby-pill-navy .wp-block-button__link::after {
	content: "\2192";
	flex: none;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 19px;
	line-height: 1;
}
.wp-block-button.is-style-dby-pill .wp-block-button__link:hover,
.wp-block-button.is-style-dby-pill-navy .wp-block-button__link:hover { transform: translateY(-2px); }
.wp-block-button.is-style-dby-pill .wp-block-button__link:focus-visible,
.wp-block-button.is-style-dby-pill-navy .wp-block-button__link:focus-visible {
	outline: 3px solid var(--sky-aa, #1B8FA6);
	outline-offset: 3px;
}
/* Terracotta */
.wp-block-button.is-style-dby-pill .wp-block-button__link {
	background: var(--terra, #E77241);
	color: #fff;
	box-shadow: 0 16px 32px -12px rgba(231, 114, 65, .55);
}
.wp-block-button.is-style-dby-pill .wp-block-button__link::after { background: #fff; color: var(--terra, #E77241); }
.wp-block-button.is-style-dby-pill .wp-block-button__link:hover,
.wp-block-button.is-style-dby-pill .wp-block-button__link:focus { background: var(--terra-deep, #C95C2C); color: #fff; }
/* Navy */
.wp-block-button.is-style-dby-pill-navy .wp-block-button__link {
	background: var(--navy, #004077);
	color: #fff;
}
.wp-block-button.is-style-dby-pill-navy .wp-block-button__link::after { background: var(--terra, #E77241); color: #fff; }
.wp-block-button.is-style-dby-pill-navy .wp-block-button__link:hover,
.wp-block-button.is-style-dby-pill-navy .wp-block-button__link:focus { background: var(--navy-deep, #00305C); color: #fff; }

/* ---- Checklist (List block) ---------------------------------------- */
ul.wp-block-list.is-style-dby-check {
	list-style: none;
	padding-left: 0;
	margin-left: 0;
}
ul.wp-block-list.is-style-dby-check > li {
	position: relative;
	padding-left: 42px;
	margin-bottom: 12px;
	font-weight: 600;
}
ul.wp-block-list.is-style-dby-check > li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: .15em;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--terra, #E77241);
	color: #fff;
	font-size: 14px;
	font-weight: 900;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ---- Quote block default look -------------------------------------- */
.wp-block-quote {
	border-left: 4px solid var(--navy, #004077);
	margin: 32px 0;
	padding: 6px 0 6px 26px;
	font-size: 1.1em;
	font-style: italic;
	font-weight: 500;
}
.wp-block-quote p { margin-top: 0; margin-bottom: .6em; }
.wp-block-quote cite {
	display: block;
	font-style: normal;
	font-weight: 800;
	font-size: 14px;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: var(--terra, #E77241);
}
