/* AI analysis bubble + modal (shortcode / Elementor) */

.fd-ai-analysis-embed {
	position: relative;
	display: inline-flex;
	align-items: flex-end;
	margin: 8px 0;
}

.fd-ai-analysis-bubble-btn {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	min-height: 52px;
	width: auto;
	max-width: min(100%, 280px);
	padding: 10px 16px 10px 12px;
	border-radius: 26px 26px 26px 10px;
	border: none;
	cursor: pointer;
	background: linear-gradient(145deg, #4c1d95 0%, #1e3a5f 100%);
	color: #fff;
	box-shadow: 0 4px 14px rgba(30, 58, 95, 0.35);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	text-align: left;
}

.fd-ai-analysis-bubble-label {
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0.01em;
}

.fd-ai-analysis-bubble-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(30, 58, 95, 0.45);
}

.fd-ai-analysis-bubble-btn:focus {
	outline: 2px solid #5c7cfa;
	outline-offset: 2px;
}

.fd-ai-analysis-bubble-btn svg {
	width: 26px;
	height: 26px;
	display: block;
}

.fd-ai-analysis-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

.fd-ai-analysis-modal {
	background: #fff;
	color: #0f172a;
	border-radius: 12px;
	max-width: min(920px, 100%);
	width: 100%;
	max-height: min(88vh, 900px);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.fd-ai-analysis-modal header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	border-bottom: 1px solid #e2e8f0;
	background: #f8fafc;
}

.fd-ai-analysis-modal header h2 {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 700;
	flex: 1;
	min-width: 0;
}

.fd-ai-analysis-modal .fd-ai-modal-close {
	position: relative;
	z-index: 2;
	border: none;
	background: #e2e8f0;
	color: #0f172a;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 1.25rem;
	line-height: 1;
	flex-shrink: 0;
	pointer-events: auto;
}

.fd-ai-analysis-modal .fd-ai-modal-close:hover {
	background: #cbd5e1;
}

.fd-ai-analysis-modal .fd-ai-modal-body {
	padding: 18px 20px 24px;
	overflow-y: auto;
	line-height: 1.6;
	font-size: 15px;
}

.fd-ai-analysis-modal .fd-ai-modal-body h2,
.fd-ai-analysis-modal .fd-ai-modal-body h3 {
	margin-top: 1.25em;
	margin-bottom: 0.5em;
}

.fd-ai-analysis-modal .fd-ai-modal-body p {
	margin: 0 0 1em;
}

.fd-ai-analysis-embed-error {
	color: #b32d2e;
	padding: 8px 0;
}

.fd-ai-modal-loading {
	padding: 24px;
	text-align: center;
	color: #64748b;
}
