.oasa-chat,
.oasa-chat *,
.oasa-chat *::before,
.oasa-chat *::after {
	box-sizing: border-box;
}

.oasa-chat {
	--oasa-primary: #111827;
	--oasa-primary-contrast: #ffffff;
	--oasa-surface: #ffffff;
	--oasa-surface-soft: #f7f7f5;
	--oasa-surface-warm: #fff7eb;
	--oasa-text: #111827;
	--oasa-muted: #6b7280;
	--oasa-border: #e5e7eb;
	--oasa-shadow: 0 24px 70px rgba(17, 24, 39, 0.18);
	position: fixed;
	right: 18px;
	bottom: 28px;
	z-index: 99990;
	font-family: inherit;
	color: var(--oasa-text);
}

.oasa-chat[hidden] {
	display: none;
}

.oasa-chat__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-width: 190px;
	height: 58px;
	padding: 0 24px 0 16px;
	border: 0;
	border-radius: 9999px !important;
	background: var(--oasa-primary);
	color: var(--oasa-primary-contrast);
	box-shadow: var(--oasa-shadow);
	cursor: pointer;
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.oasa-chat__toggle:hover,
.oasa-chat__toggle:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 20px 50px rgba(17, 24, 39, 0.24);
	outline: none;
}

.oasa-chat__toggle-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 9999px !important;
	background: rgba(255, 255, 255, 0.2);
	font-size: 18px;
	font-weight: 800;
	letter-spacing: 0;
}

.oasa-chat__toggle-text {
	font-size: 14px;
	font-weight: 800;
	line-height: 1;
	color: var(--oasa-primary-contrast);
	white-space: nowrap;
}

.oasa-chat__panel {
	position: absolute;
	right: 0;
	bottom: 74px;
	display: flex;
	flex-direction: column;
	width: min(390px, calc(100vw - 28px));
	height: min(640px, calc(100vh - 112px));
	max-height: 640px;
	overflow: hidden;
	border: 1px solid var(--oasa-border);
	border-radius: 30px;
	background: var(--oasa-surface);
	box-shadow: var(--oasa-shadow);
	opacity: 0;
	pointer-events: none;
	transform: translateY(14px) scale(0.98);
	transform-origin: bottom right;
	transition: opacity 180ms ease, transform 180ms ease;
}

.oasa-chat--open .oasa-chat__panel {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.oasa-chat__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px 14px;
	border-bottom: 1px solid rgba(17, 24, 39, 0.08);
	background: rgba(255, 255, 255, 0.94);
	color: var(--oasa-text);
	backdrop-filter: blur(16px);
}

.oasa-chat__title {
	display: block;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.25;
}

.oasa-chat__status {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	line-height: 1.2;
	color: #16a34a;
	opacity: 1;
}

.oasa-chat__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 9999px !important;
	background: #f3f4f6;
	color: var(--oasa-text);
	font-size: 21px;
	line-height: 1;
	cursor: pointer;
}

.oasa-chat__messages {
	flex: 1;
	overflow-y: auto;
	padding: 18px;
	background: linear-gradient(180deg, #fafaf9 0%, #ffffff 100%);
	scroll-behavior: smooth;
}

.oasa-chat__message {
	display: flex;
	margin-bottom: 12px;
}

.oasa-chat__message--user {
	justify-content: flex-end;
}

.oasa-chat__bubble {
	max-width: 86%;
	padding: 11px 13px;
	border-radius: 18px 18px 18px 6px;
	background: #ffffff;
	border: 1px solid rgba(17, 24, 39, 0.08);
	box-shadow: 0 4px 16px rgba(17, 24, 39, 0.04);
	font-size: 14px;
	line-height: 1.45;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.oasa-chat__message--user .oasa-chat__bubble {
	background: var(--oasa-primary);
	border-color: var(--oasa-primary);
	color: #ffffff;
	border-radius: 18px 18px 6px 18px;
	box-shadow: 0 8px 20px rgba(255, 152, 0, 0.18);
}

.oasa-chat__text-link {
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.oasa-chat__typing {
	padding: 0 16px 10px;
	background: #ffffff;
	color: var(--oasa-muted);
	font-size: 12px;
}

.oasa-chat__products {
	display: grid;
	gap: 10px;
	margin: 8px 0 12px;
}

.oasa-chat__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 8px 0 14px;
}

.oasa-chat__action-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 8px 14px;
	border: 1px solid rgba(255, 152, 0, 0.28);
	border-radius: 16px;
	background: #fff7eb;
	color: var(--oasa-primary) !important;
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.oasa-chat__action-link:hover,
.oasa-chat__action-link:focus-visible {
	background: #fff0d6;
	border-color: rgba(255, 152, 0, 0.42);
	color: var(--oasa-primary) !important;
	outline: none;
	text-decoration: none;
	transform: translateY(-1px);
}

.oasa-chat__product {
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 10px;
	padding: 10px;
	border: 1px solid rgba(17, 24, 39, 0.08);
	border-radius: 22px;
	background: #ffffff;
	box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

.oasa-chat__product-image {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 18px;
	background: #f3f4f6;
}

.oasa-chat__product-body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.oasa-chat__product-name {
	font-size: 13px;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.oasa-chat__product-price {
	color: var(--oasa-muted);
	font-size: 13px;
}

.oasa-chat__product-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	min-height: 34px;
	min-width: 112px;
	padding: 8px 14px;
	border-radius: 14px;
	background: var(--oasa-primary);
	color: var(--oasa-primary-contrast) !important;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.oasa-chat__product-link:hover,
.oasa-chat__product-link:focus {
	color: #ffffff;
	text-decoration: none;
}

.oasa-chat__form {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid rgba(17, 24, 39, 0.08);
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(14px);
}

.oasa-chat__input {
	width: 100%;
	min-width: 0;
	height: 42px;
	padding: 0 14px;
	border: 1px solid rgba(17, 24, 39, 0.1);
	border-radius: 16px;
	background: var(--oasa-surface-soft);
	color: var(--oasa-text);
	font: inherit;
	font-size: 14px;
}

.oasa-chat__input:focus {
	border-color: var(--oasa-primary);
	outline: none;
	box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1);
}

.oasa-chat__send {
	min-width: 84px;
	height: 42px;
	padding: 0 16px;
	border: 0;
	border-radius: 16px;
	background: var(--oasa-primary);
	color: var(--oasa-primary-contrast) !important;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(255, 152, 0, 0.2);
	transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.oasa-chat__send:hover,
.oasa-chat__send:focus-visible {
	filter: brightness(1.03);
	outline: none;
	box-shadow: 0 10px 24px rgba(255, 152, 0, 0.24);
	transform: translateY(-1px);
}

.oasa-chat__send:active {
	transform: translateY(0) scale(0.98);
}

.oasa-chat__send:disabled,
.oasa-chat__input:disabled {
	opacity: 0.62;
	cursor: not-allowed;
}

@media (max-width: 480px) {
	.oasa-chat {
		right: 14px;
		bottom: 96px;
	}

	.oasa-chat__panel {
		position: fixed;
		inset: auto 10px 92px 10px;
		width: auto;
		height: min(620px, calc(100vh - 104px));
		border-radius: 26px;
	}

	.oasa-chat__toggle {
		min-width: 58px;
		width: 58px;
		height: 58px;
		padding: 0;
		border-radius: 9999px !important;
	}

	.oasa-chat__toggle:hover,
	.oasa-chat__toggle:focus-visible {
		transform: translateY(-2px);
	}

	.oasa-chat__toggle-text {
		display: none;
	}

	.oasa-chat__toggle-icon {
		width: 36px;
		height: 36px;
		font-size: 18px;
	}

	.oasa-chat__form {
		grid-template-columns: 1fr;
	}

	.oasa-chat__send {
		width: 100%;
		border-radius: 16px;
	}

	.oasa-chat--toolbar-mode > .oasa-chat__toggle {
		display: none;
	}

	.oasa-chat--toolbar-mode {
		right: 0;
		bottom: 0;
	}
}

@media (max-width: 768px) {
	.oasa-chat__toolbar-item {
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 0;
	}

	.oasa-chat__toolbar-button {
		display: inline-flex;
		min-width: 66px;
		max-width: 74px;
		min-height: 48px;
		padding: 6px 8px 5px;
		border: 0;
		border-radius: 18px !important;
		background: linear-gradient(180deg, #ffa51f 0%, #ff9800 100%);
		box-shadow: 0 8px 18px rgba(255, 152, 0, 0.22), 0 1px 5px rgba(17, 24, 39, 0.1);
		color: #ffffff !important;
		cursor: pointer;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 3px;
		font: inherit;
		text-decoration: none;
		transform: scale(1);
		transition: transform 220ms ease, color 220ms ease, opacity 220ms ease;
		-webkit-tap-highlight-color: transparent;
	}

	.oasa-chat__toolbar-button:hover,
	.oasa-chat__toolbar-button:focus-visible {
		box-shadow: 0 10px 22px rgba(255, 152, 0, 0.26), 0 2px 6px rgba(17, 24, 39, 0.12);
		filter: brightness(1.02);
		outline: none;
		transform: scale(1.03);
	}

	.oasa-chat__toolbar-item--pressed .oasa-chat__toolbar-button,
	.oasa-chat__toolbar-button:active {
		opacity: 0.82;
		transform: scale(0.97);
	}

	.oasa-chat__toolbar-icon {
		display: inline-flex;
		width: 25px;
		height: 25px;
		border-radius: 9999px !important;
		align-items: center;
		justify-content: center;
		background: rgba(255, 255, 255, 0.18);
		color: #ffffff !important;
		font-size: 15px;
		line-height: 1;
	}

	.oasa-chat__toolbar-label {
		display: block;
		max-width: 62px;
		color: #ffffff !important;
		font-size: 11px;
		font-weight: 700;
		letter-spacing: 0;
		line-height: 1.05;
		overflow: hidden;
		text-align: center;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
}
