/* Bank-style advisor chat — homepage */

.aa-dc {
	--aa-dc-ink: #12182b;
	--aa-dc-muted: #667085;
	--aa-dc-line: #e6ebf5;
	--aa-dc-bg: #f4f6fb;
	--aa-dc-accent: #3b6dff;
	--aa-dc-accent-2: #2f5cf0;
	--aa-dc-bot: #ffffff;
	--aa-dc-user: #3b6dff;
	--aa-dc-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	position: fixed;
	right: 1.15rem;
	bottom: 5.75rem;
	z-index: 99980;
	font-family: var(--aa-dc-font);
}

.aa-dc__launcher {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.72rem 1rem 0.72rem 0.85rem;
	border: none;
	border-radius: 999px;
	background: linear-gradient(135deg, #3b6dff 0%, #5b4dff 100%);
	color: #fff;
	box-shadow: 0 12px 28px rgba(59, 109, 255, 0.38);
	cursor: pointer;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 700;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.aa-dc__launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 32px rgba(59, 109, 255, 0.45);
}

.aa-dc__launcher-dot {
	position: absolute;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #22c55e;
	border: 2px solid #fff;
	transform: translate(18px, -14px);
}

.aa-dc__launcher-icon {
	display: inline-flex;
	color: #fff;
}

.aa-dc__launcher-label {
	padding-right: 0.15rem;
}

.aa-dc.is-open .aa-dc__launcher {
	display: none;
}

.aa-dc__panel {
	width: min(392px, calc(100vw - 1.5rem));
	height: min(620px, calc(100vh - 7rem));
	display: flex;
	flex-direction: column;
	background: var(--aa-dc-bg);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 22px 50px rgba(15, 22, 48, 0.28);
	border: 1px solid rgba(255, 255, 255, 0.4);
}

.aa-dc__panel[hidden] {
	display: none !important;
}

.aa-dc__head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.9rem 0.95rem;
	background: linear-gradient(135deg, #1a2450 0%, #2a3a7a 55%, #3b6dff 140%);
	color: #fff;
}

.aa-dc__avatar {
	width: 2.35rem;
	height: 2.35rem;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: rgba(255, 255, 255, 0.18);
	font-weight: 800;
	font-size: 1rem;
}

.aa-dc__head-text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.12rem;
}

.aa-dc__head-text strong {
	font-size: 0.95rem;
	font-weight: 700;
}

.aa-dc__status {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.72rem;
	opacity: 0.88;
}

.aa-dc__status i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #4ade80;
	display: inline-block;
}

.aa-dc__close {
	border: none;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}

.aa-dc__messages {
	flex: 1;
	overflow-y: auto;
	padding: 1rem 0.85rem 0.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.aa-dc__row {
	display: flex;
	gap: 0.45rem;
	max-width: 92%;
	animation: aa-dc-in 0.28s ease;
}

.aa-dc__row--bot {
	align-self: flex-start;
}

.aa-dc__row--user {
	align-self: flex-end;
	flex-direction: row-reverse;
}

.aa-dc__bubble {
	padding: 0.72rem 0.85rem;
	border-radius: 14px;
	font-size: 0.88rem;
	line-height: 1.45;
	color: var(--aa-dc-ink);
	background: var(--aa-dc-bot);
	border: 1px solid var(--aa-dc-line);
	box-shadow: 0 4px 12px rgba(18, 24, 43, 0.04);
}

.aa-dc__row--user .aa-dc__bubble {
	background: var(--aa-dc-user);
	color: #fff;
	border-color: transparent;
}

.aa-dc__bubble p {
	margin: 0 0 0.45rem;
}

.aa-dc__bubble p:last-child {
	margin-bottom: 0;
}

.aa-dc__typing {
	display: inline-flex;
	gap: 4px;
	padding: 0.85rem 1rem;
	background: #fff;
	border: 1px solid var(--aa-dc-line);
	border-radius: 14px;
}

.aa-dc__typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #9aa3b8;
	animation: aa-dc-dot 1s infinite ease-in-out;
}

.aa-dc__typing span:nth-child(2) { animation-delay: 0.15s; }
.aa-dc__typing span:nth-child(3) { animation-delay: 0.3s; }

.aa-dc__alt-label {
	margin: 0.55rem 0 0.25rem;
	font-size: 0.75rem;
	font-weight: 700;
	color: #667085;
}

.aa-dc__reply p {
	margin: 0 0 0.45rem;
}

.aa-dc__reply p:last-child {
	margin-bottom: 0;
}

.aa-dc__bubble .aa-dc__card {
	margin-top: 0.55rem;
}

.aa-dc__card img {
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: 8px;
	background: #e8eefc;
}

.aa-dc__card-fallback {
	width: 52px;
	height: 52px;
	border-radius: 8px;
	background: linear-gradient(135deg, #dbe4ff, #eef1ff);
}

.aa-dc__card-title {
	margin: 0;
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--aa-dc-ink);
	line-height: 1.3;
}

.aa-dc__card-price {
	margin: 0.2rem 0 0.45rem;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--aa-dc-accent);
}

.aa-dc__card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.aa-dc__card-actions a {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.6rem;
	border-radius: 6px;
	font-size: 0.72rem;
	font-weight: 700;
	text-decoration: none !important;
}

.aa-dc__card-actions a.primary {
	background: var(--aa-dc-accent);
	color: #fff !important;
}

.aa-dc__card-actions a.ghost {
	background: #fff;
	color: var(--aa-dc-accent) !important;
	border: 1px solid #c9d6ff;
}

.aa-dc__quick {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	padding: 0.45rem 0.85rem 0.65rem;
	background: var(--aa-dc-bg);
	border-top: 1px solid transparent;
}

.aa-dc__quick:empty {
	display: none;
}

.aa-dc__chip {
	border: 1px solid #c9d6ff;
	background: #fff;
	color: #2447c7;
	border-radius: 999px;
	padding: 0.42rem 0.75rem;
	font: inherit;
	font-size: 0.78rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.aa-dc__chip:hover {
	background: #eef3ff;
	border-color: var(--aa-dc-accent);
}

.aa-dc__form {
	display: flex;
	gap: 0.45rem;
	padding: 0.55rem 0.75rem 0.35rem;
	background: #fff;
	border-top: 1px solid var(--aa-dc-line);
}

.aa-dc__form input {
	flex: 1;
	min-width: 0;
	border: 1px solid var(--aa-dc-line);
	border-radius: 999px;
	padding: 0.65rem 0.9rem;
	font: inherit;
	font-size: 0.88rem;
	outline: none;
	background: #f8faff;
}

.aa-dc__form input:focus {
	border-color: #9db4ff;
	background: #fff;
}

.aa-dc__send {
	width: 2.55rem;
	height: 2.55rem;
	border: none;
	border-radius: 50%;
	background: var(--aa-dc-accent);
	color: #fff;
	cursor: pointer;
	display: grid;
	place-items: center;
	flex-shrink: 0;
}

.aa-dc__send:hover {
	background: var(--aa-dc-accent-2);
}

.aa-dc__fine {
	margin: 0;
	padding: 0 0.85rem 0.55rem;
	background: #fff;
	font-size: 0.65rem;
	color: #98a2b3;
	text-align: center;
}

@keyframes aa-dc-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes aa-dc-dot {
	0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
	40% { transform: translateY(-3px); opacity: 1; }
}

@media (max-width: 560px) {
	.aa-dc {
		right: 0.75rem;
		bottom: 5.4rem;
		left: auto;
	}

	.aa-dc__panel {
		width: min(100vw - 1rem, 392px);
		height: min(72vh, 620px);
	}

	.aa-dc__launcher-label {
		display: none;
	}

	.aa-dc__launcher {
		padding: 0.85rem;
		border-radius: 50%;
	}

	.aa-dc__launcher-dot {
		transform: translate(14px, -12px);
	}
}
