/* Accencis Cart Bonus – darček a doprava zadarmo */

.gb-bonus-wrap {
	display: block;
	margin: 0 0 1.5em;
}

.gb-bonus-wrap:empty {
	margin: 0;
}

.gb-bonus {
	/* Preberá globálne farby Bricks, s fallbackom na predvolenú zlatú. */
	--gb-accent: var(--primary, #f2ddba);
	--gb-accent-dark: var(--primary-d-1, #bdad93);
	--gb-card: #181816;
	--gb-text: #f6f4ee;

	display: flex;
	align-items: center;
	gap: 16px;
	padding: 18px 22px;
	background: var(--gb-card);
	color: var(--gb-text);
	border: 1px solid #2c2c2a;
	border-radius: 3px;
	box-shadow: 0 12px 26px -20px rgba(0, 0, 0, 0.6);
}

.gb-bonus__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	background: var(--gb-accent);
	color: #181816;
}

.gb-bonus__icon svg {
	display: block;
	width: 21px;
	height: 21px;
}

.gb-bonus__body {
	display: block;
	flex: 1 1 auto;
	min-width: 0;
}

.gb-bonus__text {
	display: block;
	margin: 0 0 10px;
	font-size: 15px;
	line-height: 1.5;
	letter-spacing: 0.01em;
	color: var(--gb-text);
}

.gb-bonus__text strong {
	color: var(--gb-accent);
}

.gb-bonus__text .woocommerce-Price-amount {
	font-weight: 700;
	color: var(--gb-accent);
	white-space: nowrap;
}

.gb-bonus__text a {
	color: var(--gb-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: var(--gb-accent-dark);
	transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.gb-bonus__text a:hover,
.gb-bonus__text a:focus {
	color: #fff;
	text-decoration-color: var(--gb-accent);
}

.gb-bonus__bar {
	position: relative;
	display: block;
	height: 7px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	overflow: hidden;
}

.gb-bonus__bar-fill {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	display: block;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--gb-accent-dark), var(--gb-accent));
	transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.gb-bonus.is-reached {
	border-color: var(--gb-accent-dark);
}

/* Kompaktná verzia pre mini košík (vnútri <p> s medzisúčtom, preto <span>) */

/* Témy často zobrazujú riadok s medzisúčtom ako flex (nadpis vľavo, suma
   vpravo) – banner by potom skončil vedľa textu. Povolené zalomenie
   + plná šírka mu vynútia vlastný riadok; na ne-flex rozložení sú tieto
   vlastnosti neúčinné, takže je to bezpečné všade. */
.woocommerce-mini-cart__total {
	flex-wrap: wrap;
}

.gb-bonus-mini-wrap {
	display: block;
	flex: 0 0 100%;
	width: 100%;
	min-width: 100%;
	grid-column: 1 / -1;
	margin: 0 0 14px;
}

.gb-bonus-mini-wrap:empty {
	margin: 0;
}

.gb-bonus-mini {
	--gb-accent: var(--primary, #f2ddba);
	--gb-accent-dark: var(--primary-d-1, #bdad93);
	--gb-text: #f6f4ee;

	display: block;
	padding: 12px 14px;
	background: var(--gb-card, #181816);
	color: var(--gb-text, #f6f4ee);
	border: 1px solid #2c2c2a;
	border-radius: 3px;
	font-weight: 400;
	text-align: left;
}

.gb-bonus-mini .gb-bonus__text {
	margin: 0 0 8px;
	font-size: 13px;
	line-height: 1.45;
	color: var(--gb-text, #f6f4ee);
}

.gb-bonus-mini .gb-bonus__bar {
	height: 5px;
}

.gb-bonus-mini.is-reached {
	border-color: var(--gb-accent-dark);
}

.gb-bonus-mini.is-reached .gb-bonus__bar-fill {
	background: var(--gb-accent);
}

/* Voliteľné doplnky (checkboxy s príplatkami) – tmavá karta ako banner.
   Zdvojená špecificita a explicitné hodnoty chránia pred CSS témy. */

.gb-extras-wrap {
	display: block;
}

.gb-extras {
	--gb-accent: var(--primary, #f2ddba);
	--gb-accent-dark: var(--primary-d-1, #bdad93);
	--gb-text: #f6f4ee;

	display: block;
	margin: 0 0 1.5em;
	padding: 20px 22px;
	background: var(--gb-card, #181816);
	border: 1px solid #2c2c2a;
	border-radius: 3px;
	color: var(--gb-text, #f6f4ee);
	text-align: left;
	box-shadow: 0 12px 26px -20px rgba(0, 0, 0, 0.6);
	transition: opacity 0.15s ease;
}

.gb-extras.is-busy {
	opacity: 0.55;
	pointer-events: none;
}

.gb-extras .gb-extras__title {
	display: block;
	margin: 0 0 12px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gb-accent);
}

.gb-extras .gb-extras__item {
	display: flex !important;
	align-items: center !important;
	gap: 12px;
	margin: 0 -10px !important;
	padding: 10px !important;
	border-radius: 2px;
	font-size: 14px;
	line-height: 1.4;
	font-weight: 400;
	color: var(--gb-text, #f6f4ee);
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.gb-extras .gb-extras__item:hover {
	background: rgba(255, 255, 255, 0.06);
}

/* Natívny checkbox je skrytý (ostáva fokusovateľný pre klávesnicu),
   vizuál kreslí .gb-extras__box. */
.gb-extras .gb-extras__checkbox {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	opacity: 0 !important;
	pointer-events: none;
}

.gb-extras .gb-extras__box {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 21px;
	height: 21px;
	border: 1px solid var(--gb-accent-dark);
	border-radius: 2px;
	background: transparent;
	color: #181816;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.gb-extras .gb-extras__box svg {
	display: block;
	width: 13px;
	height: 13px;
	opacity: 0;
	transform: scale(0.6);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.gb-extras .gb-extras__checkbox:checked + .gb-extras__box {
	background: var(--gb-accent);
	border-color: var(--gb-accent);
}

.gb-extras .gb-extras__checkbox:checked + .gb-extras__box svg {
	opacity: 1;
	transform: scale(1);
}

.gb-extras .gb-extras__checkbox:focus-visible + .gb-extras__box {
	outline: 2px solid var(--gb-accent);
	outline-offset: 2px;
}

.gb-extras .gb-extras__label {
	flex: 1 1 auto;
	color: var(--gb-text, #f6f4ee);
}

.gb-extras .gb-extras__info {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	margin-left: 5px;
	vertical-align: -2px;
	color: var(--gb-accent-dark);
	cursor: help;
	outline: none;
}

.gb-extras .gb-extras__info svg {
	display: block;
	width: 15px;
	height: 15px;
}

.gb-extras .gb-extras__info:hover,
.gb-extras .gb-extras__info:focus {
	color: var(--gb-accent);
}

.gb-extras .gb-extras__info:focus-visible {
	outline: 2px solid var(--gb-accent);
	outline-offset: 2px;
	border-radius: 50%;
}

.gb-extras .gb-extras__tooltip {
	position: absolute;
	bottom: calc(100% + 9px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	width: max-content;
	max-width: 240px;
	padding: 9px 12px;
	background: #000;
	color: #f6f4ee;
	border: 1px solid #333;
	border-radius: 3px;
	font-size: 12px;
	line-height: 1.5;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	text-align: left;
	white-space: normal;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, transform 0.15s ease;
	z-index: 99;
	pointer-events: none;
}

.gb-extras .gb-extras__tooltip::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 5px solid transparent;
	border-top-color: #000;
}

.gb-extras .gb-extras__info:hover .gb-extras__tooltip,
.gb-extras .gb-extras__info:focus .gb-extras__tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.gb-extras .gb-extras__price {
	flex: 0 0 auto;
	font-weight: 700;
	white-space: nowrap;
	color: var(--gb-accent);
}

.gb-extras .gb-extras__price .woocommerce-Price-amount {
	font-weight: 700;
	color: var(--gb-accent);
}

@media (max-width: 480px) {
	.gb-extras {
		padding: 16px;
	}
}

/* Darček zadarmo */

.gb-gift-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 9px;
	background: #181816;
	color: var(--primary, #f2ddba);
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.6;
	vertical-align: middle;
	white-space: nowrap;
}

.gb-gift-free {
	font-weight: 700;
	white-space: nowrap;
}

/* Zatvorenie banneru */

.gb-bonus-dismissed .gb-bonus-wrap,
.gb-bonus-dismissed .gb-bonus-mini-wrap {
	display: none !important;
}

.gb-bonus--dismissible {
	position: relative;
	padding-right: 48px;
}

.gb-bonus__close {
	position: absolute;
	top: 10px;
	right: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 999px;
	color: rgba(246, 244, 238, 0.55);
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.gb-bonus__close:hover,
.gb-bonus__close:focus {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
}

.gb-bonus__close:focus-visible {
	outline: 2px solid var(--gb-accent);
	outline-offset: 2px;
}

.gb-bonus__close svg {
	display: block;
	width: 14px;
	height: 14px;
}

.gb-bonus.is-reached .gb-bonus__bar-fill {
	background: var(--gb-accent);
}

@media (max-width: 480px) {
	.gb-bonus {
		gap: 12px;
		padding: 14px 16px;
	}

	.gb-bonus--dismissible {
		padding-right: 42px;
	}

	.gb-bonus__close {
		top: 8px;
		right: 8px;
	}

	.gb-bonus__icon {
		width: 38px;
		height: 38px;
	}

	.gb-bonus__icon svg {
		width: 18px;
		height: 18px;
	}

	.gb-bonus__text {
		font-size: 14px;
		margin-bottom: 8px;
	}
}
