.sb-calculator-root {
    padding: 14px;
    margin: 16px 0;
    /* Paleta dla suwaków – odcienie #2b211a i #4b392e */
    --sb-accent: #4b392e; /* główny akcent i wypełnienie toru */
    --sb-track: #eee;  /* tło niewypełnionej części toru (tint #4b392e) */
    --sb-thumb: #f2eeeb;  /* tło „thumba” (jasny tint #4b392e) */
    --sb-tick: #6a5548;   /* kolor małych ticków (tint #4b392e) */
    --sb-tick-major: #2b211a; /* kolor dużych ticków na krańcach */
    --sb-focus-ring: rgba(75, 57, 46, 0.25); /* ring na focus (rgba #4b392e) */
    --sb-bubble-border: #6a5548; /* ramka bąbla */
    --sb-bubble-bg: #f2eeeb; /* tło bąbla */
}
.sb-calc-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.sb-calc-modes label {
    margin-right: 12px;
    cursor: pointer;
}

.sb-purchase-type {
	display: inline-flex;
	gap: 15px;
	align-items: stretch;
}

.sb-purchase-type label {
    cursor: pointer;
	margin: 0 !important;
	border: 2px solid #4b392e;
	border-radius: 8px;
}

.sb-purchase-type label input {
	position: absolute;
	opacity: 0;
}

.sb-purchase-type label span.sb-desc {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 5px 25px;
	transition: all 0.2s ease;
}

	.sb-purchase-type label span.sb-desc:before {
		content: "";
		display: block;
		width: 16px;
		height: 16px;
		border-radius: 50%;
		border: 2px solid #4b392e;
	}
	
.sb-purchase-type label input:checked + span.sb-desc {
	background: #4b392e;
	color: #fff;
	transition: all 0.2s ease;
}

	.sb-purchase-type label input:checked + span.sb-desc:before {
		border: 2px solid #fff;
		background-color: #fff;
		background-image: url(../img/icoCheck.svg);
		background-size: 16px 16px;
		background-position: 50% 50%;
		background-repeat: no-repeat;		
	}
	
.sb-calc-inputs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
	margin-bottom: 30px;
}

.sb-field-hint {
	font-size: 20px;
}

.sb-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 40px;
}
.sb-field input {
    width: 100%;
}

/* Estetyczne suwaki (range) */
.sb-field input[type="range"] {
	position: relative;
	z-index: 5;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(
        to right,
        var(--sb-accent, #2f76ff) 0%,
        var(--sb-accent, #2f76ff) var(--sb-progress, 0%),
        var(--sb-track, #e9eef7) var(--sb-progress, 0%),
        var(--sb-track, #e9eef7) 100%
    );
    outline: none;
}
.sb-field input[type="range"]:focus {
    box-shadow: 0 0 0 1px var(--sb-focus-ring);
}

/* Kontener suwaka z tickami */
.sb-range { 
	position: relative; 
	margin-bottom: 12px; 
}
.sb-range-ticks {
    position: absolute;
    left: 0; right: 0;
    bottom: -4px;
    height: 12px;
    pointer-events: none;
}
.sb-range-ticks .sb-tick {
    position: absolute;
    width: 2px;
    height: 8px;
    background: #D2D485;
    border-radius: 2px;
    transform: translateX(-1px);
}
.sb-range-ticks .sb-tick.sb-tick--major {
    height: 12px;
    background: #D2D485;
}

/* Bąbel podążający za suwakiem (tylko dla x-hintu) */
.sb-range .sb-range-bubble {
    position: absolute;
    top: -35px;
    left: 0;
    padding: 5px 15px;
    font-size: 16px;
    line-height: 20px;
	font-weight: 500;
    border-radius: 6px;
    background: var(--sb-bubble-bg);
    pointer-events: none;
    white-space: nowrap;
    text-align: center;
}
.sb-range .sb-range-bubble.left { text-align: left; }
.sb-range .sb-range-bubble.right { text-align: right; }
.sb-range .sb-range-bubble.center { text-align: center; }

/* WebKit (Chrome, Safari, Edge) */
.sb-field input[type="range"]::-webkit-slider-runnable-track {
    height: 10px;
    border-radius: 999px;
    background: transparent; /* używamy tła na samym elemencie */
}
.sb-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4b392e;
    border: 2px solid #4b392e;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    margin-top: -5px; /* wyśrodkowanie względem toru (10px height) */
}

/* Firefox */
.sb-field input[type="range"]::-moz-range-track {
    height: 10px;
    border-radius: 999px;
    background: #4b392e;
}
.sb-field input[type="range"]::-moz-range-progress {
    height: 10px;
    border-radius: 999px;
    background: #4b392e;
}
.sb-field input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4b392e;
    border: 2px solid #4b392e;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

/* Drobne odstępy pod suwakami */
.sb-field .sb-field-hint {
    margin-top: 6px;
}
.sb-selected-result,
.sb-calc-result {
    font-weight: 500;
	background: var(--blue);
	border-radius: 8px;
	padding: 10px 15px;
	text-align: center;
}
.sb-note {
    font-size: 12px;
    color: #666;
}

.sb-calc-vars {
    margin-top: 50px;
}
.sb-vars-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
	margin-bottom: 10px;
}
.sb-var-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
}
.sb-var-item.sb-out {
    opacity: 0.6;
}
.sb-var-item input[type="number"] {
    width: 90px;
}

.sb-calc-actions {
    display: flex;
	flex-direction: column;
	align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 35px;
}

.sb-total-price {
	margin-top: 20px;
	font-size: 18px;
}

	.sb-total-price .sb-price-total {
		font-size: 28px;
		font-weight: 600;
		color: #4b392e;
	}

.sb-unit-price {
	font-size: 16px;
	color: #666;
}

.sb-delivery-note {
	font-size: 14px;
	color: #666;
}

.sb-add-to-cart {
	width: 100%;
	font-size: 16px !important;
	font-weight: 500;
	line-height: 1;
	display: inline-flex;
	justify-content: center;
	background-color: #4b392e !important;
	color: #fff !important;
	align-items: center;
	gap: 5px;	
	border-radius: 16px 16px 16px 16px;
	padding: 22px 16px 22px 24px;
	cursor: pointer;
	margin-top: 10px;
	transition: all 0.4s ease;
}

/* Stan ładowania i zablokowany przycisk */
.sb-add-to-cart.is-loading,
.sb-add-to-cart[disabled] {
    opacity: 0.85;
    cursor: not-allowed !important;
}
.sb-add-to-cart.is-loading:hover,
.sb-add-to-cart[disabled]:hover {
    transform: none;
}
.sb-add-to-cart.is-loading:after {
    display: none; /* ukryj ikonę plusa podczas ładowania */
}

/* Spinner dla stanu ładowania */
.sb-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.5);
    border-top-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    animation: sb-spin 0.6s linear infinite;
}
@keyframes sb-spin { to { transform: rotate(360deg); } }

	.sb-add-to-cart:after {
		content: "";
		display: inline-block;
		width: 16px;
		height: 16px;
		vertical-align: middle;

		/* Ikona dziedziczy kolor tekstu przycisku */
		background-color: currentColor;

		/* Maska SVG (obsługa Chrome/Safari/Edge) */
		-webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13.5 3C13.5 2.44772 13.0523 2 12.5 2H11.5C10.9477 2 10.5 2.44772 10.5 3V10.5H3C2.44772 10.5 2 10.9477 2 11.5V12.5C2 13.0523 2.44772 13.5 3 13.5H10.5V21C10.5 21.5523 10.9477 22 11.5 22H12.5C13.0523 22 13.5 21.5523 13.5 21V13.5H21C21.5523 13.5 22 13.0523 22 12.5V11.5C22 10.9477 21.5523 10.5 21 10.5H13.5V3Z" /></svg>');
		-webkit-mask-repeat: no-repeat;
		-webkit-mask-position: center;
		-webkit-mask-size: 100% 100%;

		/* Maska SVG (obsługa Firefox) */
		mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13.5 3C13.5 2.44772 13.0523 2 12.5 2H11.5C10.9477 2 10.5 2.44772 10.5 3V10.5H3C2.44772 10.5 2 10.9477 2 11.5V12.5C2 13.0523 2.44772 13.5 3 13.5H10.5V21C10.5 21.5523 10.9477 22 11.5 22H12.5C13.0523 22 13.5 21.5523 13.5 21V13.5H21C21.5523 13.5 22 13.0523 22 12.5V11.5C22 10.9477 21.5523 10.5 21 10.5H13.5V3Z" /></svg>');
		mask-repeat: no-repeat;
		mask-position: center;
		mask-size: 100% 100%;
	}
	
	.sb-add-to-cart:hover {
		transform: scale(1.03);
		transition: all 0.4s ease;
	}
	
.sb-calc-status {
    margin-left: auto;
    font-weight: 600;
	display: block;
	width: 100%;
	text-align: center;
	border-radius: 8px;
	padding: 5px 15px;
	box-sizing: border-box;
}

.sb-calc-status[data-status="ok"] {
    background: #D2D485;
    color: #444040;
}
.sb-calc-status[data-status="under"] {
    background: #2e7d32;
    color: #444040;
}
.sb-calc-status[data-status="over"] {
    background: #f598a0;
    color: #444040;
}

@media (max-width: 768px) {
    .sb-calc-inputs {
        grid-template-columns: 1fr;
    }
}
/* ===== Variants list & product item controls ===== */
.sb-vars-list {
    gap: 10px;
}

.sb-var-item {
    padding: 10px 12px;
    background: #fafafa;
    border-radius: 8px;
	border: 0;
}

.sb-var-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sb-var-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

/* Custom-styled checkbox */
.sb-var-item .sb-var-check {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--sb-accent);
    background: #fff;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.sb-var-item .sb-var-check:focus {
    box-shadow: 0 0 0 3px var(--sb-focus-ring);
}
.sb-var-item .sb-var-check:checked {
    background-color: var(--sb-accent);
    border-color: var(--sb-accent);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M20.285 5.791l-11 11-5.285-5.286 1.414-1.414 3.871 3.871 9.586-9.586z'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
}
.sb-var-item .sb-var-check[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quantity and +/- buttons */
.sb-var-quantity {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.sb-var-quantity .sb-qty-note {
    margin-left: 8px;
    font-size: 12px;
    line-height: 1.4;
    color: #d35400; /* delikatny akcent ostrzegawczy */
}
.sb-var-quantity .sb-qty-minus,
.sb-var-quantity .sb-qty-plus,
.sb-var-quantity .sb-qty-minus5,
.sb-var-quantity .sb-qty-plus5 {
	width: 35px;
	height: 35px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	background: #4b392e;
	color: #fafafa;
	cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
	transition: all 0.2s ease;
}
.sb-var-quantity .sb-qty-minus:hover,
.sb-var-quantity .sb-qty-plus:hover,
.sb-var-quantity .sb-qty-minus5:hover,
.sb-var-quantity .sb-qty-plus5:hover {
    background: #324A6E;
    color: #fff;
	transform: scale(1.05);
	transition: all 0.2s ease;
}
.sb-var-quantity .sb-qty-minus:disabled,
.sb-var-quantity .sb-qty-plus:disabled,
.sb-var-quantity .sb-qty-minus5:disabled,
.sb-var-quantity .sb-qty-plus5:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sb-var-quantity .sb-var-qty {
    width: 50px;
    padding: 8px 10px;
    text-align: center;
    border: 1px solid var(--sb-bubble-border);
    border-radius: 6px;
	font-size: 16px;
    background: #fff;
}
.sb-var-quantity .sb-var-qty:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--sb-focus-ring);
}

/* Hide number spinners (WebKit) and normalize (Firefox) */
.sb-var-quantity .sb-var-qty::-webkit-outer-spin-button,
.sb-var-quantity .sb-var-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.sb-var-quantity .sb-var-qty[type=number] {
    -moz-appearance: textfield;
}
.sb-calc-actions .button.is-secondary,
.sb-calc-actions .sb-btn.is-secondary {
    background: var(--sb-thumb);
    color: var(--sb-accent);
}
.sb-calc-actions .button.is-secondary:hover,
.sb-calc-actions .sb-btn.is-secondary:hover {
    background: var(--sb-accent);
    color: #fff;
}

/* Radio group */
.sb-calc-actions .sb-radio-group {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.sb-calc-actions .sb-radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.sb-calc-actions .sb-radio input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--sb-accent);
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.sb-calc-actions .sb-radio input[type="radio"]:focus {
    box-shadow: 0 0 0 3px var(--sb-focus-ring);
}
.sb-calc-actions .sb-radio input[type="radio"]:checked {
    background-color: var(--sb-accent);
    border-color: var(--sb-accent);
    background-image: radial-gradient(circle at 50% 50%, #ffffff 0 40%, transparent 40% 100%);
    background-repeat: no-repeat;
}
.sb-calc-actions .sb-radio label,
.sb-calc-actions .sb-radio .sb-radio-label {
    cursor: pointer;
}

/* Fallback styling if radios are not wrapped */
.sb-calc-actions input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--sb-accent);
    background: #fff;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.sb-calc-actions input[type="radio"]:focus { box-shadow: 0 0 0 3px var(--sb-focus-ring); }
.sb-calc-actions input[type="radio"]:checked {
    background-color: var(--sb-accent);
    border-color: var(--sb-accent);
    background-image: radial-gradient(circle at 50% 50%, #ffffff 0 40%, transparent 40% 100%);
}

/* Tooltip dla opcji Subskrypcja */
.sb-tooltip {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center !important;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--sb-accent, #2f76ff);
    color: var(--sb-accent, #2f76ff);
    font-size: 12px;
	font-weight: 600;
    line-height: 1;
    cursor: help;
}

input:checked + span.sb-desc span.sb-tooltip {
    border: 1px solid #fff;
    color: #fff;
}

.sb-tooltip:focus { outline: none; box-shadow: 0 0 0 3px var(--sb-focus-ring, rgba(47,118,255,.25)); }
.sb-tooltip::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 8px);
    min-width: 220px;
    max-width: 320px;
    background: #333;
    color: #fff;
    padding: 8px 10px;
	font-weight: 400;
	line-height: 1.5;
	font-size: 14px;
	text-align: center;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
    z-index: 100;
    white-space: normal;
}
.sb-tooltip:hover::after,
.sb-tooltip:focus::after { opacity: 1; }
.sb-tooltip:hover::before,
.sb-tooltip:focus::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 4px);
    border: 6px solid transparent;
    border-top-color: #333;
}