/* =========================================================================
   AVEE Frontend Styles — Visitor-facing Prompt Cards & Overlays
   Lightweight, scoped, non-intrusive.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400&display=swap');

/* ── Custom Properties ───────────────────────────────────────────────────── */
:root {
	--avee-bg:       #13151c;
	--avee-border:   #2a2e3e;
	--avee-text:     #e8eaf0;
	--avee-muted:    #7b8198;
	--avee-purple:   #6c63ff;
	--avee-teal:     #00d4aa;
	--avee-amber:    #f5a623;
	--avee-radius:   12px;
	--avee-shadow:   0 16px 48px rgba(0, 0, 0, .6), 0 0 0 1px rgba(108, 99, 255, .15);
}

/* ── Prompt Card ─────────────────────────────────────────────────────────── */
.avee-prompt-card {
	position: fixed;
	z-index: 999999;
	width: 300px;
	max-width: calc(100vw - 32px);
	background: var(--avee-bg);
	border: 1px solid var(--avee-border);
	border-radius: var(--avee-radius);
	box-shadow: var(--avee-shadow);
	font-family: 'DM Sans', sans-serif;
	overflow: hidden;
	animation: avee-pop-in .3s cubic-bezier(.34, 1.56, .64, 1);
}

/* Positions */
.avee-prompt-card.avee-pos-bottom-right { bottom: 24px; right: 24px; }
.avee-prompt-card.avee-pos-bottom-left  { bottom: 24px; left: 24px; }
.avee-prompt-card.avee-pos-bottom-center {
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
}
.avee-prompt-card.avee-pos-top-right { top: 24px; right: 24px; }

/* Top accent strip */
.avee-prompt-card::before {
	content: '';
	display: block;
	height: 3px;
	background: linear-gradient(90deg, var(--avee-purple), var(--avee-teal));
}

.avee-prompt-body {
	padding: 16px 16px 12px;
}

.avee-prompt-headline {
	font-size: 14px;
	font-weight: 700;
	color: var(--avee-text);
	margin: 0 0 6px;
	padding-right: 24px; /* space for close btn */
	line-height: 1.4;
}

.avee-prompt-message {
	font-size: 13px;
	color: var(--avee-muted);
	line-height: 1.6;
	margin: 0 0 14px;
}

.avee-prompt-footer {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 16px 14px;
}

.avee-prompt-cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	background: var(--avee-purple);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-family: 'DM Sans', sans-serif;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, box-shadow .15s;
	text-decoration: none;
}

.avee-prompt-cta:hover {
	background: #7b73ff;
	box-shadow: 0 0 10px rgba(108, 99, 255, .4);
}

.avee-prompt-dismiss {
	background: none;
	border: none;
	color: var(--avee-muted);
	font-size: 12px;
	font-family: 'DM Sans', sans-serif;
	cursor: pointer;
	padding: 4px;
	transition: color .15s;
}

.avee-prompt-dismiss:hover { color: var(--avee-text); }

.avee-prompt-close {
	position: absolute;
	top: 10px;
	right: 10px;
	background: none;
	border: none;
	color: var(--avee-muted);
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	padding: 4px;
	transition: color .15s;
}
.avee-prompt-close:hover { color: var(--avee-text); }

/* ── Welcome Back Banner ─────────────────────────────────────────────────── */
.avee-welcome-back {
	position: fixed;
	bottom: 24px;
	left: 24px;
	z-index: 999998;
	background: var(--avee-bg);
	border: 1px solid var(--avee-teal);
	border-radius: 10px;
	padding: 12px 16px;
	max-width: 280px;
	font-family: 'DM Sans', sans-serif;
	box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
	animation: avee-pop-in .35s cubic-bezier(.34, 1.56, .64, 1);
}

.avee-welcome-back-text {
	font-size: 13px;
	color: var(--avee-text);
	line-height: 1.6;
	margin: 0;
}

.avee-welcome-back-close {
	position: absolute;
	top: 8px;
	right: 8px;
	background: none;
	border: none;
	color: var(--avee-muted);
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	padding: 2px;
}

/* ── Discovery Modal ─────────────────────────────────────────────────────── */
.avee-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999999;
	background: rgba(0, 0, 0, .75);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	animation: avee-fade-in .2s ease;
}

.avee-modal {
	background: var(--avee-bg);
	border: 1px solid var(--avee-border);
	border-radius: 12px;
	width: 100%;
	max-width: 440px;
	max-height: 90vh;
	overflow: hidden;
	box-shadow: 0 24px 64px rgba(0, 0, 0, .7);
	font-family: 'DM Sans', sans-serif;
	animation: avee-modal-in .3s ease;
}

.avee-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--avee-border);
}

.avee-modal-title {
	font-size: 15px;
	font-weight: 700;
	color: var(--avee-text);
	margin: 0;
}

.avee-modal-close {
	background: none;
	border: none;
	color: var(--avee-muted);
	font-size: 20px;
	cursor: pointer;
	line-height: 1;
	padding: 4px;
	transition: color .15s;
}
.avee-modal-close:hover { color: var(--avee-text); }

.avee-modal-body {
	padding: 20px;
	overflow-y: auto;
}

.avee-discovery-question {
	font-size: 16px;
	font-weight: 600;
	color: var(--avee-text);
	margin: 0 0 16px;
	line-height: 1.5;
}

.avee-discovery-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.avee-discovery-option {
	background: #1a1d26;
	border: 1px solid var(--avee-border);
	border-radius: 8px;
	padding: 12px 14px;
	font-size: 13px;
	color: var(--avee-text);
	cursor: pointer;
	transition: all .15s;
	text-align: left;
	font-family: 'DM Sans', sans-serif;
}

.avee-discovery-option:hover {
	border-color: var(--avee-purple);
	background: rgba(108, 99, 255, .08);
	color: var(--avee-text);
}

.avee-discovery-recommendation {
	background: rgba(0, 212, 170, .08);
	border: 1px solid rgba(0, 212, 170, .25);
	border-radius: 10px;
	padding: 16px;
}

.avee-discovery-recommendation p {
	font-size: 14px;
	color: var(--avee-text);
	line-height: 1.7;
	margin: 0 0 14px;
}

/* ── AI Loading Orb (frontend) ───────────────────────────────────────────── */
.avee-loading-orb {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 20px;
}

.avee-orb-small {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: radial-gradient(circle at 40% 40%, var(--avee-purple), var(--avee-teal));
	box-shadow: 0 0 14px rgba(108, 99, 255, .5);
	animation: avee-pulse-small 2s ease-in-out infinite;
}

.avee-loading-text {
	font-size: 12px;
	color: var(--avee-muted);
	font-family: 'DM Sans', sans-serif;
}

/* ── Discovery Launcher Button ───────────────────────────────────────────── */
.avee-launcher {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999997;
	background: linear-gradient(135deg, var(--avee-purple), #8b84ff);
	border: none;
	border-radius: 24px;
	padding: 10px 18px;
	font-family: 'DM Sans', sans-serif;
	font-size: 13px;
	font-weight: 600;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(108, 99, 255, .4);
	display: flex;
	align-items: center;
	gap: 7px;
	transition: transform .15s, box-shadow .15s;
	animation: avee-pop-in .4s cubic-bezier(.34, 1.56, .64, 1) .5s both;
}

.avee-launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(108, 99, 255, .5);
}

.avee-launcher-icon {
	font-size: 16px;
}

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes avee-pop-in {
	from { opacity: 0; transform: scale(.85) translateY(8px); }
	to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes avee-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes avee-modal-in {
	from { opacity: 0; transform: scale(.95) translateY(-12px); }
	to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes avee-pulse-small {
	0%, 100% { box-shadow: 0 0 14px rgba(108,99,255,.5); transform: scale(1); }
	50%       { box-shadow: 0 0 22px rgba(108,99,255,.8), 0 0 40px rgba(0,212,170,.3); transform: scale(1.08); }
}

/* ── Position for bottom-right when prompt card is also there ────────────── */
.avee-launcher.avee-launcher-shifted { bottom: 24px; right: 338px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
	.avee-prompt-card { width: calc(100vw - 32px); bottom: 16px !important; right: 16px !important; left: 16px !important; }
	.avee-welcome-back { max-width: calc(100vw - 32px); }
	.avee-launcher { bottom: 16px; right: 16px; }
}
