.atlas-chat,
.atlas-chat * {
	box-sizing: border-box;
}

.atlas-chat {
	--atlas-chat-bg: #0b0414;
	--atlas-chat-card: #180925;
	--atlas-chat-card-2: #221034;
	--atlas-chat-text: #fffafc;
	--atlas-chat-muted: #bdb2c7;
	--atlas-chat-border: rgba(255,255,255,.11);
	--atlas-chat-yellow: #f4d321;
	--atlas-chat-pink: #d63c91;
	--atlas-chat-purple: #7a3bd1;
	--atlas-chat-green: #2bd378;
	position: fixed;
	left: 18px;
	bottom: 18px;
	z-index: 99980;
	font-family: Inter, Poppins, Arial, sans-serif;
	color: var(--atlas-chat-text);
}

.atlas-chat button,
.atlas-chat input,
.atlas-chat textarea {
	font: inherit;
}

.atlas-chat-prompt {
	position: absolute;
	left: 68px;
	bottom: 7px;
	min-width: 128px;
	height: 44px;
	padding: 0 14px;
	border: 1px solid rgba(255,255,255,.13);
	border-radius: 13px;
	color: #fff;
	background:
		linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.025)),
		#1b0a2b;
	box-shadow: 0 14px 34px rgba(0,0,0,.34);
	font-size: 12px;
	font-weight: 850;
	white-space: nowrap;
	cursor: pointer;
	animation: atlas-chat-float 3.2s ease-in-out infinite;
}

.atlas-chat-prompt::before {
	content: "";
	position: absolute;
	left: -6px;
	top: 16px;
	width: 12px;
	height: 12px;
	border-left: 1px solid rgba(255,255,255,.13);
	border-bottom: 1px solid rgba(255,255,255,.13);
	background: #1b0a2b;
	transform: rotate(45deg);
}

.atlas-chat-launcher {
	position: relative;
	width: 58px;
	height: 58px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255,255,255,.13);
	border-radius: 19px;
	color: #fff;
	background:
		radial-gradient(circle at 30% 20%, rgba(255,255,255,.16), transparent 28%),
		linear-gradient(145deg, #6f31c5, #32104f 72%);
	box-shadow:
		0 16px 42px rgba(69,23,112,.48),
		inset 0 1px 0 rgba(255,255,255,.12);
	cursor: pointer;
	transition: transform .18s ease, box-shadow .18s ease;
}

.atlas-chat-launcher:hover {
	transform: translateY(-2px) scale(1.04);
	box-shadow:
		0 20px 48px rgba(69,23,112,.60),
		inset 0 1px 0 rgba(255,255,255,.15);
}

.atlas-chat-launcher svg {
	width: 28px;
	height: 28px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.atlas-chat-unread {
	position: absolute;
	right: -5px;
	top: -6px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #0b0414;
	border-radius: 999px;
	color: #fff;
	background: #ff4968;
	font-size: 10px;
	font-weight: 900;
}

.atlas-chat-panel {
	position: absolute;
	left: 0;
	bottom: 74px;
	width: min(390px, calc(100vw - 24px));
	height: min(620px, calc(100vh - 110px));
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--atlas-chat-border);
	border-radius: 24px;
	background:
		radial-gradient(circle at 100% 0, rgba(214,60,145,.13), transparent 28%),
		linear-gradient(150deg, rgba(255,255,255,.055), rgba(255,255,255,.018)),
		var(--atlas-chat-bg);
	box-shadow: 0 30px 90px rgba(0,0,0,.48);
	transform-origin: left bottom;
	animation: atlas-chat-open .18s ease both;
}

.atlas-chat-panel[hidden] {
	display: none !important;
}

.atlas-chat-header {
	min-height: 74px;
	padding: 14px 15px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	border-bottom: 1px solid var(--atlas-chat-border);
	background: rgba(255,255,255,.035);
}

.atlas-chat-brand {
	display: flex;
	align-items: center;
	gap: 11px;
	min-width: 0;
}

.atlas-chat-avatar {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 14px;
	color: #fff;
	background: linear-gradient(145deg, #7a3bd1, #3b145a);
}

.atlas-chat-avatar svg {
	width: 23px;
	height: 23px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.atlas-chat-brand strong {
	display: block;
	margin-bottom: 3px;
	color: #fff;
	font-size: 13px;
	font-weight: 900;
}

.atlas-chat-brand > div > span {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--atlas-chat-muted);
	font-size: 10px;
	font-weight: 700;
}

.atlas-chat-brand i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--atlas-chat-green);
	box-shadow: 0 0 10px rgba(43,211,120,.55);
}

.atlas-chat-header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.atlas-chat-languages {
	display: flex;
	padding: 3px;
	border: 1px solid var(--atlas-chat-border);
	border-radius: 10px;
	background: rgba(0,0,0,.18);
}

.atlas-chat-languages button {
	min-width: 31px;
	height: 26px;
	padding: 0 7px;
	border: 0;
	border-radius: 7px;
	color: #a99eaf;
	background: transparent;
	font-size: 9px;
	font-weight: 900;
	cursor: pointer;
}

.atlas-chat-languages button.is-active {
	color: #fff;
	background: linear-gradient(145deg, #7a3bd1, #3b145a);
}

.atlas-chat-close {
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 9px;
	color: #e8dfea;
	background: rgba(255,255,255,.06);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.atlas-chat-body {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.atlas-chat-messages {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 18px 15px 8px;
	scrollbar-width: thin;
	scrollbar-color: rgba(255,255,255,.15) transparent;
}

.atlas-chat-message {
	max-width: 86%;
	margin-bottom: 11px;
	padding: 11px 13px;
	border-radius: 15px;
	font-size: 12px;
	line-height: 1.55;
	word-break: break-word;
}

.atlas-chat-message strong {
	display: block;
	margin-bottom: 3px;
	font-size: 10px;
	font-weight: 900;
}

.atlas-chat-message p {
	margin: 0;
	color: inherit;
	font: inherit;
}

.atlas-chat-message a {
	color: inherit;
	font-weight: 850;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.atlas-chat-message-agent,
.atlas-chat-message-system {
	margin-right: auto;
	border: 1px solid var(--atlas-chat-border);
	border-radius: 15px 15px 15px 4px;
	color: #e8e0ec;
	background: var(--atlas-chat-card-2);
}

.atlas-chat-message-visitor {
	margin-left: auto;
	border-radius: 15px 15px 4px 15px;
	color: #fff;
	background: linear-gradient(145deg, #ffe75c, var(--atlas-chat-yellow));
	font-weight: 700;
}

.atlas-chat-start {
	padding: 10px 15px 16px;
	border-top: 1px solid var(--atlas-chat-border);
	background: rgba(255,255,255,.025);
}

.atlas-chat-start-title {
	margin: 0 0 12px;
	color: #fff;
	font-size: 13px;
	font-weight: 900;
}

.atlas-chat-start label {
	display: block;
	margin-bottom: 10px;
}

.atlas-chat-start label span {
	display: block;
	margin-bottom: 5px;
	color: #e4dae7;
	font-size: 10px;
	font-weight: 800;
}

.atlas-chat-start input {
	width: 100%;
	height: 43px;
	padding: 0 12px;
	border: 1px solid var(--atlas-chat-border);
	border-radius: 12px;
	outline: none;
	color: #fff;
	background: rgba(0,0,0,.24);
	font-size: 12px;
}

.atlas-chat-start input:focus,
.atlas-chat-compose textarea:focus {
	border-color: rgba(244,211,33,.55);
	box-shadow: 0 0 0 3px rgba(244,211,33,.07);
}

.atlas-chat-honeypot {
	position: absolute !important;
	left: -9999px !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.atlas-chat-start-button {
	width: 100%;
	min-height: 45px;
	border: 0;
	border-radius: 12px;
	color: #fff;
	background: linear-gradient(145deg, #7a3bd1, #3b145a);
	font-size: 12px;
	font-weight: 950;
	cursor: pointer;
}

.atlas-chat-start small {
	display: block;
	margin-top: 9px;
	color: #887e91;
	font-size: 9px;
	line-height: 1.5;
	text-align: center;
}

.atlas-chat-active {
	padding: 9px 12px 12px;
	border-top: 1px solid var(--atlas-chat-border);
	background: rgba(255,255,255,.025);
}

.atlas-chat-active[hidden] {
	display: none !important;
}

.atlas-chat-quick {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	padding-bottom: 8px;
	scrollbar-width: none;
}

.atlas-chat-quick::-webkit-scrollbar {
	display: none;
}

.atlas-chat-quick button {
	flex: 0 0 auto;
	min-height: 30px;
	padding: 6px 10px;
	border: 1px solid var(--atlas-chat-border);
	border-radius: 999px;
	color: #ddd3e3;
	background: rgba(255,255,255,.04);
	font-size: 9px;
	font-weight: 850;
	cursor: pointer;
}

.atlas-chat-quick button:hover {
	color: #241329;
	border-color: rgba(154,91,225,.85);
	background: linear-gradient(145deg, #7a3bd1, #3b145a);
}

.atlas-chat-compose {
	display: grid;
	grid-template-columns: minmax(0,1fr) 43px;
	gap: 8px;
	align-items: end;
}

.atlas-chat-compose textarea {
	width: 100%;
	min-height: 43px;
	max-height: 100px;
	resize: none;
	padding: 11px 12px;
	border: 1px solid var(--atlas-chat-border);
	border-radius: 13px;
	outline: none;
	color: #fff;
	background: rgba(0,0,0,.24);
	font-size: 12px;
	line-height: 1.45;
}

.atlas-chat-compose button {
	width: 43px;
	height: 43px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 13px;
	color: #241329;
	background: linear-gradient(145deg, #7a3bd1, #3b145a);
	cursor: pointer;
}

.atlas-chat-compose button svg {
	width: 21px;
	height: 21px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.atlas-chat-status {
	min-height: 14px;
	margin-top: 6px;
	color: #93899d;
	font-size: 9px;
	line-height: 1.4;
}

.atlas-chat button:focus-visible,
.atlas-chat input:focus-visible,
.atlas-chat textarea:focus-visible {
	outline: 3px solid var(--atlas-chat-yellow);
	outline-offset: 2px;
}

@keyframes atlas-chat-open {
	from { opacity: 0; transform: translateY(10px) scale(.97); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes atlas-chat-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-4px); }
}

@media (min-width: 768px) {
	.atlas-chat[data-show-desktop="0"] {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.atlas-chat {
		left: 12px;
		bottom: 12px;
	}

	.atlas-chat[data-show-mobile="0"] {
		display: none !important;
	}

	.atlas-chat-panel {
		position: fixed;
		left: 12px;
		right: 12px;
		bottom: 82px;
		width: auto;
		height: min(650px, calc(100vh - 96px));
		border-radius: 21px;
	}

	.atlas-chat-launcher {
		width: 48px;
		height: 48px;
		border-radius: 16px;
	}

	.atlas-chat-launcher svg {
		width: 23px;
		height: 23px;
	}

	.atlas-chat-prompt {
		left: 57px;
		bottom: 5px;
		min-width: 104px;
		height: 38px;
		padding: 0 11px;
		border-radius: 12px;
		font-size: 10px;
	}

	.atlas-chat-prompt::before {
		top: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.atlas-chat-prompt {
		animation: none;
	}

	.atlas-chat-panel,
	.atlas-chat-launcher {
		animation: none;
		transition: none;
	}
}


/* v1.0.1 purple refinements */
.atlas-chat-start-button,
.atlas-chat-compose button,
.atlas-chat-languages button.is-active {
	color: #fff !important;
	background: linear-gradient(145deg, #7a3bd1, #3b145a) !important;
	box-shadow: 0 10px 24px rgba(93,42,145,.26);
}

.atlas-chat-message-visitor {
	color: #fff;
	background: linear-gradient(145deg, #7a3bd1, #3b145a);
}

.atlas-chat-avatar {
	color: #fff;
	background: linear-gradient(145deg, #7a3bd1, #3b145a);
}

.atlas-chat-quick button:hover {
	color: #fff;
	border-color: rgba(154,91,225,.85);
	background: linear-gradient(145deg, #7a3bd1, #3b145a);
}


/* v1.0.2 guided action cards */
.atlas-chat-action-card {
	max-width: 92%;
	margin: 0 0 13px;
	padding: 14px;
	border: 1px solid rgba(145,80,205,.38);
	border-radius: 17px 17px 17px 5px;
	color: #eee5f2;
	background:
		linear-gradient(145deg, rgba(122,59,209,.13), rgba(255,255,255,.02)),
		#1d0b2c;
	box-shadow: 0 13px 30px rgba(0,0,0,.16);
}

.atlas-chat-action-title {
	display: block;
	margin-bottom: 6px;
	color: #fff;
	font-size: 12px;
	line-height: 1.4;
	font-weight: 950;
}

.atlas-chat-action-card > p {
	margin: 0 0 12px;
	color: #cfc4d6;
	font-size: 11px;
	line-height: 1.6;
}

.atlas-chat-action-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.atlas-chat-action-button {
	min-height: 38px;
	padding: 8px 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255,255,255,.10);
	border-radius: 11px;
	color: #fff !important;
	background: linear-gradient(145deg, #7a3bd1, #421665);
	box-shadow: 0 10px 22px rgba(77,28,119,.25);
	font-size: 10px;
	line-height: 1.35;
	font-weight: 900;
	text-align: center;
	text-decoration: none !important;
	transition: transform .16s ease, filter .16s ease;
}

.atlas-chat-action-button:hover {
	color: #fff !important;
	transform: translateY(-1px);
	filter: brightness(1.08);
}

.atlas-chat-action-button-secondary {
	color: #f0e8f3 !important;
	background: rgba(255,255,255,.055);
	box-shadow: none;
}

.atlas-chat-plan-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.atlas-chat-plan-grid .atlas-chat-action-button {
	min-height: 54px;
	padding: 9px;
}

@media (max-width: 430px) {
	.atlas-chat-action-card {
		max-width: 96%;
		padding: 12px;
	}

	.atlas-chat-plan-grid {
		grid-template-columns: 1fr;
	}

	.atlas-chat-action-button {
		width: 100%;
	}
}
