/* Illusionz Wedding Concierge — widget styles */

#idwai-root {
	--idwai-accent: #4A2E3C;
	--idwai-gold: #C9A96A;
	--idwai-panel-bg: #FBF7F4;
	--idwai-text: #2B2129;
	--idwai-radius: 18px;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--idwai-text);
}

/* ---- Launcher bubble ---- */
#idwai-bubble {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	background: var(--idwai-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 0 1px var(--idwai-gold) inset, 0 10px 26px rgba(45, 25, 40, 0.32);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#idwai-bubble:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--idwai-gold) inset, 0 14px 30px rgba(45, 25, 40, 0.38); }
#idwai-bubble:focus-visible { outline: 3px solid var(--idwai-gold); outline-offset: 3px; }
#idwai-bubble .idwai-close-icon { display: none; }
.idwai-open #idwai-bubble .idwai-close-icon { display: block; }
.idwai-open #idwai-bubble .idwai-open-icon { display: none; }

/* ---- Advisor photo on the launcher ---- */
#idwai-bubble.idwai-photo {
	padding: 0;
	overflow: hidden;
	background: #fff;
}
.idwai-avatar-launcher {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	display: block;
}
/* When open, the photo gives way to the close icon. */
.idwai-open #idwai-bubble.idwai-photo { background: var(--idwai-accent); }
.idwai-open #idwai-bubble.idwai-photo picture,
.idwai-open #idwai-bubble.idwai-photo .idwai-avatar-launcher { display: none; }

/* ---- Panel ---- */
#idwai-panel {
	position: absolute;
	right: 0;
	bottom: 74px;
	width: 380px;
	max-width: calc(100vw - 32px);
	height: 560px;
	max-height: calc(100vh - 120px);
	background: #ffffff;
	border-radius: var(--idwai-radius);
	box-shadow: 0 24px 64px rgba(35, 20, 32, 0.3);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	animation: idwai-pop 0.18s ease-out;
}
/* Closing: the hidden attribute must always win over display:flex above. */
#idwai-panel[hidden] {
	display: none !important;
}
@keyframes idwai-pop {
	from { opacity: 0; transform: translateY(10px) scale(0.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
	#idwai-panel { animation: none; }
	#idwai-bubble { transition: none; }
}

/* ---- Header ---- */
.idwai-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 15px 16px;
	background: var(--idwai-accent);
	color: #fff;
	border-bottom: 2px solid var(--idwai-gold);
}
.idwai-head-avatar-wrap {
	position: relative;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	display: block;
}
.idwai-head-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	background: #fff;
	box-shadow: 0 0 0 2px var(--idwai-gold);
}
.idwai-head-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #4ADE80;
	flex: 0 0 auto;
}
.idwai-head-avatar-wrap .idwai-head-dot {
	position: absolute;
	right: -1px;
	bottom: -1px;
	border: 2px solid var(--idwai-accent);
	box-sizing: content-box;
}
.idwai-head-dot-solo {
	box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.25);
}
.idwai-head-text { flex: 1 1 auto; min-width: 0; }
.idwai-head-text strong {
	display: block;
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 500;
	font-size: 16px;
	letter-spacing: 0.02em;
}
.idwai-head-text span { display: block; font-size: 11.5px; opacity: 0.8; letter-spacing: 0.03em; }
.idwai-reset,
.idwai-min {
	background: rgba(255, 255, 255, 0.12);
	border: none;
	color: #fff;
	width: 30px;
	height: 30px;
	border-radius: 8px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	margin-left: 6px;
}
.idwai-reset:hover,
.idwai-min:hover { background: rgba(255, 255, 255, 0.24); }

/* ---- Messages ---- */
.idwai-msgs {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px 14px;
	background: var(--idwai-panel-bg);
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.idwai-msg { display: flex; }
.idwai-msg.idwai-user { justify-content: flex-end; }
.idwai-bubble-msg {
	max-width: 85%;
	padding: 11px 14px;
	border-radius: 16px;
	word-wrap: break-word;
	overflow-wrap: break-word;
}
.idwai-assistant .idwai-bubble-msg {
	background: #ffffff;
	border: 1px solid rgba(74, 46, 60, 0.1);
	border-bottom-left-radius: 5px;
	color: var(--idwai-text);
	box-shadow: 0 1px 2px rgba(45, 25, 40, 0.04);
}
.idwai-user .idwai-bubble-msg {
	background: var(--idwai-accent);
	color: #fff;
	border-bottom-right-radius: 5px;
}
.idwai-bubble-msg a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.idwai-assistant .idwai-bubble-msg a { color: var(--idwai-accent); font-weight: 600; }

/* ---- Quick reply chips ---- */
.idwai-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	padding-top: 2px;
}
.idwai-chip {
	background: #fff;
	border: 1px solid var(--idwai-gold);
	color: var(--idwai-accent);
	font: inherit;
	font-size: 13px;
	line-height: 1.3;
	padding: 8px 12px;
	border-radius: 999px;
	cursor: pointer;
	text-align: left;
	transition: background 0.15s ease, color 0.15s ease;
}
.idwai-chip:hover { background: var(--idwai-accent); color: #fff; border-color: var(--idwai-accent); }
.idwai-chip:focus-visible { outline: 2px solid var(--idwai-accent); outline-offset: 2px; }

/* Typing dots */
.idwai-typing .idwai-bubble-msg { display: flex; gap: 5px; padding: 14px 16px; }
.idwai-typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: rgba(74, 46, 60, 0.42);
	animation: idwai-blink 1.2s infinite ease-in-out;
}
.idwai-typing span:nth-child(2) { animation-delay: 0.15s; }
.idwai-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes idwai-blink {
	0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
	40% { opacity: 1; transform: translateY(-3px); }
}

/* ---- Consultation CTA ---- */
.idwai-ctarow {
	padding: 10px 12px 0;
	background: #fff;
}
.idwai-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	box-sizing: border-box;
	padding: 11px 14px;
	border-radius: 12px;
	background: var(--idwai-gold);
	color: #2B2129 !important;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.01em;
	text-decoration: none !important;
	transition: filter 0.15s ease;
}
.idwai-cta:hover { filter: brightness(1.06); }
.idwai-cta:focus-visible { outline: 2px solid var(--idwai-accent); outline-offset: 2px; }

/* ---- Input row ---- */
.idwai-inputrow {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 10px 12px;
	background: #fff;
}
#idwai-input {
	flex: 1 1 auto;
	resize: none;
	border: 1px solid rgba(74, 46, 60, 0.2);
	border-radius: 12px;
	padding: 10px 12px;
	font: inherit;
	color: inherit;
	max-height: 120px;
	background: #fff;
}
#idwai-input:focus { outline: 2px solid var(--idwai-accent); outline-offset: -1px; }
#idwai-send {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	border: none;
	background: var(--idwai-accent);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
#idwai-send:disabled { opacity: 0.5; cursor: default; }

/* ---- Footer ---- */
.idwai-foot {
	padding: 6px 14px 10px;
	font-size: 10.5px;
	color: rgba(43, 33, 41, 0.55);
	text-align: center;
	background: #fff;
	letter-spacing: 0.02em;
}

/* ---- Mobile ---- */
@media (max-width: 480px) {
	#idwai-root { right: 12px; bottom: 12px; }
	#idwai-panel {
		width: calc(100vw - 24px);
		height: calc(100dvh - 96px);
		max-height: none;
		bottom: 72px;
	}
}
