.ai-summary-widget {
	position: relative;
	box-sizing: border-box;
	margin: 20px 0;
	padding: 20px 24px 24px;
	background: #fff;
	border: 1px solid rgba(75, 132, 229, 1);
	border-radius: 10px;
}

/* sohbet giriş kutusu görünümü */
.ai-summary-widget__header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
	padding: 10px 10px 10px 14px;
	background: #fafbfd;
	border: 1px solid #e6ecf7;
	border-radius: 28px;
	color: #a3acb9;
	font-size: 16px;
	line-height: 1.3;
	cursor: default;
	user-select: none;
	-webkit-user-select: none;
}

.ai-summary-widget__spark {
	width: 24px;
	height: 24px;
	flex: none;
	color: rgba(75, 132, 229, 1);
}

.ai-summary-widget__send {
	flex: none;
	margin-left: auto;
	color: rgba(75, 132, 229, .75);
	animation: aigw-bounce 1.4s ease-in-out infinite;
}

@keyframes aigw-bounce {
	0%, 100% { transform: translateY(-2px); }
	50%      { transform: translateY(3px); }
}

.ai-summary-widget__spark path {
	transform-box: fill-box;
	transform-origin: center;
	animation: aigw-twinkle 1.8s ease-in-out infinite;
}

.ai-summary-widget__spark .s1 {
	animation-name: aigw-spin-pulse;
	animation-duration: 3.6s;
}

.ai-summary-widget__spark .s2 {
	animation-delay: .3s;
}

.ai-summary-widget__spark .s3 {
	animation-delay: .9s;
}

@keyframes aigw-twinkle {
	0%, 100% { transform: scale(.55); opacity: .35; }
	50%      { transform: scale(1.15); opacity: 1; }
}

@keyframes aigw-spin-pulse {
	0%   { transform: scale(.9) rotate(0deg); opacity: .8; }
	50%  { transform: scale(1.1) rotate(90deg); opacity: 1; }
	100% { transform: scale(.9) rotate(180deg); opacity: .8; }
}

.ai-summary-widget__title {
	flex: 1 1 auto;
	min-width: 0;
	color: #3d4756;
	min-height: 1.3em;
}

.ai-summary-widget__caret {
	display: inline-block;
	width: 2px;
	height: 1em;
	margin-left: 2px;
	vertical-align: -0.15em;
	background: currentColor;
	animation: aigw-caret 1s steps(1) infinite;
}

@keyframes aigw-caret {
	0%, 49%   { opacity: 1; }
	50%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.aigw-respect-motion .ai-summary-widget__spark path,
	.aigw-respect-motion .ai-summary-widget__send,
	.aigw-respect-motion .ai-summary-widget__caret {
		animation: none;
	}

	.aigw-respect-motion .ai-summary-widget__btn,
	.aigw-respect-motion .ai-summary-widget__btn::after {
		animation: none;
	}
}

.ai-summary-widget__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.ai-summary-widget__btn {
	position: relative;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 9px 14px;
	background: #fff;
	background: color-mix(in srgb, var(--aigw-c) 7%, #fff);
	border: 1px solid #ccc;
	border: 1px solid color-mix(in srgb, var(--aigw-c) 45%, #fff);
	border-radius: 6px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
	box-shadow: 0 2px 6px color-mix(in srgb, var(--aigw-c) 18%, transparent);
	color: #1f2937;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease;
	animation: aigw-pop .5s cubic-bezier(.34, 1.56, .64, 1) backwards;
}

.ai-summary-widget__btn:nth-child(1) { animation-delay: .05s; }
.ai-summary-widget__btn:nth-child(2) { animation-delay: .15s; }
.ai-summary-widget__btn:nth-child(3) { animation-delay: .25s; }
.ai-summary-widget__btn:nth-child(4) { animation-delay: .35s; }
.ai-summary-widget__btn:nth-child(5) { animation-delay: .45s; }

@keyframes aigw-pop {
	from { opacity: 0; transform: translateY(10px) scale(.9); }
	to   { opacity: 1; transform: none; }
}

/* her firma kendi renginde */
.ai-summary-widget__btn { --aigw-c: rgba(75, 132, 229, 1); }
.ai-summary-widget__btn[data-ai-tool="chatgpt"]    { --aigw-c: #10a37f; }
.ai-summary-widget__btn[data-ai-tool="gemini"]     { --aigw-c: #4285f4; }
.ai-summary-widget__btn[data-ai-tool="grok"]       { --aigw-c: #111111; }
.ai-summary-widget__btn[data-ai-tool="claude"]     { --aigw-c: #d97757; }
.ai-summary-widget__btn[data-ai-tool="perplexity"] { --aigw-c: #20808d; }

/* hover'da soldan sağa dolan firma rengi */
.ai-summary-widget__btn::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background: var(--aigw-c);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .25s ease;
}

/* belirli aralıklarla geçen parıltı */
.ai-summary-widget__btn::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: -60%;
	z-index: 1;
	width: 40%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .9), transparent);
	background: linear-gradient(100deg, transparent, color-mix(in srgb, var(--aigw-c) 28%, transparent), transparent);
	transform: skewX(-20deg);
	animation: aigw-shine 4.5s ease-in-out infinite;
	pointer-events: none;
}

.ai-summary-widget__btn:nth-child(2)::after { animation-delay: .5s; }
.ai-summary-widget__btn:nth-child(3)::after { animation-delay: 1s; }
.ai-summary-widget__btn:nth-child(4)::after { animation-delay: 1.5s; }
.ai-summary-widget__btn:nth-child(5)::after { animation-delay: 2s; }

@keyframes aigw-shine {
	0%, 60% { left: -60%; }
	100%    { left: 130%; }
}

.ai-summary-widget__btn img,
.ai-summary-widget__btn span {
	position: relative;
	z-index: 2;
}

.ai-summary-widget__btn img {
	width: 20px;
	height: 20px;
	margin: 0;
	flex: none;
	transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), filter .2s ease;
}

.ai-summary-widget__btn:hover,
.ai-summary-widget__btn:focus-visible {
	transform: translateY(-4px) scale(1.04);
	color: #fff;
	border-color: var(--aigw-c);
	box-shadow: 0 10px 20px rgba(0, 0, 0, .25);
	box-shadow: 0 10px 20px color-mix(in srgb, var(--aigw-c) 45%, transparent);
	outline: none;
}

.ai-summary-widget__btn:hover::before,
.ai-summary-widget__btn:focus-visible::before {
	transform: scaleX(1);
}

.ai-summary-widget__btn:hover img,
.ai-summary-widget__btn:focus-visible img {
	transform: scale(1.25) rotate(-10deg);
	filter: brightness(0) invert(1);
}

.ai-summary-widget__btn:active {
	transform: translateY(0) scale(.95);
	box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
	box-shadow: 0 2px 6px color-mix(in srgb, var(--aigw-c) 35%, transparent);
}

@media (max-width: 480px) {
	.ai-summary-widget {
		padding: 16px;
	}

	.ai-summary-widget__buttons {
		gap: 8px;
	}
}
