/* Claude Chat Assistant — front-end widget styles */
.cca-root {
	--cca-accent: #2563eb;
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Launcher bubble */
.cca-launcher {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--cca-accent);
	border: none;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cca-launcher:hover { transform: scale(1.06); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
.cca-launcher svg { width: 28px; height: 28px; fill: #fff; }

/* Call-to-action label next to the bubble */
.cca-cta {
	position: absolute;
	right: 74px;
	bottom: 9px;
	max-width: 240px;
	background: #fff;
	color: #1f2328;
	padding: 11px 34px 11px 15px;
	border-radius: 16px;
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.16);
	font-size: 14px;
	line-height: 1.35;
	font-weight: 500;
	cursor: pointer;
	white-space: normal;
	animation: cca-cta-pop 0.35s ease both;
	animation-delay: 0.6s;
}
.cca-cta::after {
	content: '';
	position: absolute;
	right: -7px;
	bottom: 16px;
	border-left: 8px solid #fff;
	border-top: 7px solid transparent;
	border-bottom: 7px solid transparent;
}
.cca-cta-close {
	position: absolute;
	top: 4px;
	right: 6px;
	background: transparent;
	border: none;
	color: #9aa3ab;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	padding: 2px 4px;
}
.cca-cta-close:hover { color: #4b5560; }
.cca-root.cca-open .cca-cta,
.cca-cta.cca-cta-dismissed { display: none; }
@keyframes cca-cta-pop { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Chat window */
.cca-window {
	position: absolute;
	bottom: 76px;
	right: 0;
	width: 370px;
	max-width: calc(100vw - 40px);
	height: 540px;
	max-height: calc(100vh - 120px);
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
	display: none;
	flex-direction: column;
	overflow: hidden;
}
.cca-root.cca-open .cca-window { display: flex; }

/* Drag-to-resize handle (top-left corner) */
.cca-resize-handle {
	position: absolute;
	top: 0;
	left: 0;
	width: 20px;
	height: 20px;
	cursor: nwse-resize;
	z-index: 6;
	touch-action: none;
}
.cca-resize-handle::before {
	content: '';
	position: absolute;
	top: 6px;
	left: 6px;
	width: 8px;
	height: 8px;
	border-left: 2px solid rgba(255, 255, 255, 0.75);
	border-top: 2px solid rgba(255, 255, 255, 0.75);
	border-top-left-radius: 3px;
}

.cca-header {
	background: var(--cca-accent);
	color: #fff;
	padding: 14px 16px 14px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 0 0 auto;
}
.cca-header h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.2; }
.cca-close {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
	opacity: 0.9;
}
.cca-close:hover { opacity: 1; }

.cca-messages {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px;
	background: #f7f8fa;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.cca-msg {
	max-width: 82%;
	padding: 10px 13px;
	border-radius: 14px;
	font-size: 14.5px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.cca-msg.cca-user {
	align-self: flex-end;
	background: var(--cca-accent);
	color: #fff;
	border-bottom-right-radius: 4px;
}
.cca-msg.cca-bot {
	align-self: flex-start;
	background: #fff;
	color: #1f2328;
	border: 1px solid #e6e8eb;
	border-bottom-left-radius: 4px;
}
.cca-msg.cca-error { background: #fdecec; color: #b42318; border-color: #f7c9c9; }

/* Typing indicator */
.cca-typing { display: inline-flex; gap: 4px; align-items: center; }
.cca-typing span {
	width: 7px; height: 7px; border-radius: 50%; background: #b7bcc2;
	animation: cca-bounce 1.2s infinite ease-in-out;
}
.cca-typing span:nth-child(2) { animation-delay: 0.15s; }
.cca-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes cca-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.6; } 30% { transform: translateY(-5px); opacity: 1; } }

.cca-input-row {
	flex: 0 0 auto;
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #e6e8eb;
	background: #fff;
}
.cca-input {
	flex: 1 1 auto;
	resize: none;
	border: 1px solid #d5d9de;
	border-radius: 10px;
	padding: 9px 11px;
	font-size: 14.5px;
	font-family: inherit;
	line-height: 1.4;
	max-height: 96px;
	outline: none;
}
.cca-input:focus { border-color: var(--cca-accent); }
.cca-send {
	flex: 0 0 auto;
	width: 42px;
	border: none;
	border-radius: 10px;
	background: var(--cca-accent);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.cca-send:disabled { opacity: 0.5; cursor: default; }
.cca-send svg { width: 20px; height: 20px; fill: #fff; }

.cca-footer {
	text-align: center;
	font-size: 11px;
	color: #98a0a8;
	padding: 6px 0 9px;
	background: #fff;
}
