/*
 * Button "Warenkorb teilen": tertiaere Outline-Aktion, volle Breite wie die CheckoutWC-Buttons.
 * Selektoren: .wk-share-cart-btn (klassischer Warenkorb und Side-Cart), #cfw-side-cart .wk-share-cart-btn
 * (Side-Cart-Container laut SideCart.php: <div id="cfw-side-cart">). CFW-Variablen mit Fallbacks, damit der Button
 * auch ohne CheckoutWC gut aussieht.
 */
.wk-share-cart-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	box-sizing: border-box;
	width: 100%;
	margin: 0.6em 0 0;
	padding: 0.82rem;
	border: 1px solid var(--cfw-buttons-primary-background-color, #333);
	border-radius: 5px;
	background: transparent;
	color: var(--cfw-buttons-primary-background-color, #333);
	font: inherit;
	font-size: 1em;
	font-weight: 400;
	line-height: 1.2;
	cursor: pointer;
	transition: all 0.3s ease-in-out;
}

#cfw-side-cart .wk-share-cart-btn {
	margin: 10px 0 0;
}

.wk-share-cart-btn:hover {
	background: var(--cfw-buttons-primary-hover-background-color, #333);
	border-color: var(--cfw-buttons-primary-hover-background-color, #333);
	color: var(--cfw-buttons-primary-hover-text-color, #fff);
}

.wk-share-cart-btn:focus-visible {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--cfw-buttons-primary-background-color, #333);
	outline: none;
}

/* Icon als CSS-Maske statt Inline-SVG: Der CheckoutWC-Side-Cart baut das DOM per React neu und
   schreibt dabei das SVG-Attribut viewBox klein (viewbox), wodurch das Icon abgeschnitten wird. */
.wk-share-cart-btn-icon {
	display: inline-block;
	flex: 0 0 auto;
	width: 1em;
	height: 1em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cline x1='8.6' y1='13.5' x2='15.4' y2='17.5'/%3E%3Cline x1='15.4' y1='6.5' x2='8.6' y2='10.5'/%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' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cline x1='8.6' y1='13.5' x2='15.4' y2='17.5'/%3E%3Cline x1='15.4' y1='6.5' x2='8.6' y2='10.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wk-share-cart-btn[aria-busy="true"] {
	opacity: 0.6;
	cursor: progress;
}

.wk-share-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1em;
	background: rgba(0, 0, 0, 0.55);
}

.wk-share-cart-modal {
	box-sizing: border-box;
	width: 100%;
	max-width: 32em;
	max-height: 90vh;
	overflow: auto;
	padding: 1.5em;
	border-radius: 6px;
	background: #fff;
	color: #111;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.wk-share-cart-modal h2 {
	margin: 0 0 0.5em;
	font-size: 1.3em;
}

.wk-share-cart-modal label {
	display: block;
	margin: 1em 0 0.3em;
	font-weight: 600;
}

.wk-share-cart-modal input[type="text"] {
	box-sizing: border-box;
	width: 100%;
	padding: 0.6em;
}

.wk-share-cart-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-top: 1em;
}

.wk-share-cart-actions button {
	padding: 0.6em 1.1em;
	border: 1px solid #111;
	border-radius: 4px;
	background: #fff;
	color: #111;
	font: inherit;
	cursor: pointer;
}

.wk-share-cart-actions button.wk-share-cart-primary {
	background: #111;
	color: #fff;
}

.wk-share-cart-status {
	min-height: 1.4em;
	margin: 0.75em 0 0;
}

.wk-share-cart-error {
	color: #b00020;
}

.wk-share-cart-skipped {
	margin: 1em 0 0;
	padding-left: 1.2em;
}

.wk-share-cart-confirm {
	max-width: 36em;
	margin: 2em auto;
	padding: 0 1em;
}

.wk-share-cart-confirm-cancel {
	margin-left: 1em;
}

.wk-share-cart-toast {
	position: fixed;
	top: 1em;
	left: 50%;
	z-index: 2147483001;
	box-sizing: border-box;
	width: calc(100% - 2em);
	max-width: 34em;
	padding: 0.9em 2.6em 0.9em 1em;
	transform: translateX(-50%);
	border-radius: 6px;
	background: #111;
	color: #fff;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.wk-share-cart-toast.wk-share-cart-toast-error {
	background: #b00020;
}

.wk-share-cart-toast p {
	margin: 0 0 0.4em;
}

.wk-share-cart-toast ul {
	margin: 0.3em 0 0;
	padding-left: 1.2em;
}

.wk-share-cart-toast-close {
	position: absolute;
	top: 0.4em;
	right: 0.6em;
	padding: 0 0.3em;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 1.4em;
	line-height: 1;
	cursor: pointer;
}
