/* Commo Pakowanie na prezent — frontend (koszyk klasyczny i blokowy). Kolory dziedziczone z motywu. */

.commo-gw {
	--commo-gw-border: rgba(0, 0, 0, 0.14);
	--commo-gw-soft: rgba(0, 0, 0, 0.035);
	--commo-gw-accent: currentColor;
	--commo-gw-radius: 6px;
	font-size: 0.95em;
	line-height: 1.45;
}

.commo-gw[hidden] {
	display: none !important;
}

.commo-gw--classic {
	clear: both;
	margin: 0 0 2em;
}

.commo-gw--blocks {
	margin: 0;
	padding: 16px 0;
	border-top: 1px solid var(--commo-gw-border);
}

.commo-gw__box {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.commo-gw--classic .commo-gw__box {
	padding: 20px;
	border: 1px solid var(--commo-gw-border);
	border-radius: var(--commo-gw-radius);
}

.commo-gw__header {
	display: flex;
	align-items: center;
	gap: 8px;
}

.commo-gw__icon {
	flex: none;
}

.commo-gw .commo-gw__title {
	margin: 0;
	padding: 0;
	font-size: 1.1em;
	font-weight: 600;
	line-height: 1.3;
}

.commo-gw__desc,
.commo-gw__hint,
.commo-gw__note,
.commo-gw__picker-label {
	margin: 0;
	opacity: 0.8;
}

.commo-gw__hint {
	font-size: 0.9em;
}

/* --- wybór rodzaju opakowania --- */

.commo-gw__picker {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.commo-gw__types {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 8px;
}

.commo-gw .commo-gw__type {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 10px 8px;
	border: 1px solid var(--commo-gw-border);
	border-radius: var(--commo-gw-radius);
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s, background-color 0.15s;
}

.commo-gw .commo-gw__type:hover {
	border-color: currentColor;
	background: var(--commo-gw-soft);
}

.commo-gw__type-img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 4px;
}

.commo-gw__type-img--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--commo-gw-soft);
}

.commo-gw__type-name {
	font-weight: 600;
	line-height: 1.25;
}

.commo-gw__type-price {
	font-size: 0.9em;
	opacity: 0.8;
}

/* --- opakowanie --- */

.commo-gw__packages {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.commo-gw__package {
	padding: 12px;
	border: 1px solid var(--commo-gw-border);
	border-radius: var(--commo-gw-radius);
	background: var(--commo-gw-soft);
}

.commo-gw__package.is-empty {
	border-style: dashed;
}

.commo-gw__package-head {
	display: flex;
	align-items: center;
	gap: 10px;
}

.commo-gw__thumb {
	flex: none;
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 4px;
}

.commo-gw__package-title {
	display: flex;
	flex: 1;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	min-width: 0;
}

.commo-gw .commo-gw__select {
	width: auto;
	max-width: 100%;
	min-height: 0;
	margin: 0;
	padding: 4px 8px;
	font-size: 0.95em;
}

.commo-gw .commo-gw__remove {
	flex: none;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.7;
}

.commo-gw .commo-gw__remove:hover {
	background: var(--commo-gw-border);
	opacity: 1;
}

.commo-gw .commo-gw__items {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.commo-gw__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0;
}

.commo-gw__item-label {
	display: flex;
	flex: 1;
	align-items: center;
	gap: 8px;
	min-width: 0;
	margin: 0;
	cursor: pointer;
}

.commo-gw .commo-gw__checkbox {
	flex: none;
	margin: 0;
}

.commo-gw__item-img {
	flex: none;
	width: 32px;
	height: 32px;
	object-fit: cover;
	border-radius: 3px;
}

.commo-gw__item-name {
	overflow-wrap: anywhere;
}

.commo-gw__item:not(.is-selected) .commo-gw__item-name {
	opacity: 0.7;
}

.commo-gw__stepper {
	display: flex;
	flex: none;
	align-items: center;
	gap: 4px;
}

.commo-gw .commo-gw__step {
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--commo-gw-border);
	border-radius: 4px;
	background: transparent;
	color: inherit;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.commo-gw .commo-gw__step[aria-disabled="true"] {
	cursor: not-allowed;
	opacity: 0.35;
}

.commo-gw__qty {
	min-width: 3.6em;
	font-variant-numeric: tabular-nums;
	text-align: center;
	white-space: nowrap;
}

/* --- akcje i stopka --- */

.commo-gw .commo-gw__add,
.commo-gw .commo-gw__link {
	align-self: flex-start;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.commo-gw__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 12px;
}

.commo-gw__total {
	display: flex;
	gap: 8px;
}

.commo-gw__status {
	font-size: 0.85em;
	opacity: 0.65;
}

.commo-gw__error {
	flex-basis: 100%;
	margin: 0;
	color: #b32d2e;
}

.commo-gw .commo-gw__summary {
	margin: 0;
	padding: 0 0 0 1.1em;
}

.commo-gw__summary li {
	margin: 0 0 4px;
}

/* --- zapakowane produkty na liście koszyka --- */

/* Ikonka prezentu przed nazwą: koszyk/kasa klasyczna (span) i blokowa (::before na nazwie). */
.commo-gw-item-icon,
.commo-gw-packed .wc-block-components-product-name::before {
	display: inline-block;
	width: 1.05em;
	height: 1.05em;
	margin-right: 0.35em;
	vertical-align: -0.15em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 8h16a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1zM12 8v13M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7M7.5 8a2.5 2.5 0 0 1 0-5C10 3 12 8 12 8s2-5 4.5-5a2.5 2.5 0 0 1 0 5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 8h16a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1zM12 8v13M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7M7.5 8a2.5 2.5 0 0 1 0-5C10 3 12 8 12 8s2-5 4.5-5a2.5 2.5 0 0 1 0 5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.commo-gw-packed .wc-block-components-product-name::before {
	content: "";
}

/* Opis „Pakowanie na prezent: …” pod nazwą produktu — pogrubiony. */
.woocommerce dl.variation dt.variation-Pakowanienaprezent,
.woocommerce dl.variation dd.variation-Pakowanienaprezent,
.woocommerce dl.variation dd.variation-Pakowanienaprezent p,
.wc-block-components-product-details__pakowanie-na-prezent,
.wc-block-components-product-details__pakowanie-na-prezent .wc-block-components-product-details__name,
.wc-block-components-product-details__pakowanie-na-prezent .wc-block-components-product-details__value {
	font-weight: 700;
}

.commo-gw :focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}
