/*
 * VeniDesign Toolkit — calculator.css
 * Wyciągnięte z inline <style> (v1.9.4). Ładowane warunkowo na karcie produktu.
 */
/* ==================================================================
   CALCULATOR CARD (makieta rebrandingu)
   ================================================================== */
.vdt-calc-card {
	background: #fff;
	border: 1px solid var(--theme-palette-color-5, #e6e4d6);
	border-radius: 14px;
	padding: 20px 22px;
	margin: 16px 0 0;
	box-shadow: 0 18px 40px -34px rgba(29,41,23,.5);
}
.vdt-calc-card__head {
	display: flex; align-items: center; justify-content: space-between;
	gap: 10px; flex-wrap: wrap; margin-bottom: 13px;
}
.vdt-calc-card__title {
	display: flex; align-items: center; gap: 8px;
	font-size: .92rem; font-weight: 700;
}
.vdt-calc-card__title svg { color: var(--theme-palette-color-2, #3FA744); }
.vdt-calc-card__badge {
	display: inline-flex; align-items: center; gap: 7px;
	font-size: .85rem; font-weight: 700;
	color: var(--theme-palette-color-2, #3FA744);
	background: var(--theme-palette-color-6, #eef1e6);
	border: 1px solid transparent;
	padding: 7px 14px; border-radius: 999px; white-space: nowrap;
	cursor: pointer; transition: background .15s, border-color .15s;
}
.vdt-calc-card__badge:hover {
	background: #fff;
	border-color: var(--theme-palette-color-2, #3FA744);
}
.vdt-calc-card__badge:focus-visible { outline: 2px solid var(--theme-palette-color-1, #f98d00); outline-offset: 2px; }
/* Stan „masz wprowadzone pokoje" → „Wybierz pomieszczenie" z animowanym borderem. */
.vdt-calc-card__badge--filled {
	color: #fff;
	background: #2e7d33;
	position: relative;
	border-color: transparent;
	animation: vdt-badge-glow 2.2s ease-in-out infinite;
}
.vdt-calc-card__badge--filled:hover { background: #256428; }
@keyframes vdt-badge-glow {
	0%, 100% { box-shadow: 0 0 0 0 rgba(63,167,68,.55); }
	50%      { box-shadow: 0 0 0 6px rgba(63,167,68,0); }
}
@media (prefers-reduced-motion: reduce) {
	.vdt-calc-card__badge--filled { animation: none; }
}
.vdt-calc-label {
	display: block; font-size: .76rem; font-weight: 600;
	color: #6b6357; margin-bottom: 6px;
}
.vdt-calc-row { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
/* Kąt gradientu ramki steppera — rejestrowany dla płynnej animacji. */
@property --vdt-calc-angle {
	syntax: "<angle>";
	initial-value: 0deg;
	inherits: false;
}
.vdt-calc-stepper {
	--vdt-calc-angle: 0deg;
	position: relative; isolation: isolate;
	flex: 1; min-width: 220px;
	display: flex; align-items: center;
	border: 0; border-radius: 8px;
	background: #fbf9f4; overflow: hidden;
}
/* Subtelna pomarańczowa animowana ramka (jak przy przyciskach doradców).
   Pierścień = maskowany gradient; fallback bez @property = statyczny. */
.vdt-calc-stepper::before {
	content: "";
	position: absolute; inset: 0; z-index: -1;
	opacity: .5; /* stonowana pomarańcz (~50%) */
	border-radius: inherit; padding: 1.5px;
	background: conic-gradient( from var(--vdt-calc-angle),
		#f98d00, #ffc888, #f98d00, #ffb45c, #f98d00 );
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	        mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	        mask-composite: exclude;
	animation: vdt-calc-border 6s linear infinite;
}
@keyframes vdt-calc-border { to { --vdt-calc-angle: 360deg; } }
.vdt-calc-stepper__btn {
	width: 42px; height: 46px; flex: none;
	border: none; background: transparent; cursor: pointer;
	font-size: 20px; font-weight: 700; line-height: 1;
	color: var(--theme-palette-color-2, #3FA744);
}
.vdt-calc-stepper__btn:hover { background: rgba(63,167,68,.08); }
/* Focus-ring standard projektu (WORKFLOW §7); offset ujemny, bo stepper ma overflow:hidden. */
.vdt-calc-stepper__btn:focus-visible { outline: 2px solid #f98d00; outline-offset: -2px; }
.vdt-calc-stepper__mid {
	flex: 1; min-width: 0; height: 46px;
	display: flex; align-items: center; justify-content: center; gap: 5px;
}
.vdt-calc-stepper__mid input {
	width: auto; max-width: 84px; padding: 0;
	border: none !important; background: transparent !important;
	text-align: right; font-size: 18px; font-weight: 700;
	color: #1d2917 !important; outline: none; box-shadow: none !important;
}
.vdt-calc-stepper__mid input:focus-visible { outline: 2px solid #f98d00; outline-offset: 2px; }
.vdt-calc-stepper__unit { font-size: 13px; font-weight: 700; color: #1d2917; }
.vdt-calc-stepper__packs { font-size: 12px; font-weight: 500; color: #a89c87; white-space: nowrap; margin-left: 4px; }
.vdt-calc-reserve {
	display: flex; align-items: center; gap: 8px;
	font-size: .78rem; font-weight: 600; color: #243018;
	cursor: pointer; max-width: 130px; line-height: 1.3; margin: 0;
}
.vdt-calc-reserve-check {
	appearance: none; -webkit-appearance: none;
	width: 22px; height: 22px; flex: none;
	border: 1.5px solid #cfc6b3; border-radius: 6px;
	margin: 0 !important; padding: 0; cursor: pointer;
	display: grid; place-content: center;
	background: #fff; transition: all .15s;
}
.vdt-calc-reserve-check::before {
	content: ""; width: 11px; height: 11px;
	background-color: #fff; transform: scale(0); transition: 120ms transform ease-in-out;
	clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.vdt-calc-reserve-check:focus-visible { outline: 2px solid #f98d00; outline-offset: 2px; }
.vdt-calc-reserve-check:checked { background: var(--theme-palette-color-2, #3FA744); border-color: var(--theme-palette-color-2, #3FA744); }
.vdt-calc-reserve-check:checked::before { transform: scale(1); }
.vdt-calc-summary {
	display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
	margin-top: 15px; padding-top: 14px; border-top: 1px dashed #e0ddcf;
}
.vdt-calc-summary__buy { font-size: .8rem; font-weight: 600; color: #6b6357; }
.vdt-calc-summary__buy b { color: #1d2917; }
.vdt-calc-summary__note { font-size: .72rem; font-weight: 500; color: #a89c87; margin-top: 2px; }
.vdt-calc-summary__right { text-align: right; }
.vdt-calc-summary__total-label { font-size: .68rem; font-weight: 500; color: #6b6357; }
.vdt-calc-summary__total { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; color: #1d2917; line-height: 1.1; }

/* ==================================================================
   BUY AREA: ukryta ilość, pomarańczowy CTA, stock
   ================================================================== */
body.single-product form.cart { border: 0 !important; padding: 0; background: transparent; margin-top: 12px; margin-bottom: 0; }
/* Blocksy daje summary-dzieciom margin-bottom: var(--product-element-spacing);
   na .ct-product-add-to-cart jest 35px — stąd luka nad telefonem. Ścinamy. */
body.single-product .entry-summary-items > .ct-product-add-to-cart { --product-element-spacing: 8px !important; }
body.single-product .ct-cart-actions .quantity { display: none !important; }
body.single-product .ct-cart-actions .m2-value { display: none !important; }
/* Blocksy owija quantity + button w .ct-cart-actions (flex row) i przesuwa przycisk
   nad wstrzyknięte tu elementy (kreator, wysyłka). Wymuszamy pion + kolejność:
   kalkulator (poza kontenerem, wyżej) → kreator → wysyłka → przycisk. */
body.single-product .ct-cart-actions { display: flex !important; flex-direction: column !important; align-items: stretch; }
body.single-product .ct-cart-actions > .quantity { order: 0 !important; }
body.single-product .ct-cart-actions > #vdt-kit { order: 1 !important; }
body.single-product .ct-cart-actions > .vdt-calc-stockline { order: 2 !important; }
body.single-product .ct-cart-actions > .single_add_to_cart_button { order: 3 !important; }
button.single_add_to_cart_button {
	flex: 1; width: 100%;
	height: auto !important;
	min-height: 0 !important;
	padding: 15px 20px !important;
	background: var(--theme-palette-color-1, #f98d00) !important;
	/* Biały tekst — decyzja właściciela 2026-07-15 (brand); kontrast poniżej AA, kompensacja: bold 15px. */
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	border-radius: 4px !important;
	transition: background .2s, transform .2s, box-shadow .2s !important;
}
button.single_add_to_cart_button:hover {
	background: #e07f00 !important;
	transform: translateY(-2px);
	box-shadow: 0 16px 28px -12px rgba(249,141,0,.6);
}
.summary.entry-summary .stock { display: none !important; }
.vdt-calc-stockline {
	display: flex; align-items: center; gap: 9px;
	margin: 0 2px 12px;
	font-size: .85rem; font-weight: 600; color: #2e7d33;
}
.vdt-calc-stockline__dot {
	width: 9px; height: 9px; border-radius: 999px; flex: none;
	background: var(--theme-palette-color-2, #3FA744);
	box-shadow: 0 0 0 0 rgba(63,167,68,.5);
	animation: vdt-stock-pulse 2.2s ease-out infinite;
}
@keyframes vdt-stock-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(63,167,68,.5); }
	70%  { box-shadow: 0 0 0 7px rgba(63,167,68,0); }
	100% { box-shadow: 0 0 0 0 rgba(63,167,68,0); }
}
@media (prefers-reduced-motion: reduce) {
	.vdt-calc-stockline__dot { animation: none; box-shadow: 0 0 0 4px rgba(63,167,68,.18); }
	.vdt-calc-stepper::before { animation: none; }
}
/* Całość na zielono (w tym treść z [shipping_info]). */
.vdt-calc-stockline .vdt-shipping-info { display: inline; margin: 0; color: inherit; font-weight: 600; }
/* Cena wyśrodkowana w pionie pustej przestrzeni summary. */
.single-product div.product .entry-summary { display: flex; flex-direction: column; }
.single-product div.product .entry-summary > .price {
	margin-top: auto !important;
	margin-bottom: auto !important;
}

/* Producent (logo) po lewej, „Porównaj" po prawej — ten sam wiersz.
   Oba to elementy Blocksy w .entry-summary-items (flex-kolumna) — przycisk
   Porównaj pozycjonujemy absolutnie do prawego górnego rogu, na wysokości logo. */
.single-product .entry-summary-items { position: relative; }
.single-product .entry-summary-items > .ct-product-additional-actions {
	position: absolute; top: 0; right: 0; margin: 0; z-index: 2;
}

/* ==================================================================
   ROOM CALCULATOR MODAL
   ================================================================== */
.vdt-room-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s, visibility .25s;
}
.vdt-room-modal[aria-hidden="false"] {
	opacity: 1;
	visibility: visible;
}
.vdt-room-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.55);
	backdrop-filter: blur(3px);
}
.vdt-room-modal__dialog {
	position: relative;
	background: #fff;
	border-radius: 16px;
	width: 95%;
	max-width: 640px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 25px 60px rgba(0,0,0,.2);
	transform: translateY(20px);
	transition: transform .3s cubic-bezier(.22,1,.36,1);
	box-sizing: border-box;
	overflow: hidden;
}
.vdt-room-modal[aria-hidden="false"] .vdt-room-modal__dialog {
	transform: translateY(0);
}

/* Header */
.vdt-room-modal__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding: 24px 28px 16px;
	border-bottom: 1px solid #e6e4d6;
	flex-shrink: 0;
}
.vdt-room-modal__title {
	font-size: 1.15rem;
	font-weight: 800;
	margin: 0;
	color: #1d2917;
}
.vdt-room-modal__subtitle {
	font-size: .82rem;
	color: #6b6357;
	margin: 4px 0 0;
}
.vdt-room-modal__close {
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px;
	border-radius: 8px;
	color: #6b6357;
	transition: color .15s, background .15s;
}
.vdt-room-modal__close:hover {
	color: #1d2917;
	background: #f7f3ec;
}

/* Body (scrollable room list) */
.vdt-room-modal__body {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	touch-action: pan-y;
	padding: 16px 28px;
	min-height: 120px;
}
.vdt-room-modal__body::-webkit-scrollbar { width: 6px; }
.vdt-room-modal__body::-webkit-scrollbar-thumb { background: #d9d8c6; border-radius: 3px; }

/* Empty state */
.vdt-room-empty {
	text-align: center;
	padding: 30px 10px;
	color: #6b6357;
	font-size: .9rem;
}
.vdt-room-empty svg {
	margin-bottom: 10px;
	opacity: .4;
}

/* Room card */
.vdt-room-card {
	background: #f7f3ec;
	border: 1px solid #e6e4d6;
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 12px;
	transition: opacity .2s, border-color .2s;
}
.vdt-room-card.vdt-room-card--unchecked {
	opacity: .45;
	border-color: #e6e4d6;
}
.vdt-room-card__top {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}
.vdt-room-card__check {
	width: 20px;
	height: 20px;
	accent-color: var(--theme-palette-color-2, #3FA744);
	cursor: pointer;
	flex-shrink: 0;
}
.vdt-room-card__name {
	flex: 1;
	border: 1px solid #e6e4d6;
	border-radius: 6px;
	padding: 6px 10px;
	font-size: .88rem;
	font-weight: 600;
	background: #fff !important;
	color: #1d2917 !important;
	outline: none;
	transition: border-color .15s;
}
.vdt-room-card__name:focus {
	border-color: var(--theme-palette-color-2, #3FA744);
	background: #fff !important;
	color: #1d2917 !important;
}
.vdt-room-card__area-badge {
	background: #2e7d33;
	color: #fff;
	font-size: .78rem;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 20px;
	white-space: nowrap;
	min-width: 52px;
	text-align: center;
}
.vdt-room-card__delete {
	position: relative;
	background: none;
	border: none;
	cursor: pointer;
	color: #a89c87;
	padding: 4px;
	border-radius: 6px;
	transition: color .15s, background .15s;
	flex-shrink: 0;
}
/* Hit-area ≥44px bez zmiany wyglądu (ikona 26px + 2×9px). */
.vdt-room-card__delete::after {
	content: "";
	position: absolute;
	inset: -9px;
}
.vdt-room-card__delete:hover {
	color: #b32d2e;
	background: #fdeaea;
}

/* Shape selector (toggle buttons) */
.vdt-room-card__shape-row {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	flex-wrap: wrap;
}
.vdt-room-card__shape-btns {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
}
.vdt-room-card__shape-btn {
	padding: 5px 10px;
	border: 1.5px solid #e6e4d6;
	border-radius: 6px;
	background: #fff;
	font-size: .72rem;
	font-weight: 600;
	color: #6b6357;
	cursor: pointer;
	transition: all .15s;
	white-space: nowrap;
}
.vdt-room-card__shape-btn:hover {
	border-color: var(--theme-palette-color-2, #3FA744);
	color: var(--theme-palette-color-2, #3FA744);
}
.vdt-room-card__shape-btn.vdt-shape-active {
	background: #2e7d33;
	border-color: #2e7d33;
	color: #fff;
}

/* Dimension fields container (STARE — unused) */
.vdt-room-card__dims { display: none; }

/* ────────────────────────────────────────────────
   Floor Plan Diagram
   ============================================== */
.vdt-floor-plan {
	margin-top: 12px;
	display: flex;
	justify-content: center;
}
.vdt-floor-plan__wrap {
	position: relative;
	display: inline-block;
}
.vdt-floor-plan__svg {
	display: block;
}
.vdt-dim-label {
	position: absolute;
	display: flex;
	align-items: center;
	gap: 2px;
}
.vdt-dim-label input {
	width: 54px;
	padding: 3px 5px;
	border: 1.5px solid #e6e4d6;
	border-radius: 5px;
	font-size: .78rem;
	font-weight: 700;
	text-align: center;
	outline: none;
	transition: border-color .15s;
	background: #fff !important;
	color: #1d2917 !important;
}
.vdt-dim-label input:focus {
	border-color: var(--theme-palette-color-2, #3FA744);
	background: #fff !important;
	color: #1d2917 !important;
}
.vdt-dim-label__unit {
	font-size: .68rem;
	color: #6b6357;
	font-weight: 600;
}
.vdt-dim-manual {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 12px;
}
.vdt-dim-manual input {
	width: 90px;
	padding: 7px 10px;
	border: 1.5px solid #e6e4d6;
	border-radius: 6px;
	font-size: .95rem;
	font-weight: 700;
	text-align: center;
	outline: none;
	transition: border-color .15s;
	background: #fff !important;
	color: #1d2917 !important;
}
.vdt-dim-manual input:focus {
	border-color: var(--theme-palette-color-2, #3FA744);
	background: #fff !important;
	color: #1d2917 !important;
}
.vdt-dim-manual__unit {
	font-size: .9rem;
	color: #6b6357;
	font-weight: 600;
}

/* Footer */
.vdt-room-modal__footer {
	padding-top: 16px;
	padding-bottom: 24px;
	padding-left: 24px;
	padding-right: 24px;
	border-top: 1px solid #e6e4d6;
	box-sizing: border-box;
	width: 100%;
	flex-shrink: 0;
	background: #fff;
}
.vdt-room-add-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	padding: 10px;
	background: #f7f3ec;
	border: 1.5px dashed #cfc6b3;
	border-radius: 10px;
	font-size: .88rem;
	font-weight: 600;
	color: #6b6357;
	cursor: pointer;
	transition: border-color .15s, color .15s, background .15s;
	margin-top: 4px;
}
.vdt-room-add-btn:hover {
	border-color: var(--theme-palette-color-2, #3FA744);
	color: var(--theme-palette-color-2, #3FA744);
	background: rgba(63,167,68,.04);
}
.vdt-room-modal__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 0 2px;
}
.vdt-room-modal__total-label {
	font-size: .9rem;
	color: #1d2917;
}
.vdt-room-modal__total-label strong {
	font-size: 1.1rem;
	color: #1d2917;
}
.vdt-room-apply-btn {
	padding: 12px 28px;
	background: #2e7d33;
	color: #fff;
	border: none;
	border-radius: 10px;
	font-size: .95rem;
	font-weight: 700;
	cursor: pointer;
	transition: filter .15s, transform .1s;
	white-space: nowrap;
}
.vdt-room-apply-btn:hover:not(:disabled) {
	filter: brightness(.9);
	transform: translateY(-1px);
}
.vdt-room-apply-btn:disabled {
	opacity: .5;
	cursor: not-allowed;
}

/* Focus-ring — standard projektu (WORKFLOW §7) dla interaktywnych elementów modalu. */
.vdt-room-modal__close:focus-visible,
.vdt-room-card__check:focus-visible,
.vdt-room-card__name:focus-visible,
.vdt-room-card__delete:focus-visible,
.vdt-room-card__shape-btn:focus-visible,
.vdt-dim-label input:focus-visible,
.vdt-dim-manual input:focus-visible,
.vdt-room-add-btn:focus-visible,
.vdt-room-apply-btn:focus-visible {
	outline: 2px solid #f98d00;
	outline-offset: 2px;
}

@media only screen and (max-width: 600px) {
	.vdt-calc-row { flex-direction: column; }
	.vdt-calc-reserve { max-width: none; }
	.vdt-calc-stepper__mid input { font-size: 16px; }
	.ct-cart-actions .single_add_to_cart_button,
	.ct-cart-actions .ct-wishlist-button-single {
		flex-grow: 1;
		flex-shrink: 1;
		flex-basis: 100%;
	}
	/* Modal — pełny ekran z odliczeniem pasków przeglądarki */
	.vdt-room-modal {
		align-items: stretch;
	}
	.vdt-room-modal__dialog {
		width: 100%;
		height: 100%;
		max-height: 100%;
		border-radius: 0;
		align-self: stretch;
		transform: none !important;
	}
	.vdt-room-modal__header { padding: 18px 18px 14px; }
	.vdt-room-modal__body { padding: 12px 18px; }
	.vdt-room-modal__footer {
		padding: 16px 20px !important;
		padding-bottom: max(20px, env(safe-area-inset-bottom)) !important;
		box-sizing: border-box;
	}
	.vdt-room-card__shape-row { flex-direction: column; }
	.vdt-room-card__dims { width: 100%; }
	.vdt-room-card__shape-svg { align-self: center; }
	.vdt-room-modal__summary { flex-direction: column; gap: 8px; }
	.vdt-room-apply-btn { width: 100%; }
	/* iOS: font-size < 16px triggers auto-zoom on input focus; fix all modal inputs */
	.vdt-dim-label input,
	.vdt-dim-manual input,
	.vdt-room-card__name,
	.vdt-room-card__dim-input {
		font-size: 16px !important;
	}
}
