.sportgo-sportbot,
.sportgo-sportbot *,
.sportgo-sportbot *::before,
.sportgo-sportbot *::after {
	box-sizing: border-box;
}

.sportgo-sportbot {
	position: fixed;
	right: 18px;
	bottom: 20px;
	z-index: 9998;
	font-family: inherit;
	display: block;
	max-width: calc(100vw - 24px);
}

.sportgo-sportbot__launcher {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	padding: 0;
	cursor: pointer;
	position: relative;
	z-index: 4;
	transition:
		transform 0.18s ease,
		filter 0.18s ease;
	-webkit-tap-highlight-color: transparent;
	animation: float-soft 4.6s ease-in-out infinite;
}

.sportgo-sportbot__launcher:hover {
	transform: scale(1.1);
	filter: brightness(1.03);
}

.sportgo-sportbot__launcher:active {
	transform: translateY(0) scale(0.97);
}

.sportgo-sportbot__launcher:focus {
	outline: none;
}

.sportgo-sportbot__launcher:focus-visible {
	outline: none;
}

.sportgo-sportbot__launcher:focus-visible .sportgo-sportbot__launcher-circle {
	box-shadow:
		0 14px 30px rgba(0, 0, 0, 0.22),
		0 0 0 4px rgba(0, 87, 255, 0.18);
}

.sportgo-sportbot__launcher-circle {
	width: 68px;
	height: 68px;
	border-radius: 50%;
	background: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow:
		0 14px 30px rgba(0, 0, 0, 0.22),
		0 2px 8px rgba(0, 0, 0, 0.06);
	border: 1px solid rgba(223, 230, 247, 0.9);
	overflow: hidden;
	transition:
		box-shadow 0.18s ease,
		transform 0.18s ease;
	animation: pulse-soft 3.8s ease-in-out infinite;
}

.sportgo-sportbot__logo {
	width: 54px;
	height: 54px;
	object-fit: contain;
	object-position: center;
	display: block;
}

.sportgo-sportbot__label {
	display: none !important;
}

.sportgo-sportbot__panel {
	position: absolute;
	right: calc(100% + 14px);
	bottom: 0;
	width: min(370px, calc(100vw - 32px));
	height: min(560px, 72vh);
	max-width: calc(100vw - 32px);
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow:
		0 22px 54px rgba(15, 22, 34, 0.22),
		0 8px 22px rgba(15, 22, 34, 0.08);
	border: 1px solid rgba(223, 230, 247, 0.95);
	z-index: 3;
	opacity: 1;
	transform: translateY(0) scale(1);
	transform-origin: bottom right;
	transition:
		opacity 0.2s ease,
		transform 0.2s ease,
		box-shadow 0.2s ease;
	isolation: isolate;
}

.sportgo-sportbot__panel[hidden] {
	display: none !important;
	pointer-events: none;
}

.sportgo-sportbot__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	background: linear-gradient(180deg, #111a28 0%, #0f1622 100%);
	color: #ffffff;
	flex-shrink: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	min-width: 0;
}

.sportgo-sportbot__header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #ffffff !important;
	line-height: 1.2;
	letter-spacing: 0.01em;
	min-width: 0;
}

.sportgo-sportbot__header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.sportgo-sportbot__close {
	background: transparent;
	border: 0;
	color: #ffffff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0 2px;
	position: relative;
	z-index: 2;
	opacity: 0.88;
	transition:
		opacity 0.18s ease,
		transform 0.18s ease;
	border-radius: 8px;
	flex-shrink: 0;
}

.sportgo-sportbot__close:hover {
	opacity: 1;
	transform: scale(1.05);
}

.sportgo-sportbot__close:focus,
.sportgo-sportbot__new-chat-button:focus,
.sportgo-sportbot__send-button:focus,
.sportgo-sportbot__form input:focus {
	outline: none;
}

.sportgo-sportbot__close:focus-visible,
.sportgo-sportbot__new-chat-button:focus-visible,
.sportgo-sportbot__send-button:focus-visible {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.sportgo-sportbot__send-button,
.sportgo-sportbot__new-chat-button {
	height: 34px;
	border-radius: 8px;
	padding: 6px 12px;
	font-size: 14px;
	font-weight: 600;
	transition:
		transform 0.2s ease,
		filter 0.2s ease,
		box-shadow 0.2s ease,
		background 0.2s ease,
		opacity 0.2s ease;
	white-space: nowrap;
}

.sportgo-sportbot__new-chat-button {
	border: 1px solid rgba(255, 255, 255, 0.24);
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	cursor: pointer;
}

.sportgo-sportbot__new-chat-button:hover {
	background: rgba(255, 255, 255, 0.16);
	transform: translateY(-1px);
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.sportgo-sportbot__messages {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 12px;
	background: linear-gradient(180deg, #f8faff 0%, #f4f7fd 100%);
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: #cdd7eb transparent;
}

.sportgo-sportbot__messages::-webkit-scrollbar {
	width: 8px;
}

.sportgo-sportbot__messages::-webkit-scrollbar-track {
	background: transparent;
}

.sportgo-sportbot__messages::-webkit-scrollbar-thumb {
	background: #cdd7eb;
	border-radius: 999px;
	border: 2px solid transparent;
	background-clip: padding-box;
}

.sportgo-sportbot__messages::-webkit-scrollbar-thumb:hover {
	background: #b8c7e3;
	background-clip: padding-box;
}

.sportgo-sportbot__message {
	max-width: 88%;
	padding: 10px 13px;
	margin-bottom: 10px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.45;
	white-space: pre-line;
	word-break: break-word;
	overflow-wrap: anywhere;
	box-shadow: 0 2px 8px rgba(15, 22, 34, 0.04);
}

.sportgo-sportbot__message:last-child {
	margin-bottom: 0;
}

.sportgo-sportbot__message--bot {
	background: #ffffff;
	border: 1px solid #dfe6f7;
	color: #1f2838;
	border-bottom-left-radius: 8px;
}

.sportgo-sportbot__message--bot a {
	color: #0057ff;
	font-weight: 700;
	text-decoration: underline;
	word-break: break-word;
}

.sportgo-sportbot__message--user {
	margin-left: auto;
	background: linear-gradient(180deg, #1561ff 0%, #0057ff 100%);
	color: #ffffff;
	border-bottom-right-radius: 8px;
}

.sportgo-sportbot__message--typing {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding-right: 14px;
}

.sportgo-sportbot__typing-text {
	font-size: 13px;
	font-weight: 600;
	color: #53627c;
}

.sportgo-sportbot__typing-dots {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.sportgo-sportbot__typing-dots span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #7f92b7;
	opacity: 0.35;
	animation: sportgo-sportbot-bounce 1.1s infinite ease-in-out;
}

.sportgo-sportbot__typing-dots span:nth-child(2) {
	animation-delay: 0.15s;
}

.sportgo-sportbot__typing-dots span:nth-child(3) {
	animation-delay: 0.3s;
}

.sportgo-sportbot__form {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid #edf0f5;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	flex-shrink: 0;
	position: sticky;
	bottom: 0;
	z-index: 2;
}

.sportgo-sportbot__form input {
	flex: 1;
	min-width: 0;
	width: 100%;
	border: 1px solid #cfd8ee;
	border-radius: 10px;
	padding: 10px;
	font-size: 14px;
	line-height: 1.3;
	background: #ffffff;
	color: #1f2838;
	appearance: none;
	-webkit-appearance: none;
	transition:
		border-color 0.18s ease,
		box-shadow 0.18s ease,
		background-color 0.18s ease;
}

.sportgo-sportbot__form input::placeholder {
	color: #6e7f9d;
	opacity: 1;
}

.sportgo-sportbot__form input:focus {
	outline: none;
	border-color: #8eb0ff;
	box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.12);
}

.sportgo-sportbot__form .sportgo-sportbot__send-button {
	border: 0;
	background: linear-gradient(180deg, #1561ff 0%, #0057ff 100%);
	color: #ffffff;
	cursor: pointer;
	flex-shrink: 0;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.sportgo-sportbot__form .sportgo-sportbot__send-button:hover {
	transform: translateY(-1px);
	filter: brightness(0.96);
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.sportgo-sportbot__form .sportgo-sportbot__send-button:active {
	transform: translateY(0);
}

.sportgo-sportbot__form .sportgo-sportbot__send-button:disabled,
.sportgo-sportbot__form input:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.sportgo-sportbot__form input:disabled {
	background: #f3f6fb;
}

@keyframes sportgo-sportbot-bounce {
	0%,
	80%,
	100% {
		transform: translateY(0);
		opacity: 0.3;
	}

	40% {
		transform: translateY(-3px);
		opacity: 1;
	}
}

@keyframes pulse-soft {
	0%,
	100% {
		transform: scale(1);
		box-shadow:
			0 14px 30px rgba(0, 0, 0, 0.22),
			0 2px 8px rgba(0, 0, 0, 0.06),
			0 0 0 0 rgba(0, 87, 255, 0);
	}

	50% {
		transform: scale(1.025);
		box-shadow:
			0 16px 34px rgba(0, 0, 0, 0.24),
			0 4px 12px rgba(0, 0, 0, 0.08),
			0 0 22px 1px rgba(0, 87, 255, 0.22);
	}
}

@keyframes float-soft {
	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-3px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.sportgo-sportbot,
	.sportgo-sportbot__launcher,
	.sportgo-sportbot__launcher-circle,
	.sportgo-sportbot__panel,
	.sportgo-sportbot__close,
	.sportgo-sportbot__new-chat-button,
	.sportgo-sportbot__form input,
	.sportgo-sportbot__form button,
	.sportgo-sportbot__typing-dots span {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
}

@media (max-width: 880px) {
	.sportgo-sportbot {
		right: 12px;
		bottom: 12px;
	}

	.sportgo-sportbot__launcher {
		animation-duration: 5.8s;
	}

	.sportgo-sportbot__launcher-circle {
		width: 66px;
		height: 66px;
		animation: none;
	}

	.sportgo-sportbot__logo {
		width: 52px;
		height: 52px;
	}

	.sportgo-sportbot__panel {
		position: fixed;
		right: 12px;
		left: auto;
		bottom: calc(12px + 66px + 12px + env(safe-area-inset-bottom, 0px));
		width: min(360px, calc(100vw - 24px));
		height: min(520px, 68dvh);
		max-height: calc(100dvh - 120px - env(safe-area-inset-bottom, 0px));
		border-radius: 16px;
		transform-origin: bottom right;
	}
}

@media (max-width: 540px) {
	.sportgo-sportbot {
		right: 10px;
		bottom: 10px;
		max-width: none;
	}

	.sportgo-sportbot__launcher-circle {
		width: 64px;
		height: 64px;
	}

	.sportgo-sportbot__logo {
		width: 50px;
		height: 50px;
	}

	.sportgo-sportbot__panel {
		left: 26px;
		right: 26px;
		width: auto;
		max-width: none;
		bottom: calc(10px + 64px + 10px + env(safe-area-inset-bottom, 0px));
		height: min(440px, 58dvh);
		max-height: calc(100dvh - 110px - env(safe-area-inset-bottom, 0px));
		border-radius: 14px;
	}

	.sportgo-sportbot__header {
		padding: 10px 12px;
		gap: 8px;
	}

	.sportgo-sportbot__header h3 {
		font-size: 15px;
	}

	.sportgo-sportbot__header-actions {
		gap: 6px;
	}

	.sportgo-sportbot__new-chat-button,
	.sportgo-sportbot__send-button {
		height: 32px;
		padding: 6px 10px;
		font-size: 13px;
	}

	.sportgo-sportbot__close {
		font-size: 22px;
	}

	.sportgo-sportbot__messages {
		padding: 8px;
	}

	.sportgo-sportbot__message {
		max-width: 92%;
		padding: 9px 11px;
		font-size: 13px;
	}

	.sportgo-sportbot__typing-text {
		font-size: 12px;
	}

	.sportgo-sportbot__form {
		padding: 8px;
		gap: 6px;
	}

	.sportgo-sportbot__form input {
		padding: 9px;
		font-size: 13px;
	}

	.sportgo-sportbot__form .sportgo-sportbot__send-button {
		padding: 6px 10px;
		font-size: 13px;
	}
}
