/* DesignsLab Pro Builder — frontend base styles. Loaded only on builder pages.
   Selectors use :where() where practical so per-element settings always win. */

.dlp {
	--dlp-gap: 24px;
	--dlp-section-pad: 64px;
	--dlp-container-width: 1200px;
}

/* Full Width layout: sections run edge to edge (Astra still pads the article). */
body.dlp-page.dlp-layout-full .site-main > article {
	margin: 0;
	padding: 0;
}

/* Structure */
.dlp-section {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: var(--dlp-section-pad) 20px;
	background-size: cover;
	background-position: center;
}
.dlp-container {
	display: grid;
	grid-template-columns: var(--dlp-cols, 1fr);
	gap: var(--dlp-gap);
	width: 100%;
	max-width: var(--dlp-container-width);
	margin-inline: auto;
	background-size: cover;
	background-position: center;
}
.dlp-container + .dlp-container {
	margin-top: var(--dlp-gap);
}
/* Columns stack their children (each takes a full row) but allow inline items,
   such as buttons, to share a row. */
.dlp-column {
	display: flex;
	flex-flow: row wrap;
	align-content: flex-start;
	min-width: 0;
	background-size: cover;
	background-position: center;
}
/* Each child fills the row via width (not flex-basis), so an element's own Width
   setting still applies; flex-shrink lets side margins narrow it instead of overflowing. */
.dlp-column > * {
	flex: 0 1 auto;
	width: 100%;
	min-width: 0;
}
.dlp-column > .dlp-button-wrap--inline,
.dlp-column > .dlp-node.is-inline {
	width: auto;
	margin-right: 16px;
}

/* Remove trailing margins so spacing is controlled by sections and gaps. */
.dlp :where(.dlp-column) > :last-child,
.dlp :where(.dlp-text) > :last-child {
	margin-bottom: 0;
}

/* Elements */
.dlp .dlp-heading {
	margin: 0 0 0.5em;
}
/* Beats Astra's ".ast-single-post .entry-content a" underline. */
.dlp .dlp-heading > a,
.dlp .dlp-button-wrap > a.dlp-button {
	text-decoration: none;
}
.dlp .dlp-heading > a {
	color: inherit;
}
.dlp .dlp-text {
	margin: 0 0 1em;
}
.dlp .dlp-image {
	margin: 0 0 1em;
}
.dlp .dlp-image img {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}
.dlp .dlp-image figcaption {
	margin-top: 0.5em;
	font-size: 0.875em;
	opacity: 0.75;
}
.dlp .dlp-button-wrap {
	margin: 0 0 1em;
}
.dlp .dlp-button {
	display: inline-block;
	text-decoration: none;
	line-height: 1.2;
	border: 2px solid transparent;
	transition: opacity 0.15s ease, background-color 0.15s ease;
}
.dlp .dlp-button--sm { padding: 8px 18px; font-size: 0.875em; }
.dlp .dlp-button--md { padding: 12px 28px; }
.dlp .dlp-button--lg { padding: 16px 40px; font-size: 1.125em; }
.dlp .dlp-button--outline {
	background: transparent;
	border-color: currentColor;
	color: var(--ast-global-color-0, #046bd2);
}
.dlp .dlp-button:hover,
.dlp .dlp-button:focus-visible {
	opacity: 0.88;
}
.dlp .dlp-spacer {
	height: 40px;
}
.dlp .dlp-divider {
	height: 0;
	margin: 1em 0;
	border: 0;
	border-top: 1px solid var(--ast-border-color, #dddddd);
	background: none;
}

/* Slider */
.dlp .dlp-slider {
	--dlp-slider-accent: var(--ast-global-color-0, #046bd2);
	position: relative;
	min-height: 400px;
	overflow: hidden;
	background: #d9dcd5;
}
.dlp .dlp-slider__slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.9s ease;
}
.dlp .dlp-slider__slide.is-active {
	opacity: 1;
}
.dlp .dlp-slider__nav {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	display: flex;
	background: var(--dlp-slider-accent);
}
.dlp .dlp-slider__nav button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin: 0;
	padding: 0;
	border: 0;
	border-left: 1px solid rgb(255 255 255 / 35%);
	border-radius: 0;
	background: transparent;
	color: #fff;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.25s ease;
}
.dlp .dlp-slider__nav button:first-child {
	border-left: 0;
}
.dlp .dlp-slider__nav button:hover {
	background: rgb(0 0 0 / 22%);
}
.dlp .dlp-slider__nav button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -4px;
}
.dlp .dlp-slider__dots {
	position: absolute;
	top: 50%;
	right: clamp(15px, 2.5vw, 26px);
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 9px;
	transform: translateY(-50%);
}
.dlp .dlp-slider__dot {
	width: 8px;
	height: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgb(245 240 230 / 45%);
	cursor: pointer;
	transition: background-color 0.25s ease, transform 0.25s ease;
}
.dlp .dlp-slider__dot.is-active {
	background: var(--dlp-slider-accent);
	transform: scale(1.3);
}
.dlp .dlp-slider__badge {
	position: absolute;
	left: clamp(19px, 3vw, 37.5px);
	bottom: clamp(19px, 3vw, 37.5px);
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.6em 1.1em;
	border-radius: 999px;
	background: rgb(53 58 53 / 55%);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: #fff;
	font-size: 11.7px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
@media (prefers-reduced-motion: reduce) {
	.dlp .dlp-slider__slide { transition: none; }
}

/* Icon */
.dlp .dlp-icon-el {
	--dlp-icon-size: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}
.dlp .dlp-icon-el svg {
	width: var(--dlp-icon-size);
	height: var(--dlp-icon-size);
}
.dlp-column > .dlp-icon-el,
.dlp-column > .dlp-node.is-shrink {
	width: auto;
}

/* Entrance animations (only active once animate.js has loaded). */
.dlp-anim-ready .dlp-anim {
	transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.dlp-anim-ready .dlp-anim:not(.is-visible) {
	opacity: 0;
}
.dlp-anim-ready .dlp-anim--fade-up:not(.is-visible) {
	transform: translateY(28px);
}

/* Shortcode slot note (shown to logged-in editors only). */
.dlp .dlp-shortcode--note {
	padding: 16px 18px;
	border: 1.5px dashed rgb(0 0 0 / 25%);
	border-radius: 8px;
	font-size: 14px;
	opacity: 0.8;
}
.dlp .dlp-shortcode--note p {
	margin: 0;
}

/* Accordion. A theme can replace this look: see the dlp_accordion_classes filter. */
.dlp-accordion:not(.dlp-accordion--unstyled) .dlp-accordion__item {
	border-bottom: 1px solid rgb(0 0 0 / 12%);
}
.dlp-accordion:not(.dlp-accordion--unstyled) .dlp-accordion__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 0;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}
.dlp-accordion:not(.dlp-accordion--unstyled) .dlp-accordion__q::-webkit-details-marker {
	display: none;
}
.dlp-accordion:not(.dlp-accordion--unstyled) .dlp-accordion__icon {
	flex: none;
	width: 10px;
	height: 10px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s;
}
.dlp-accordion:not(.dlp-accordion--unstyled) .dlp-accordion__item[open] .dlp-accordion__icon {
	transform: rotate(-135deg);
}
.dlp-accordion:not(.dlp-accordion--unstyled) .dlp-accordion__a {
	padding: 0 0 16px;
}

/* Popups opened by buttons */
.dlp-popup {
	width: min(92vw, 760px);
	max-width: none;
	max-height: 92vh;
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: #fff;
	color: #222;
	font-size: 1rem;
	font-weight: 400;
	letter-spacing: normal;
	line-height: 1.6;
	text-align: left;
	text-transform: none;
	overflow: visible;
	box-shadow: 0 30px 80px rgb(0 0 0 / 35%);
}
.dlp-popup--sm {
	width: min(92vw, 480px);
}
.dlp-popup--lg {
	width: min(94vw, 1100px);
}
.dlp-popup::backdrop {
	background: rgb(15 20 15 / 72%);
}
.dlp-popup[open] {
	animation: dlp-popup-in 0.22s ease-out;
}
@keyframes dlp-popup-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
}
.dlp-popup__box {
	position: relative;
	max-height: 92vh;
	border-radius: inherit;
	overflow: auto;
}
.dlp-popup__close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgb(0 0 0 / 55%);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}
.dlp-popup__close:hover,
.dlp-popup__close:focus-visible {
	background: #000;
	color: #fff;
}
.dlp-popup__title {
	margin: 0;
	padding: 22px 60px 0 26px;
	font-size: 1.35rem;
	line-height: 1.25;
}
.dlp-popup__content {
	padding: 26px;
}
.dlp-popup__title + .dlp-popup__content {
	padding-top: 14px;
}
.dlp-popup__video {
	aspect-ratio: 16 / 9;
	background: #000;
}
.dlp-popup__video iframe,
.dlp-popup__video video {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}
.dlp-popup--video,
.dlp-popup--image {
	background: #000;
}
.dlp-popup--video .dlp-popup__title,
.dlp-popup--image .dlp-popup__title {
	padding-bottom: 14px;
	color: #fff;
}
.dlp-popup__image {
	display: block;
	width: 100%;
	height: auto;
	max-height: 92vh;
	object-fit: contain;
}
html.dlp-popup-open {
	overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
	.dlp-popup[open] {
		animation: none;
	}
}
