/*
 * DCG Energy — only what Elementor fields cannot do.
 * Colours come from the design system variables (--e-global-color-*)
 * or the kit; selectors bind to global class names.
 */

/* Mobile menu (popup «Мобільне меню»): a line under every item and a chevron
   on the right, as in the 390 frame. The menu widget has no fields for these
   in vertical layout. */
.dsg-mobile-nav .elementor-nav-menu > li {
	border-bottom: 1px solid var(--e-global-color-border);
}

/* The chevron is the link's own background: Elementor hides ::before and
   ::after of menu items that are not hovered. */
.dsg-mobile-nav .elementor-nav-menu > li > a.elementor-item {
	padding-right: 32px;
	background: url("/wp-content/uploads/2026/11/ic-chevrons-right.svg") right center / 20px 20px no-repeat;
}

/* Accent part of a heading («за 30 секунд»). */
.dsg-accent {
	color: var(--e-global-color-primary);
}

/* Calculator: Elementor Pro multi-step form with class dsg-quiz.
   Colours, fonts and field fill are form fields; here only what the
   form has no fields for: the step header, option cards, icons. */
.dsg-quiz .elementor-field-type-html {
	padding-bottom: 12px;
}

.dsg-quiz-head {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.dsg-quiz-head p {
	margin: 0;
	font: 400 15px/1.3 "Montserrat", sans-serif;
	color: var(--e-global-color-text_light);
	opacity: 0.9;
}

.dsg-quiz-head .dsg-quiz-step {
	font-weight: 600;
	font-size: 14px;
	opacity: 1;
}

.dsg-quiz-head h3 {
	margin: 12px 0 0;
	font: 700 28px/1.22 "Montserrat", sans-serif;
	color: var(--e-global-color-text_light);
}

.dsg-quiz-bar {
	display: flex;
	gap: 8px;
}

.dsg-quiz-bar i {
	flex: 0 0 57px;
	height: 10px;
	border-radius: 100px;
	background: var(--e-global-color-line_dark);
	opacity: 0.6;
}

.dsg-quiz-bar i.on {
	background: var(--e-global-color-primary);
	opacity: 1;
}

/* The field's CSS class lands on the options wrapper itself. */
.elementor-field-group:has(> .dsg-quiz-options) > .elementor-field-label {
	display: none;
}

.elementor-field-subgroup.dsg-quiz-options {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	width: 100%;
}

.dsg-quiz-budget .elementor-field-option:last-child {
	grid-column: 1 / -1;
}

.elementor-field-subgroup.dsg-quiz-options .elementor-field-option {
	position: relative;
	display: block;
	width: 100%;
	margin: 0;
}

.elementor-field-subgroup.dsg-quiz-options .elementor-field-option label {
	width: 100%;
	box-sizing: border-box;
}

.dsg-quiz-options .elementor-field-option input {
	position: absolute;
	inset: 0;
	opacity: 0;
	margin: 0;
	cursor: pointer;
}

/* Elementor's form CSS loads later with the same weight: the wrapper class
   doubles here so the card layout wins. */
.elementor-field-subgroup.dsg-quiz-options .elementor-field-option label {
	display: flex;
	align-items: flex-end;
	min-height: 118px;
	padding: 76px 20px 20px;
	border: 1px solid var(--e-global-color-line_dark);
	border-radius: 12px;
	background: var(--e-global-color-dark_deep) no-repeat 20px 20px / 40px 40px;
	color: var(--e-global-color-text_light);
	font: 500 16px/1.22 "Montserrat", sans-serif;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s;
}

.dsg-quiz-options .elementor-field-option label::after {
	content: "";
	position: absolute;
	top: 12px;
	right: 12px;
	width: 18px;
	height: 18px;
	border: 1px solid var(--e-global-color-primary);
	border-radius: 50%;
}

.dsg-quiz-options .elementor-field-option label:hover {
	border-color: var(--e-global-color-primary);
}

.dsg-quiz-options .elementor-field-option input:checked + label {
	background-color: var(--e-global-color-primary);
	border-color: var(--e-global-color-primary);
}

.dsg-quiz-options .elementor-field-option input:checked + label::after {
	border-color: var(--e-global-color-white);
	background: radial-gradient(circle, var(--e-global-color-white) 0 4px, transparent 4.5px);
}

.dsg-quiz-options .elementor-field-option input:focus-visible + label {
	outline: 2px solid var(--e-global-color-text_light);
	outline-offset: 2px;
}

.dsg-quiz-object .elementor-field-option:nth-child(1) label { background-image: url("/wp-content/uploads/2026/11/ic-obj-apartment.svg"); }
.dsg-quiz-object .elementor-field-option:nth-child(2) label { background-image: url("/wp-content/uploads/2026/11/ic-obj-house.svg"); }
.dsg-quiz-object .elementor-field-option:nth-child(3) label { background-image: url("/wp-content/uploads/2026/11/ic-obj-office.svg"); }
.dsg-quiz-object .elementor-field-option:nth-child(4) label { background-image: url("/wp-content/uploads/2026/11/ic-obj-other.svg"); }
.dsg-quiz-appliances .elementor-field-option:nth-child(1) label { background-image: url("/wp-content/uploads/2026/11/ic-q-fridge.svg"); }
.dsg-quiz-appliances .elementor-field-option:nth-child(2) label { background-image: url("/wp-content/uploads/2026/11/ic-q-light.svg"); }
.dsg-quiz-appliances .elementor-field-option:nth-child(3) label { background-image: url("/wp-content/uploads/2026/11/ic-q-wifi.svg"); }
.dsg-quiz-appliances .elementor-field-option:nth-child(4) label { background-image: url("/wp-content/uploads/2026/11/ic-q-tv.svg"); }
.dsg-quiz-appliances .elementor-field-option:nth-child(5) label { background-image: url("/wp-content/uploads/2026/11/ic-q-boiler.svg"); }
.dsg-quiz-appliances .elementor-field-option:nth-child(6) label { background-image: url("/wp-content/uploads/2026/11/ic-q-other.svg"); }
.dsg-quiz-autonomy .elementor-field-option:nth-child(1) label { background-image: url("/wp-content/uploads/2026/11/ic-q-t1.svg"); }
.dsg-quiz-autonomy .elementor-field-option:nth-child(2) label { background-image: url("/wp-content/uploads/2026/11/ic-q-t2.svg"); }
.dsg-quiz-autonomy .elementor-field-option:nth-child(3) label { background-image: url("/wp-content/uploads/2026/11/ic-q-t3.svg"); }
.dsg-quiz-autonomy .elementor-field-option:nth-child(4) label { background-image: url("/wp-content/uploads/2026/11/ic-q-t4.svg"); }
.dsg-quiz-budget .elementor-field-option:nth-child(1) label { background-image: url("/wp-content/uploads/2026/11/ic-q-b1.svg"); }
.dsg-quiz-budget .elementor-field-option:nth-child(2) label { background-image: url("/wp-content/uploads/2026/11/ic-q-b2.svg"); }
.dsg-quiz-budget .elementor-field-option:nth-child(3) label { background-image: url("/wp-content/uploads/2026/11/ic-q-b3.svg"); }
.dsg-quiz-budget .elementor-field-option:nth-child(4) label { background-image: url("/wp-content/uploads/2026/11/ic-q-b4.svg"); }
.dsg-quiz-budget .elementor-field-option:nth-child(5) label { background-image: url("/wp-content/uploads/2026/11/ic-q-b5.svg"); }

.dsg-quiz .elementor-field-textual::placeholder {
	color: var(--e-global-color-text_dim);
}

/* «Назад» on the left with a green outline, «Далі» on the right. */
.dsg-quiz .e-form__buttons {
	justify-content: space-between;
	margin-top: auto;
}

.dsg-quiz .e-form__buttons__wrapper__button-previous {
	border: 1px solid var(--e-global-color-primary);
}

.dsg-quiz .e-form__buttons__wrapper {
	flex: 0 0 auto;
	width: auto;
}

.dsg-quiz .e-form__buttons__wrapper__button {
	min-width: 130px;
}

/* On the first step there is no «Назад»: «Далі» still sits on the right. */
.dsg-quiz .e-form__buttons__wrapper:last-child {
	margin-left: auto;
}

@media (max-width: 767px) {
	.dsg-quiz-head h3 {
		font-size: 24px;
	}

	.elementor-field-subgroup.dsg-quiz-options {
		gap: 12px;
	}

	.dsg-quiz-options .elementor-field-option label {
		min-height: 104px;
		padding: 64px 14px 14px;
		background-position: 14px 14px;
		background-size: 36px 36px;
		font-size: 14px;
	}
}

/* Product details popup: the characteristics table is WooCommerce markup
   (Additional Information widget, class dsg-specs). Name on the left in
   grey, value on the right, no borders, as in the design. */
.dsg-specs .woocommerce-product-attributes,
.dsg-specs table.shop_attributes {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
}

.dsg-specs .shop_attributes tr,
.dsg-specs .shop_attributes tr:nth-child(even) th,
.dsg-specs .shop_attributes tr:nth-child(even) td,
.dsg-specs .shop_attributes th,
.dsg-specs .shop_attributes td {
	border: 0;
	background: none;
}

.dsg-specs .shop_attributes th,
.dsg-specs .shop_attributes td {
	width: 50%;
	padding: 8px 16px 8px 0;
	text-align: left;
	vertical-align: top;
	font: 400 15px/1.3 "Montserrat", sans-serif;
}

.dsg-specs .shop_attributes th {
	color: var(--e-global-color-text_muted);
	opacity: 0.75;
}

.dsg-specs .shop_attributes td {
	color: var(--e-global-color-text);
	font-style: normal;
}

.dsg-specs .shop_attributes td p {
	margin: 0;
	padding: 0;
}

.dsg-specs h2 {
	display: none;
}

/* The popup can be taller than the screen: it scrolls inside. */
#elementor-popup-modal-185 .dialog-message {
	max-height: 90vh;
	overflow-y: auto;
}

@media (max-width: 767px) {
	.dsg-specs .shop_attributes th,
	.dsg-specs .shop_attributes td {
		font-size: 14px;
	}
}

/* Catalog «Показати більше» (Loop Grid load more) sits in the centre. */
.dsg-catalog-grid .e-load-more-anchor + .elementor-button-wrapper {
	margin-top: 20px;
}

/* Site font: WooCommerce and v3 widgets without their own typography
   (side cart, checkout tables, notices) inherit Montserrat. */
body {
	font-family: "Montserrat", sans-serif;
}

/* Checkout (Elementor Pro Checkout widget, class dsg-checkout): section
   titles as the design cards. */
.dsg-checkout .e-checkout__container h3,
.dsg-checkout .e-checkout__order_review h3,
.dsg-checkout #order_review_heading {
	font-family: "Montserrat", sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.22;
}

.dsg-checkout .woocommerce-checkout-review-order-table .order-total td,
.dsg-checkout .woocommerce-checkout-review-order-table .order-total th {
	font-size: 20px;
	font-weight: 600;
}

/* Sticky header: only the bar with the menu, phone and cart stays. The
   whole header is sticky with a negative top equal to the height of the
   upper strip (52px), so that strip scrolls away. On tablet and phone the
   strip is hidden and the header sticks at 0. */
.elementor-location-header {
	position: sticky;
	top: -52px;
	z-index: 900;
	box-shadow: 0 1px 0 var(--e-global-color-border);
}

.admin-bar .elementor-location-header {
	top: -20px; /* 32px admin bar − 52px strip */
}

/* Anchors (/#catalog…) stop below the header, not under it. */
html {
	scroll-padding-top: 76px;
}

.admin-bar {
	scroll-padding-top: 108px;
}

@media (max-width: 1024px) {
	.elementor-location-header {
		top: 0;
	}

	.admin-bar .elementor-location-header {
		top: 32px;
	}

	html {
		scroll-padding-top: 90px;
	}
}

@media (max-width: 782px) {
	.admin-bar .elementor-location-header {
		top: 46px;
	}
}

/* Below 600px WordPress lets the admin bar scroll away. */
@media (max-width: 600px) {
	.admin-bar .elementor-location-header {
		top: 0;
	}
}

/* FAQ accordion (native <details>, class acc-item): the open question gets
   the light background of the design; the plus turns into a cross. */
.acc-item[open] {
	background: var(--e-global-color-green_surface);
}

.acc-item svg {
	transition: transform 0.2s ease;
}

.acc-item[open] > summary svg {
	transform: rotate(45deg);
}

/* «Чому обирають нас» / «Один партнер»: the photo is cut as two
   overlapping rounded rectangles (472×280, r22, at 0/70 and 167/0 of a
   640×350 frame), with a soft shadow that follows the shape. */
.img-steps {
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 350' preserveAspectRatio='none'%3E%3Crect x='0' y='70' width='472' height='280' rx='22'/%3E%3Crect x='167' y='0' width='472' height='280' rx='22'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 350' preserveAspectRatio='none'%3E%3Crect x='0' y='70' width='472' height='280' rx='22'/%3E%3Crect x='167' y='0' width='472' height='280' rx='22'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.img-steps-wrap {
	filter: drop-shadow(0 25px 50px rgba(17, 17, 26, 0.12));
}

/* Lead forms (class dsg-lead-form): 50px fields as in the design. */
.dsg-lead-form .elementor-field-textual {
	min-height: 50px;
	padding: 0 22px;
}

.dsg-lead-form .elementor-field-textual::placeholder {
	color: var(--e-global-color-text_muted);
}

/* Timer in the blue request form: digits to the left, «:» between boxes. */
/* Elementor centres the timer with margin-inline:auto and stretches the
   boxes (three classes); one more class here keeps them at the left. */
.elementor-widget-countdown.dsg-timer.elementor-countdown--label-block .elementor-countdown-wrapper {
	justify-content: flex-start;
	margin-inline: 0 auto;
}

.elementor-widget-countdown.dsg-timer.elementor-countdown--label-block .elementor-countdown-item {
	position: relative;
	flex: 0 0 80px;
}

.dsg-timer .elementor-countdown-item:not(:last-child)::after {
	content: ":";
	position: absolute;
	top: 30%;
	right: -12px;
	color: var(--e-global-color-text);
	font: 500 15px/1 "Montserrat", sans-serif;
}

/* «250+»: the plus is green, as in the design (<em> inside the number). */
.stat-num em {
	font-style: normal;
	color: var(--e-global-color-primary);
}

/* Header phone: one line on narrow phones (font size is set in Elementor). */
.elementor-location-header .text-dark {
	white-space: nowrap;
}

/* Banner slider (atomic Tabs, class hero-slider): the dot is a 9px circle
   inside a 21px ring; the ring shows on the open slide (state Selected). */
.hero-dot {
	background-clip: content-box;
}

/* «Слайд 1…3» inside each dot: for screen readers only. */
.hero-dot > * {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.hero-slider [role="tabpanel"].e--selected {
	animation: dsg-hero-fade 0.5s ease;
}

@keyframes dsg-hero-fade {
	from { opacity: 0.4; }
	to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.hero-slider [role="tabpanel"].e--selected {
		animation: none;
	}
}
