.ai-field-modal[hidden] { display: none; }
.ai-field-modal { position: fixed; inset: 0; z-index: 1080; display: flex; align-items: center; justify-content: center; }
.ai-field-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); }
.ai-field-modal__dialog { position: relative; background: #fff; border-radius: 8px; width: 560px; max-width: calc(100% - 32px); box-shadow: 0 12px 40px rgba(0, 0, 0, .2); display: flex; flex-direction: column; max-height: calc(100vh - 64px); }
.ai-field-modal__header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #eef0f2; }
.ai-field-modal__title { margin: 0; font-size: 16px; color: #7c3aed; }
.ai-field-modal__title i { color: #7c3aed; }
.ai-field-modal__close { border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: #8a94a6; }
.ai-field-modal__body { padding: 20px; overflow: auto; }
.ai-field-modal__loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 0; text-align: center; }
.ai-field-loading-text { font-size: 13px; color: #6d28d9; }
.ai-field-spinner {
	width: 42px;
	height: 42px;
	border: 4px solid #ede9fe;
	border-top-color: #7c3aed;
	border-radius: 50%;
	animation: ai-field-spin .8s linear infinite, ai-field-spin-color 1.8s ease-in-out infinite;
}
@keyframes ai-field-spin { to { transform: rotate(360deg); } }
@keyframes ai-field-spin-color {
	0%, 100% { border-top-color: #a78bfa; }
	33% { border-top-color: #8b5cf6; }
	66% { border-top-color: #7c3aed; }
}
.ai-field-modal__preview { white-space: pre-wrap; line-height: 1.5; background: #f7f8fa; border: 1px solid #eef0f2; border-radius: 6px; padding: 14px; cursor: text; }
.ai-field-modal__preview:focus { outline: none; border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(139, 92, 246, .15); }
.ai-field-modal__refine { display: flex; gap: 8px; margin-top: 14px; }
.ai-field-modal__refine-input { flex: 1; background: #f5f3ff; border-color: #c4b5fd; }
.ai-field-modal__refine-input:focus { background: #fff; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(139, 92, 246, .15); }
.ai-field-modal__footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 20px; border-top: 1px solid #eef0f2; }
.ai-field-modal__footer-left { display: flex; gap: 8px; }
.ai-field-modal__insert { color: #fff; background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%); border: 1px solid #7c3aed; }
.ai-field-modal__insert:hover, .ai-field-modal__insert:focus { color: #fff; background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%); box-shadow: 0 0 10px 1px rgba(139, 92, 246, .5); }
.ai-field-btn-violet { color: #7c3aed; border: 1px solid #7c3aed; background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%); }
.ai-field-btn-violet:hover, .ai-field-btn-violet:focus { color: #6d28d9; border-color: #6d28d9; background: linear-gradient(180deg, #ede9fe 0%, #ddd6fe 100%); box-shadow: 0 0 8px rgba(139, 92, 246, .45); }

/* Prompt step */
.ai-field-modal__prompt-input { width: 100%; background: #f5f3ff; border-color: #c4b5fd; }
.ai-field-modal__prompt-input:focus { background: #fff; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(139, 92, 246, .15); }
/* Bulk preview */
.ai-field-bulk-row { padding: 10px 0; border-bottom: 1px solid #eef0f2; }
.ai-field-bulk-row:last-child { border-bottom: 0; }
.ai-field-bulk-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #7c3aed; margin-bottom: 3px; }
.ai-field-bulk-value { font-size: 13px; line-height: 1.5; color: #33475b; white-space: pre-wrap; max-height: 120px; overflow: auto; }
/* AI bar (whole-article button) */
.ai-field-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.ai-field-demo-info {
	display: inline-flex;
	align-items: flex-start;
	gap: 8px;
	max-width: 800px;
	padding: 8px 14px;
	border: 1px solid #ddd6fe;
	border-left: 3px solid #8b5cf6;
	border-radius: 6px;
	background: #f5f3ff;
	color: #6d28d9;
	font-size: 12.5px;
	line-height: 1.5;
}
.ai-field-demo-info::before {
	content: "\f05a";
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	font-size: 14px;
	line-height: 1.45;
	color: #8b5cf6;
	flex: 0 0 auto;
}
.ai-field-bulk-btn { display: inline-flex; align-items: center; gap: 7px; color: #fff; border: 1px solid #7c3aed; background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%); border-radius: 999px; padding: 7px 18px; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.ai-field-bulk-btn:hover, .ai-field-bulk-btn:focus { color: #fff; background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%); box-shadow: 0 0 12px 1px rgba(139, 92, 246, .55); text-decoration: none; }
.ai-field-bulk-btn--sm { padding: 4px 13px; font-size: 12px; gap: 5px; }

/* Froala toolbar AI tlačítko: fialové pozadí, bílý text "AI" + ikona */
.fr-toolbar .fr-btn[data-cmd="aiAssistant"],
.fr-toolbar .fr-btn-wrap .fr-btn[data-cmd="aiAssistant"] {
	width: auto !important;
	white-space: nowrap !important;
	padding: 0 24px 0 10px !important;
	margin: 2px !important;
	border-radius: 4px !important;
	background: linear-gradient(180deg, #a78bfa 0%, #8b5cf6 100%) !important;
	color: #fff !important;
	font-weight: 600;
}
.fr-toolbar .fr-btn[data-cmd="aiAssistant"] * { color: #fff !important; }
.fr-toolbar .fr-btn[data-cmd="aiAssistant"] i {
	display: inline !important;
	float: none !important;
	width: auto !important;
	margin: 0 5px 0 0 !important;
	vertical-align: middle;
}
.fr-toolbar .fr-btn.fr-dropdown[data-cmd="aiAssistant"]::after,
.fr-toolbar .fr-btn.fr-dropdown[data-cmd="aiAssistant"].fr-active::after {
	border-top-color: #fff !important;
	border-bottom-color: #fff !important;
}
.fr-toolbar .fr-btn[data-cmd="aiAssistant"]:hover,
.fr-toolbar .fr-btn[data-cmd="aiAssistant"].fr-active {
	background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%) !important;
	color: #fff !important;
}

/* Froala AI dropdown menu: ohraničení + světle fialové pozadí jako u polních tlačítek */
.fr-dropdown-menu[aria-labelledby^="aiAssistant"] {
	border-radius: 6px !important;
	background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%) !important;
	box-shadow: 0 8px 24px rgba(124, 58, 237, .22) !important;
	overflow: hidden;
}
.fr-dropdown-menu[aria-labelledby^="aiAssistant"] .fr-dropdown-wrapper,
.fr-dropdown-menu[aria-labelledby^="aiAssistant"] .fr-dropdown-content { background: transparent !important; }
.fr-dropdown-menu[aria-labelledby^="aiAssistant"] .fr-command {
	color: #6d28d9 !important;
	font-weight: 500;
}
.fr-dropdown-menu[aria-labelledby^="aiAssistant"] .fr-command:hover,
.fr-dropdown-menu[aria-labelledby^="aiAssistant"] .fr-command.fr-active {
	background: rgba(124, 58, 237, .12) !important;
	color: #6d28d9 !important;
}
.ai-field-trigger {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-left: 10px;
	padding: 3px 12px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .02em;
	line-height: 1.5;
	text-decoration: none;
	color: #7c3aed;
	border: 1px solid #7c3aed;
	background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
	border-radius: 999px;
	box-shadow: 0 0 0 0 rgba(124, 58, 237, 0);
	transition: box-shadow .18s ease, background .18s ease, transform .1s ease;
	cursor: pointer;
}
.ai-field-trigger:hover,
.ai-field-trigger:focus {
	color: #6d28d9;
	border-color: #6d28d9;
	background: linear-gradient(180deg, #ede9fe 0%, #ddd6fe 100%);
	box-shadow: 0 0 10px 1px rgba(139, 92, 246, .55);
	text-decoration: none;
	transform: translateY(-1px);
}
.ai-field-trigger i { font-size: 11px; }
.ai-field-modal__image-preview { text-align: center; padding-bottom: 14px; }
.ai-field-modal__image-preview img { max-width: 100%; max-height: 420px; border-radius: 6px; border: 1px solid #eef0f2; background: #f7f8fa; }
