.ps-ast {
	--ps-ast-akcent: var(--e-global-color-secondary, #ff4d00);
	--ps-ast-ciemny: var(--e-global-color-primary, #181818);
	--ps-ast-szary: var(--e-global-color-58a8637, #f4f4f4);
	--ps-ast-ramka: var(--e-global-color-d7f36c3, #dedede);
	position: fixed;
	right: 20px;
	bottom: calc(20px + var(--ps-ast-pasek, 0px));
	z-index: 9990;
	transition: bottom 0.3s ease;
	font-family: Montserrat, sans-serif;
	color: var(--ps-ast-ciemny);
}

.ps-ast *,
.ps-ast *::before,
.ps-ast *::after {
	box-sizing: border-box;
}

.ps-ast .ps-ast-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin: 0 0 0 auto;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ps-ast-akcent);
	color: #fff;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.ps-ast .ps-ast-btn:hover,
.ps-ast .ps-ast-btn:focus {
	background: var(--ps-ast-akcent);
	color: #fff;
}

.ps-ast .ps-ast-btn:hover {
	transform: scale(1.06);
}

.ps-ast .ps-ast-btn:focus-visible,
.ps-ast .ps-ast-x:focus-visible,
.ps-ast .ps-ast-temat:focus-visible,
.ps-ast .ps-ast-wyslij:focus-visible {
	outline: 2px solid var(--ps-ast-ciemny);
	outline-offset: 2px;
}

.ps-ast-btn svg {
	width: 28px;
	height: 28px;
}

.ps-ast-panel {
	display: flex;
	flex-direction: column;
	width: 380px;
	height: min(600px, calc(100vh - 120px - var(--ps-ast-pasek, 0px)));
	margin-bottom: 14px;
	overflow: hidden;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.ps-ast-panel[hidden] {
	display: none;
}

.ps-ast-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 16px 20px;
	background: var(--ps-ast-ciemny);
	color: #fff;
}

.ps-ast-head-txt strong {
	display: block;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

.ps-ast-head-txt span {
	display: block;
	font-size: 12px;
	opacity: 0.75;
}

.ps-ast .ps-ast-x {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	cursor: pointer;
}

.ps-ast .ps-ast-x:hover,
.ps-ast .ps-ast-x:focus {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.ps-ast-x svg {
	width: 20px;
	height: 20px;
}

.ps-ast-lista {
	flex: 1;
	padding: 16px;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: #fff;
}

.ps-ast-msg {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 14px;
}

.ps-ast-msg--ja {
	align-items: flex-end;
}

.ps-ast-dymek {
	max-width: 88%;
	padding: 10px 14px;
	border-radius: 16px 16px 16px 4px;
	background: var(--ps-ast-szary);
	font-size: 14px;
	line-height: 1.45;
	white-space: pre-line;
}

.ps-ast-msg--ja .ps-ast-dymek {
	border-radius: 16px 16px 4px 16px;
	background: var(--ps-ast-akcent);
	color: #fff;
}

.ps-ast-kropki {
	display: flex;
	gap: 4px;
}

.ps-ast-kropki i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #999;
	animation: ps-ast-kropka 1s infinite ease-in-out;
}

.ps-ast-kropki i:nth-child(2) {
	animation-delay: 0.15s;
}

.ps-ast-kropki i:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes ps-ast-kropka {
	0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
	40% { opacity: 1; transform: translateY(-3px); }
}

.ps-ast-tematy,
.ps-ast-linki {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ps-ast .ps-ast-temat,
.ps-ast .ps-ast-link {
	display: inline-block;
	padding: 7px 12px;
	border: 1px solid var(--ps-ast-ramka);
	border-radius: 30px;
	background: #fff;
	color: var(--ps-ast-ciemny);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.ps-ast .ps-ast-temat:hover,
.ps-ast .ps-ast-temat:focus,
.ps-ast .ps-ast-link:hover,
.ps-ast .ps-ast-link:focus {
	border-color: var(--ps-ast-akcent);
	background: #fff;
	color: var(--ps-ast-akcent);
}

.ps-ast-produkty {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ps-ast .ps-ast-prod {
	padding: 8px;
	border-radius: 14px;
	background: var(--ps-ast-szary);
}

.ps-ast .ps-ast-prod-link {
	display: flex;
	gap: 12px;
	align-items: center;
	color: var(--ps-ast-ciemny);
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.ps-ast .ps-ast-prod-link:hover,
.ps-ast .ps-ast-prod-link:focus {
	color: var(--ps-ast-ciemny);
	opacity: 0.8;
}

.ps-ast-prod img {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	border-radius: 10px;
	background: #fff;
	object-fit: contain;
}

.ps-ast-prod-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.ps-ast-prod-nazwa {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

.ps-ast-prod-cena {
	font-size: 13px;
	font-weight: 700;
}

.ps-ast-prod-cena del {
	margin-right: 4px;
	font-weight: 400;
	opacity: 0.55;
}

.ps-ast-prod-cena ins {
	color: var(--ps-ast-akcent);
	text-decoration: none;
}

.ps-ast-prod-rozm,
.ps-ast-prod-brak {
	font-size: 11px;
	opacity: 0.7;
}

.ps-ast-prod-brak {
	color: #b00020;
	opacity: 1;
}

.ps-ast-prod-klub {
	align-self: flex-start;
	margin-top: 2px;
	padding: 2px 8px;
	border-radius: 20px;
	background: var(--ps-ast-akcent);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
}

.ps-ast-rozm {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--ps-ast-ramka);
}

.ps-ast-rozm-tyt {
	font-size: 11px;
	font-weight: 600;
	opacity: 0.7;
}

.ps-ast-rozm-wiersz {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
}

.ps-ast-rozm-kolor {
	min-width: 72px;
	font-size: 12px;
	font-weight: 600;
}

.ps-ast .ps-ast-rozm-btn {
	min-width: 36px;
	height: 30px;
	margin: 0;
	padding: 0 8px;
	border: 1px solid var(--ps-ast-ramka);
	border-radius: 8px;
	background: #fff;
	color: var(--ps-ast-ciemny);
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.ps-ast .ps-ast-rozm-btn--szeroki {
	padding: 0 14px;
}

.ps-ast .ps-ast-rozm-btn:hover,
.ps-ast .ps-ast-rozm-btn:focus {
	border-color: var(--ps-ast-akcent);
	background: var(--ps-ast-akcent);
	color: #fff;
}

.ps-ast .ps-ast-rozm-btn:focus-visible {
	outline: 2px solid var(--ps-ast-ciemny);
	outline-offset: 2px;
}

.ps-ast .ps-ast-rozm-btn.is-loading {
	opacity: 0.5;
	cursor: wait;
}

.ps-ast .ps-ast-obraz {
	display: block;
	max-width: 88%;
	overflow: hidden;
	border: 1px solid var(--ps-ast-ramka);
	border-radius: 14px;
}

.ps-ast-obraz img {
	display: block;
	width: 100%;
	height: auto;
}

.ps-ast-form {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 12px;
	border-top: 1px solid var(--ps-ast-ramka);
	background: #fff;
}

.ps-ast .ps-ast-input {
	flex: 1;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--ps-ast-ramka);
	border-radius: 30px;
	background: #fff;
	color: var(--ps-ast-ciemny);
	font-family: inherit;
	font-size: 16px;
}

.ps-ast .ps-ast-input:focus {
	border-color: var(--ps-ast-akcent);
	outline: none;
}

.ps-ast .ps-ast-wyslij {
	display: flex;
	flex: 0 0 44px;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ps-ast-akcent);
	color: #fff;
	cursor: pointer;
}

.ps-ast .ps-ast-wyslij:hover,
.ps-ast .ps-ast-wyslij:focus {
	background: var(--ps-ast-ciemny);
	color: #fff;
}

.ps-ast-wyslij svg {
	width: 20px;
	height: 20px;
}

.ps-ast-zacheta {
	position: relative;
	width: 260px;
	margin: 0 0 12px auto;
	opacity: 0;
	filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.18));
	transform: translateY(8px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.ps-ast-zacheta.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.ps-ast-zacheta[hidden] {
	display: none;
}

.ps-ast-zacheta::after {
	content: "";
	position: absolute;
	right: 22px;
	bottom: -6px;
	width: 14px;
	height: 14px;
	background: #fff;
	transform: rotate(45deg);
}

.ps-ast .ps-ast-zacheta-tekst {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	margin: 0;
	padding: 14px 36px 14px 16px;
	border: 0;
	border-radius: 16px;
	background: #fff;
	color: var(--ps-ast-ciemny);
	font-family: inherit;
	text-align: left;
	white-space: normal;
	cursor: pointer;
}

.ps-ast .ps-ast-zacheta-tekst:hover,
.ps-ast .ps-ast-zacheta-tekst:focus {
	background: #fff;
	color: var(--ps-ast-ciemny);
}

.ps-ast-zacheta-tekst strong {
	display: block;
	margin-bottom: 3px;
	color: var(--ps-ast-akcent);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
}

.ps-ast-zacheta-tekst span {
	display: block;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.45;
}

.ps-ast .ps-ast-zacheta-x {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ps-ast-ciemny);
	cursor: pointer;
	opacity: 0.6;
}

.ps-ast .ps-ast-zacheta-x:hover,
.ps-ast .ps-ast-zacheta-x:focus {
	background: var(--ps-ast-szary);
	color: var(--ps-ast-ciemny);
	opacity: 1;
}

.ps-ast-zacheta-x svg {
	width: 14px;
	height: 14px;
}

.ps-ast.is-open .ps-ast-zacheta {
	display: none;
}

@media (max-width: 767px) {
	.ps-ast-zacheta {
		width: 230px;
		margin-bottom: 10px;
	}

	.ps-ast {
		right: 15px;
		bottom: calc(15px + var(--ps-ast-pasek, 0px));
	}

	.ps-ast .ps-ast-btn {
		width: 54px;
		height: 54px;
	}

	.ps-ast.is-open {
		--ps-ast-pasek: 0px;
		left: 10px;
		right: 10px;
		bottom: 10px;
	}

	.ps-ast-panel {
		width: 100%;
		height: calc(100dvh - 90px);
		margin-bottom: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ps-ast-btn,
	.ps-ast-zacheta,
	.ps-ast .ps-ast-prod-link,
	.ps-ast .ps-ast-rozm-btn,
	.ps-ast-kropki i {
		transition: none;
		animation: none;
	}
}
