/* Contact button + panel (inc/contact-widget.php, js/contact-widget.js).
 * Same corner and size as the old "Pokalbis" button. Below the side cart (100400+) and the filter panel
 * (100300+), above the product page sticky bar (990), which the button stays clear of on product pages.
 */

.lv-cw {
	--lv-cw-blue: #0f69af;
	--lv-cw-blue-dark: #0b5590;
	--lv-cw-text: #212121;
	--lv-cw-muted: #5f6b7a;
	--lv-cw-line: #e6ebf0;
	--lv-cw-soft: #eef5fb;
	font-family: 'Inter', sans-serif;
}

.lv-cw *,
.lv-cw *::before,
.lv-cw *::after {
	box-sizing: border-box;
}

/* ---- The button (the theme styles every <button> with !important, hence the !important here) ---- */
.lv-cw button.lv-cw-btn,
.lv-cw button.lv-cw-btn:hover,
.lv-cw button.lv-cw-btn:focus,
.lv-cw button.lv-cw-btn:active {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 56px;
	margin: 0;
	padding: 0 20px 0 16px !important;
	border: 0 !important;
	border-radius: 28px !important;
	background: var(--lv-cw-blue) !important;
	color: #fff !important;
	font: 600 15px/1 'Inter', sans-serif !important;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(15, 105, 175, .35);
	cursor: pointer;
}

.lv-cw button.lv-cw-btn:hover,
.lv-cw button.lv-cw-btn:active,
.lv-cw button.lv-cw-btn[aria-expanded="true"] {
	background: var(--lv-cw-blue-dark) !important;
}

.lv-cw button.lv-cw-btn:focus-visible {
	outline: 3px solid var(--lv-cw-blue-dark);
	outline-offset: 3px;
	box-shadow: 0 0 0 3px #fff, 0 6px 18px rgba(15, 105, 175, .35);
}

.lv-cw-btn .lv-cw-ico {
	width: 26px;
	height: 26px;
	flex: none;
}

body.single-product .lv-cw button.lv-cw-btn {
	bottom: 84px;
}

/* ---- Cart / checkout: round icon-only button, steps aside over form content (js/contact-widget.js) ---- */
.lv-cw--compact button.lv-cw-btn,
.lv-cw--compact button.lv-cw-btn:hover,
.lv-cw--compact button.lv-cw-btn:focus,
.lv-cw--compact button.lv-cw-btn:active {
	right: 12px;
	bottom: 16px;
	justify-content: center;
	width: 52px;
	min-height: 52px;
	height: 52px;
	padding: 0 !important;
	border-radius: 50% !important;
	transition: transform .2s ease, opacity .2s ease;
}

.lv-cw--compact .lv-cw-btn__text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.lv-cw--compact .lv-cw-panel {
	bottom: 80px;
}

.lv-cw--compact.lv-cw--aside button.lv-cw-btn[aria-expanded="false"]:not(:focus-visible) {
	opacity: 0;
	transform: translateX(80px);
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.lv-cw--compact button.lv-cw-btn {
		transition: none;
	}
}

/* ---- Panel (popover above the button) ---- */
.lv-cw-panel {
	position: fixed;
	right: 20px;
	bottom: 88px;
	z-index: 1001;
	width: 320px;
	max-width: calc(100vw - 40px);
	max-height: calc(100vh - 120px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 16px;
	border: 1px solid var(--lv-cw-line);
	border-radius: 16px;
	background: #fff;
	color: var(--lv-cw-text);
	box-shadow: 0 16px 40px rgba(16, 24, 40, .18);
}

.lv-cw-panel[hidden],
.lv-cw-overlay[hidden] {
	display: none !important;
}

body.single-product .lv-cw-panel {
	bottom: 152px;
}

.lv-cw-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: transparent;
}

.lv-cw-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.lv-cw-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--lv-cw-text);
}

.lv-cw button.lv-cw-close,
.lv-cw button.lv-cw-close:hover,
.lv-cw button.lv-cw-close:focus,
.lv-cw button.lv-cw-close:active {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 10px !important;
	background: transparent !important;
	color: var(--lv-cw-text) !important;
	line-height: 1 !important;
}

.lv-cw button.lv-cw-close:hover,
.lv-cw button.lv-cw-close:active {
	background: #f2f5f8 !important;
}

.lv-cw button.lv-cw-close:focus-visible {
	outline: 2px solid var(--lv-cw-blue);
	outline-offset: 1px;
}

.lv-cw-hours {
	margin: 0 0 10px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--lv-cw-muted);
}

.lv-cw-list {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lv-cw-list li {
	margin: 0;
	padding: 0;
}

/* Options: links and the chat button look the same in every state (no underline, no blue text). */
.lv-cw a.lv-cw-opt,
.lv-cw a.lv-cw-opt:visited,
.lv-cw a.lv-cw-opt:hover,
.lv-cw a.lv-cw-opt:focus,
.lv-cw a.lv-cw-opt:active,
.lv-cw button.lv-cw-opt,
.lv-cw button.lv-cw-opt:hover,
.lv-cw button.lv-cw-opt:focus,
.lv-cw button.lv-cw-opt:active {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 56px;
	margin: 0;
	padding: 8px 12px !important;
	border: 1px solid var(--lv-cw-line) !important;
	border-radius: 12px !important;
	background: #fff !important;
	color: var(--lv-cw-text) !important;
	font: 400 15px/1.3 'Inter', sans-serif !important;
	text-align: left;
	text-decoration: none !important;
	cursor: pointer;
	box-shadow: none;
}

.lv-cw a.lv-cw-opt:hover,
.lv-cw a.lv-cw-opt:active,
.lv-cw button.lv-cw-opt:hover,
.lv-cw button.lv-cw-opt:active {
	border-color: #c9d8e6 !important;
	background: var(--lv-cw-soft) !important;
}

.lv-cw a.lv-cw-opt:focus-visible,
.lv-cw button.lv-cw-opt:focus-visible {
	outline: 2px solid var(--lv-cw-blue);
	outline-offset: 2px;
}

.lv-cw button.lv-cw-opt[aria-busy="true"] {
	cursor: progress;
}

.lv-cw-opt__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--lv-cw-soft);
	color: var(--lv-cw-blue);
}

.lv-cw-opt--messenger .lv-cw-opt__icon {
	background: #eef3ff;
	color: #0866ff;
}

.lv-cw-opt--whatsapp .lv-cw-opt__icon {
	background: #e9f8ef;
	color: #128c4a;
}

.lv-cw-opt__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.lv-cw-opt__label {
	font-weight: 600;
}

.lv-cw-opt__sub {
	font-size: 13px;
	color: var(--lv-cw-muted);
	overflow-wrap: anywhere;
}

/* ---- Phones: icon-only button, bottom sheet ---- */
@media (max-width: 767px) {
	.lv-cw button.lv-cw-btn,
	.lv-cw button.lv-cw-btn:hover,
	.lv-cw button.lv-cw-btn:focus,
	.lv-cw button.lv-cw-btn:active {
		right: 10px;
		bottom: 16px;
		min-height: 52px;
		padding: 0 14px !important;
	}

	body.single-product .lv-cw button.lv-cw-btn {
		bottom: 80px;
	}

	.lv-cw--compact button.lv-cw-btn,
	.lv-cw--compact button.lv-cw-btn:hover,
	.lv-cw--compact button.lv-cw-btn:focus,
	.lv-cw--compact button.lv-cw-btn:active {
		right: 10px;
		bottom: 16px;
		width: 48px;
		min-height: 48px;
		height: 48px;
		padding: 0 !important;
	}

	.lv-cw-btn__text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.lv-cw-overlay {
		background: rgba(16, 24, 40, .45);
	}

	.lv-cw-panel,
	body.single-product .lv-cw-panel,
	.lv-cw--compact .lv-cw-panel {
		right: 0;
		bottom: 0;
		left: 0;
		width: auto;
		max-width: none;
		max-height: 85vh;
		padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
		border: 0;
		border-radius: 16px 16px 0 0;
		box-shadow: 0 -12px 32px rgba(16, 24, 40, .2);
	}

	html.lv-cw-lock,
	html.lv-cw-lock body {
		overflow: hidden;
	}
}

@media print {
	.lv-cw {
		display: none !important;
	}
}
