.wotc-root {
	--wotc-primary: #7f54b3;
	--wotc-secondary: #9b6fd1;
	--wotc-header-color: #7f54b3;
	--wotc-user-msg: #7f54b3;
	--wotc-bot-msg: #f1f0f5;
	--wotc-text: #1e1e1e;
	--wotc-bg: #ffffff;
	--wotc-border: #e2e2e2;
	--wotc-btn-color: #7f54b3;
	--wotc-btn-text: #ffffff;
	--wotc-chat-width: 380px;
	--wotc-chat-height: 560px;
	--wotc-radius: 16px;
	--wotc-font-size: 14px;
	--wotc-msg-font-size: 12px;
	--wotc-header-height: 64px;
	--wotc-header-title-size: 14px;
	--wotc-header-subtitle-size: 12px;
	--wotc-btn-size: 60px;
	--wotc-btn-icon-size: 22px;
	--wotc-btn-radius: 50%;
	--wotc-btn-label-size: 11px;
	--wotc-bottom-offset: 30px;
	--wotc-side-offset: 30px;

	position: fixed;
	z-index: 999999;
	inset-inline-end: var(--wotc-side-offset);
	bottom: var(--wotc-bottom-offset);
	font-family: var(--wotc-font-family, inherit);
	font-size: var(--wotc-font-size);
	color: var(--wotc-text);
	direction: rtl;
	box-sizing: border-box;
}

.wotc-root *,
.wotc-root *::before,
.wotc-root *::after {
	box-sizing: border-box;
}

.wotc-toggle-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--wotc-btn-size);
	height: var(--wotc-btn-size);
	padding: 0;
	border: none;
	border-radius: var(--wotc-btn-radius);
	background: var(--wotc-btn-color);
	color: var(--wotc-btn-text);
	cursor: pointer;
	position: relative;
	text-align: center;
}

.wotc-toggle-btn.wotc-has-shadow {
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.wotc-toggle-btn__content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	width: 100%;
	height: 100%;
	padding: 6px;
	overflow: hidden;
	border-radius: inherit;
}

.wotc-toggle-btn__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--wotc-btn-icon-size);
	height: var(--wotc-btn-icon-size);
	flex: 0 0 auto;
}

.wotc-toggle-btn__icon svg {
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
}

.wotc-toggle-btn__label {
	font-size: var(--wotc-btn-label-size);
	font-weight: 600;
	line-height: 1.2;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	padding: 0 2px;
}


.wotc-toggle-btn--icon_only .wotc-toggle-btn__icon {
	width: calc(var(--wotc-btn-icon-size) * 1.3);
	height: calc(var(--wotc-btn-icon-size) * 1.3);
}

.wotc-toggle-btn--text_only .wotc-toggle-btn__label {
	font-size: calc(var(--wotc-btn-label-size) * 1.15);
	white-space: normal;
	line-height: 1.25;
	max-width: 90%;
}

.wotc-toggle-btn__badge {
	position: absolute;
	top: -2px;
	inset-inline-start: -2px;
	background: #e63946;
	color: #fff;
	border-radius: 50%;
	min-width: 20px;
	height: 20px;
	font-size: 11px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
	box-shadow: 0 0 0 2px var(--wotc-bg, #fff);
	z-index: 1;
}

.wotc-panel {
	position: absolute;
	bottom: calc(var(--wotc-btn-size) + 16px);
	inset-inline-end: 0;
	width: var(--wotc-chat-width);
	height: var(--wotc-chat-height);
	max-height: 80vh;
	background: var(--wotc-bg);
	border: 1px solid var(--wotc-border);
	border-radius: var(--wotc-radius);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

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

.wotc-panel__header {
	height: var(--wotc-header-height);
	flex: 0 0 auto;
	background: var(--wotc-header-color);
	color: #fff;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 14px;
}

.wotc-panel__avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #ffffff;
	color: var(--wotc-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex: 0 0 auto;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.wotc-panel__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wotc-panel__avatar svg {
	width: 82%;
	height: 82%;
}

.wotc-panel__title-wrap {
	flex: 1 1 auto;
	min-width: 0;
}

.wotc-panel__title {
	margin: 0;
	font-size: var(--wotc-header-title-size);
	font-weight: 700;
	line-height: 1.4;
}

.wotc-panel__subtitle {
	margin: 2px 0 0;
	font-size: var(--wotc-header-subtitle-size);
	opacity: 0.9;
	display: flex;
	align-items: center;
	gap: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wotc-online-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #4ade80;
	display: inline-block;
	flex: 0 0 auto;
}

.wotc-panel__close {
	background: transparent;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 2px;
	line-height: 0;
	border-radius: 6px;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
}

.wotc-panel__close svg {
	width: 100%;
	height: 100%;
}

.wotc-panel__close:hover {
	background: rgba(255, 255, 255, 0.15);
}

.wotc-panel__messages {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: var(--wotc-bg);
}

.wotc-msg {
	max-width: 82%;
	padding: 10px 14px;
	border-radius: 14px;
	font-size: var(--wotc-msg-font-size);
	line-height: 1.6;
	white-space: pre-line;
	word-break: break-word;
}

.wotc-msg--bot {
	align-self: flex-start;
	background: var(--wotc-bot-msg);
	color: var(--wotc-text);
	border-bottom-left-radius: 4px;
}

.wotc-msg--user {
	align-self: flex-end;
	background: var(--wotc-user-msg);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.wotc-typing {
	align-self: flex-start;
	background: var(--wotc-bot-msg);
	padding: 10px 16px;
	border-radius: 14px;
	display: inline-flex;
	gap: 4px;
	align-items: center;
}

.wotc-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--wotc-primary);
	opacity: 0.6;
	animation: wotc-blink 1.2s infinite ease-in-out;
}

.wotc-typing span:nth-child(2) { animation-delay: 0.2s; }
.wotc-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes wotc-blink {
	0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
	40% { opacity: 1; transform: translateY(-2px); }
}

.wotc-quick-replies {
	flex: 0 0 auto;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 5px 16px 12px;
}

.wotc-quick-reply {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	border: 1px solid var(--wotc-primary);
	color: var(--wotc-primary);
	background: transparent;
	border-radius: 20px;
	padding: 6px 12px;
	font-size: 12px;
	cursor: pointer;
	white-space: nowrap;
}

.wotc-quick-reply:hover {
	background: var(--wotc-primary);
	color: #fff;
}

.wotc-quick-reply__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
}

.wotc-quick-reply__icon svg {
	width: 100%;
	height: 100%;
}

.wotc-quick-reply__label {
	line-height: 1.3;
}

.wotc-panel__input {
	flex: 0 0 auto;
	display: flex;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid var(--wotc-border);
}

.wotc-panel__input input[type="text"] {
	flex: 1 1 auto;
	border: 1px solid var(--wotc-border);
	border-radius: 20px;
	padding: 8px 14px;
	font-size: var(--wotc-font-size);
	background: var(--wotc-bg);
	color: var(--wotc-text);
	line-height: 1;
}

.wotc-panel__input input[type="text"]:focus {
	outline: 2px solid var(--wotc-primary);
	outline-offset: 1px;
}

.wotc-send-btn {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: var(--wotc-primary);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	padding: 0
}

.wotc-send-btn svg {
	width: 18px;
	height: 18px;
}

.wotc-send-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.wotc-panel__input.wotc-input-disabled input[type="text"] {
	background: var(--wotc-bot-msg);
	color: #999;
	cursor: not-allowed;
}

.wotc-panel__input.wotc-input-disabled input[type="text"]::placeholder {
	color: #999;
}

.wotc-order-card {
	align-self: flex-start;
	max-width: 92%;
	background: var(--wotc-bg);
	border: 1px solid var(--wotc-border);
	border-radius: 14px;
	padding: 14px;
	font-size: var(--wotc-msg-font-size);
	width: 100%
}

.wotc-order-card__row {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 4px 0;
	border-bottom: 1px dashed var(--wotc-border);
}

.wotc-order-card__row:last-child {
	border-bottom: none;
}

.wotc-order-card__label {
	color: #666;
}

.wotc-order-card__products {
	margin-top: 8px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.wotc-order-card__products:first-child {
	margin-top: 0
}
.wotc-order-product {
	display: flex;
	align-items: center;
	gap: 8px;
}

.wotc-order-product img {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	object-fit: cover;
	flex: 0 0 auto;
	background: var(--wotc-bot-msg);
}

.wotc-timeline {
	margin-top: 10px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.wotc-timeline__step {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
}

.wotc-timeline__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--wotc-border);
	flex: 0 0 auto;
}

.wotc-timeline__step--done .wotc-timeline__dot { background: #4ade80; }
.wotc-timeline__step--current .wotc-timeline__dot { background: var(--wotc-primary); }

.wotc-tracking {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px dashed var(--wotc-border);
	font-size: 12px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
}

.wotc-tracking__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
	color: var(--wotc-primary);
}

.wotc-tracking__icon svg {
	width: 100%;
	height: 100%;
}

.wotc-tracking a {
	color: var(--wotc-primary);
	text-decoration: underline;
}

.wotc-order-card__link {
	margin-top: 10px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--wotc-primary);
	text-decoration: none;
	border: 1px solid var(--wotc-primary);
	border-radius: 20px;
	padding: 6px 12px;
	width: 100%
}

.wotc-order-card__link:hover {
	background: var(--wotc-primary);
	color: #fff;
}

.wotc-order-card__link svg {
	width: 14px;
	height: 14px;
}

.wotc-product-result {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%
}

.wotc-product-result__row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.wotc-product-result__image {
	width: 48px;
	height: 48px;
	border-radius: 8px;
	object-fit: cover;
	flex: 0 0 auto;
	background: var(--wotc-bot-msg);
}

.wotc-product-result__info {
	flex: 1 1 auto;
	min-width: 0;
}

.wotc-product-result__name {
	font-weight: 600;
	font-size: var(--wotc-msg-font-size);
}

.wotc-product-result__price {
	font-size: 12px;
	color: var(--wotc-primary);
	margin-top: 2px;
}

.wotc-price-old {
	text-decoration: line-through;
	color: #999;
	font-weight: 400;
	margin-inline-end: 6px;
}

.wotc-price-sale {
	color: #dc2626;
	font-weight: 700;
}

.wotc-stock-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	border-bottom: 1px dashed var(--wotc-border);
	font-size: var(--wotc-msg-font-size);
}

.wotc-stock-row:last-child {
	border-bottom: none;
}

.wotc-stock-row__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

.wotc-stock-row__icon svg {
	width: 100%;
	height: 100%;
}

.wotc-stock-row.is-in-stock .wotc-stock-row__icon { color: #16a34a; }
.wotc-stock-row.is-out-of-stock .wotc-stock-row__icon { color: #dc2626; }

.wotc-contact-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	font-size: var(--wotc-msg-font-size);
}

.wotc-contact-row__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	color: var(--wotc-primary);
}

.wotc-contact-row__icon svg {
	width: 100%;
	height: 100%;
}

.wotc-product-result__stock {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	margin-top: 2px;
}

.wotc-product-result__stock-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 13px;
	height: 13px;
	flex: 0 0 auto;
}

.wotc-product-result__stock-icon svg {
	width: 100%;
	height: 100%;
}

.wotc-product-result__stock.is-in-stock {
	color: #16a34a;
}

.wotc-product-result__stock.is-out-of-stock {
	color: #dc2626;
}

.wotc-anim-fade { animation: wotc-fade 0.25s ease; }
.wotc-anim-slide { animation: wotc-slide-up 0.25s ease; }
.wotc-anim-bounce { animation: wotc-bounce 0.4s ease; }
.wotc-anim-pulse { animation: wotc-pulse 0.6s ease; }

@keyframes wotc-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes wotc-slide-up {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes wotc-bounce {
	0% { transform: scale(0.85); opacity: 0; }
	60% { transform: scale(1.05); opacity: 1; }
	100% { transform: scale(1); }
}

@keyframes wotc-pulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.08); }
	100% { transform: scale(1); }
}


.wotc-toggle-btn.wotc-idle-bounce {
	animation: wotc-idle-bounce 1.8s ease-in-out infinite;
}

.wotc-toggle-btn.wotc-idle-pulse {
	animation: wotc-idle-pulse 1.6s ease-in-out infinite;
}

.wotc-toggle-btn.wotc-idle-fade {
	animation: wotc-idle-fade 2.2s ease-in-out infinite;
}

.wotc-toggle-btn.wotc-idle-slide {
	animation: wotc-idle-slide 2.4s ease-in-out infinite;
}

@keyframes wotc-idle-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-7px); }
}

@keyframes wotc-idle-pulse {
	0%, 100% { transform: scale(1); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2); }
	50% { transform: scale(1.08); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28); }
}

@keyframes wotc-idle-fade {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.7; }
}

@keyframes wotc-idle-slide {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-4px); }
	75% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
	.wotc-toggle-btn.wotc-idle-bounce,
	.wotc-toggle-btn.wotc-idle-pulse,
	.wotc-toggle-btn.wotc-idle-fade,
	.wotc-toggle-btn.wotc-idle-slide {
		animation: none;
	}
}

.wotc-toggle-btn.wotc-idle-paused {
	animation-play-state: paused;
	transform: none;
}

.wotc-root.wotc-ltr {
	direction: ltr;
}

.wotc-root.wotc-position-left {
	inset-inline-end: auto;
	inset-inline-start: var(--wotc-side-offset);
}

.wotc-root.wotc-position-left .wotc-panel {
	inset-inline-end: auto;
	inset-inline-start: 0;
}

@media (max-width: 480px) {
	.wotc-panel {
		width: var(--wotc-chat-mobile-width, 100vw);
		height: var(--wotc-chat-mobile-height, 100vh);
		max-height: 100vh;
		bottom: 0;
		inset-inline-end: 0;
		border-radius: 0;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
	}
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
