/**
 * Changeloger Releases Admin Styles
 * 
 * Note: Global styles are defined in admin-global.css which is loaded as a dependency.
 * Variables below override some global values for the releases page theme.
 */

/* Add New Button */
.cha-header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.cha-btn-add-new,
.cha-btn-add-product {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: none;
	padding: 12px 20px;
	border-radius: var(--cha-radius-sm);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
}

.cha-btn-add-new {
	background: var(--cha-primary);
	color: var(--cha-white);
	box-shadow: 0 2px 8px rgba(82, 93, 249, 0.3);
}

.cha-btn-add-product {
	background: var(--cha-white);
	color: var(--cha-text-secondary);
	border: 1px solid var(--cha-border);
}

.cha-btn-add-new:hover {
	background: var(--cha-primary-dark);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(82, 93, 249, 0.4);
	color: var(--cha-white);
}

.cha-btn-add-product:hover {
	border-color: var(--cha-primary);
	color: var(--cha-primary);
	background: var(--cha-secondary);
}

.cha-btn-add-new:active,
.cha-btn-add-product:active {
	transform: translateY(0);
}

.cha-btn-add-new svg,
.cha-btn-add-product svg {
	width: 16px;
	height: 16px;
}

/* Bulk Actions Bar */
.cha-bulk-actions {
	position: absolute;
	inset: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 24px;
	background: var(--cha-secondary);
}

.cha-selected-count {
	font-size: 14px;
	font-weight: 500;
	color: var(--cha-primary);
}

.cha-bulk-buttons {
	display: flex;
	align-items: center;
	gap: 8px;
}

.cha-bulk-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid var(--cha-border);
	background: var(--cha-white);
	border-radius: var(--cha-radius-xs);
	font-size: 13px;
	font-weight: 500;
	color: var(--cha-text-secondary);
	cursor: pointer;
	transition: all 0.15s ease;
}

.cha-bulk-btn:hover {
	border-color: var(--cha-primary);
	color: var(--cha-primary);
}

.cha-bulk-btn.cha-bulk-delete:hover {
	border-color: var(--cha-error);
	color: var(--cha-error);
	background: var(--cha-error-light);
}

/* AI Bulk Button */
.cha-bulk-btn.cha-bulk-ai {
	background: var(--cha-primary);
	color: #fff;
	border: none;
	box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
}

.cha-bulk-btn.cha-bulk-ai:hover {
	background: var(--cha-primary-dark);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(139, 92, 246, 0.4);
}

/* Bulk Badge Change Select */
.cha-bulk-buttons .cha-bulk-badge-select {
	padding: 7px 28px 7px 12px;
	border: 1px solid var(--cha-border);
	background: var(--cha-white);
	border-radius: var(--cha-radius-xs);
	font-size: 13px;
	font-weight: 500;
	color: var(--cha-text-secondary);
	cursor: pointer;
	transition: all 0.15s ease;
	appearance: none;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 6px center;
	background-size: 16px;
}

.cha-bulk-buttons .cha-bulk-badge-select:hover {
	border-color: var(--cha-primary);
	color: var(--cha-primary);
}

.cha-bulk-buttons .cha-bulk-badge-select:focus {
	outline: none;
	border-color: var(--cha-primary);
	box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

/* Bulk AI Rewrite Progress Modal */

#cha-bulk-ai-modal .cha-modal {
	max-width: 500px;
	width: 500px;
}

.cha-bulk-ai-desc {
	margin: 0 0 16px;
	color: var(--cha-text-secondary);
	font-size: 14px;
	line-height: 1.5;
}

.cha-bulk-ai-list {
	max-height: 300px;
	overflow-y: auto;
	border: 1px solid var(--cha-border);
	border-radius: var(--cha-radius-sm);
}

.cha-bulk-ai-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	border-bottom: 1px solid var(--cha-border-light);
}

.cha-bulk-ai-item:last-child {
	border-bottom: none;
}

.cha-bulk-ai-item-info {
	display: flex;
	align-items: center;
	gap: 10px;
}

.cha-bulk-ai-version {
	font-weight: 600;
	color: var(--cha-text-primary);
	font-size: 13px;
	background: var(--cha-bg-light);
	padding: 4px 10px;
	border-radius: 4px;
}

.cha-bulk-ai-title {
	color: var(--cha-text-secondary);
	font-size: 13px;
	max-width: 200px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cha-bulk-ai-status {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cha-bulk-ai-status.pending {
	color: var(--cha-text-muted);
}

.cha-bulk-ai-status.loading .cha-spinner-sm {
	width: 18px;
	height: 18px;
	border: 2px solid #e0e7ff;
	border-top-color: #6366f1;
	border-radius: 50%;
	animation: cha-ai-spin 0.8s linear infinite;
}

.cha-bulk-ai-status.success {
	color: var(--cha-success);
}

.cha-bulk-ai-status.error {
	color: var(--cha-error);
}

/* AI Import Modal */
.cha-modal.cha-modal-lg {
	max-width: 600px;
}

.cha-ai-import-desc {
	margin: 0 0 20px;
	color: var(--cha-text-secondary);
	font-size: 14px;
	line-height: 1.5;
}

.cha-ai-import-divider {
	display: flex;
	align-items: center;
	margin: 20px 0;
	color: var(--cha-text-muted);
}

.cha-ai-import-divider::before,
.cha-ai-import-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--cha-border);
}

.cha-ai-import-divider span {
	padding: 0 12px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* File Dropzone */
.cha-file-dropzone {
	border: 2px dashed var(--cha-border);
	border-radius: var(--cha-radius-sm);
	padding: 24px;
	text-align: center;
	cursor: pointer;
	transition: all 0.2s ease;
	background: var(--cha-bg-light);
}

.cha-file-dropzone:hover,
.cha-file-dropzone.dragover {
	border-color: var(--cha-primary);
	background: var(--cha-secondary);
}

.cha-dropzone-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	color: var(--cha-text-secondary);
}

.cha-dropzone-content svg {
	color: var(--cha-text-muted);
}

.cha-dropzone-content p {
	margin: 0;
	font-size: 14px;
}

.cha-dropzone-hint {
	font-size: 12px;
	color: var(--cha-text-muted);
}

.cha-dropzone-file {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.cha-dropzone-filename {
	font-weight: 500;
	color: var(--cha-primary);
}

.cha-dropzone-remove {
	width: 24px;
	height: 24px;
	border: none;
	background: var(--cha-error-light);
	color: var(--cha-error);
	border-radius: 50%;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cha-dropzone-remove:hover {
	background: var(--cha-error);
	color: #fff;
}

/* Small Modal */
.cha-modal.cha-modal-sm {
	max-width: 420px;
}

/* Stats Cards */
.cha-stats-cards {
	margin-bottom: 24px;
}
.cha-stat-icon.total {
	background: var(--cha-secondary);
	color: var(--cha-primary);
}

.cha-stat-icon.published {
	background: var(--cha-success-light);
	color: var(--cha-success);
}

.cha-stat-icon.drafts {
	background: var(--cha-warning-light);
	color: var(--cha-warning);
}

.cha-stat-icon.latest {
	background: #fce7f3;
	color: #db2777;
}

.cha-stat-content h3 {
	font-size: 28px;
	font-weight: 700;
	color: var(--cha-text-primary);
	margin: 0 0 4px 0;
	line-height: 1;
}

.cha-stat-content p {
	font-size: 13px;
	color: var(--cha-text-secondary);
	margin: 0;
}

/* Table Container */
.cha-releases-table-container {
	background: var(--cha-white);
	border: 1px solid var(--cha-border);
	border-radius: var(--cha-radius);
	overflow: hidden;
}

/* Search box styles removed (use admin-global.css) */

/* Filters styles removed (use admin-global.css) */

/* Releases Table */
.cha-releases-table th:first-child {
	width: 40px;
	padding-left: 24px;
	padding-right: 0;
}

.cha-releases-table tbody tr:last-child td {
	border-bottom: none;
}

/* Checkbox */
.cha-checkbox {
	width: 18px;
	height: 18px;
	border: 2px solid var(--cha-border);
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.15s ease;
}

.cha-checkbox:checked {
	background: var(--cha-primary);
	border-color: var(--cha-primary);
}
.cha-checkbox:checked::before {
	content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
	width: 1em !important;
	height: 1em !important;
	margin: 1px 0 0 0 !important;
}

/* Version Badge */
.cha-version {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	background: var(--cha-secondary);
	color: var(--cha-primary);
	border-radius: var(--cha-radius-xs);
	font-size: 13px;
	font-weight: 600;
	font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

/* Title */
.cha-release-title {
	font-size: 14px;
	font-weight: 500;
	color: var(--cha-text-primary);
}

/* Type Badges */
.cha-type-badge {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: capitalize;
}

.cha-type-badge.major {
	background: #dbeafe;
	color: #1d4ed8;
}

.cha-type-badge.minor {
	background: #d1fae5;
	color: #059669;
}

.cha-type-badge.beta {
	background: #fef3c7;
	color: #d97706;
}

.cha-type-badge.patch {
	background: #fed7aa;
	color: #c2410c;
}

/* Status Badges */
/* Status badges styles removed (use admin-global.css) */

/* Release Date */
.cha-release-date {
	font-size: 14px;
	color: var(--cha-text-secondary);
}

/* Actions */
.cha-actions {
	display: flex;
	align-items: center;
	gap: 3px;
	margin-top: 7px;
	margin-bottom: -4px;
	opacity: 0;
	visibility: hidden;
}
.cha-releases-table tbody tr:hover .cha-actions {
	opacity: 1;
	visibility: visible;
}

/* Actions styles removed (use admin-global.css) */

/* Pagination styles removed (use admin-global.css) */

/* Empty state styles removed (use admin-global.css) */

.cha-modal-header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.cha-modal-edit-btn {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: var(--cha-secondary);
	border-radius: var(--cha-radius-xs);
	cursor: pointer;
	color: var(--cha-primary);
	transition: all 0.15s ease;
	text-decoration: none;
}

.cha-modal-edit-btn:hover {
	background: var(--cha-primary);
	color: var(--cha-white);
}

.cha-modal-edit-btn svg {
	width: 16px;
	height: 16px;
}

/* Note: Modal styles (.cha-modal-close, .cha-modal-body, .cha-modal-footer) are in admin-global.css */

/* Note: Form styles (.cha-form-row, .cha-form-group) are in admin-global.css */

/* Note: Button styles (.cha-btn, .cha-btn-primary, .cha-btn-secondary) are in admin-global.css */

/* Change Items - Releases Specific */
.cha-change-items-section {
	margin-bottom: 20px;
}

.cha-change-items-section > label {
	font-size: 13px;
	font-weight: 600;
	color: var(--cha-text-primary);
	margin-bottom: 12px;
	display: block;
}

.cha-change-group {
	background: var(--cha-bg-light);
	border: 1px solid var(--cha-border);
	border-radius: var(--cha-radius-sm);
	padding: 16px;
	margin-bottom: 12px;
}

.cha-change-group-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.cha-change-group-header h4 {
	font-size: 13px;
	font-weight: 600;
	color: var(--cha-text-primary);
	margin: 0;
	text-transform: capitalize;
}

.cha-add-item-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 12px;
	background: var(--cha-white);
	border: 1px solid var(--cha-border);
	border-radius: var(--cha-radius-xs);
	font-size: 12px;
	color: var(--cha-text-secondary);
	cursor: pointer;
	transition: all 0.15s ease;
}

.cha-add-item-btn:hover {
	border-color: var(--cha-primary);
	color: var(--cha-primary);
}

.cha-change-item {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}
.cha-change-item:first-child {
	margin-top: 12px;
}
.cha-change-item:last-child {
	margin-bottom: 0;
}

.cha-change-item input {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid var(--cha-border);
	border-radius: var(--cha-radius-xs);
	font-size: 13px;
}

.cha-remove-item-btn {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: transparent;
	border-radius: var(--cha-radius-xs);
	cursor: pointer;
	color: var(--cha-text-muted);
	transition: all 0.15s ease;
}

.cha-remove-item-btn:hover {
	background: var(--cha-error-light);
	color: var(--cha-error);
}

/* Featured Image Upload */
.cha-featured-image-upload {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 24px 16px;
	border: 2px dashed var(--cha-border);
	border-radius: var(--cha-radius-sm);
	background: var(--cha-bg-light);
	cursor: pointer;
	transition: all 0.2s ease;
	color: var(--cha-text-muted);
	font-size: 13px;
}

.cha-featured-image-upload:hover {
	border-color: var(--cha-primary);
	background: var(--cha-secondary);
	color: var(--cha-primary);
}

.cha-featured-image-upload svg {
	opacity: 0.6;
}

.cha-featured-image-upload:hover svg {
	opacity: 1;
}

.cha-featured-image-preview {
	position: relative;
	display: inline-block;
	max-width: 100%;
	border-radius: var(--cha-radius-sm);
	overflow: hidden;
	border: 1px solid var(--cha-border);
}

.cha-featured-image-preview img {
	display: block;
	max-width: 100%;
	max-height: 200px;
	object-fit: cover;
	border-radius: var(--cha-radius-sm);
}

.cha-featured-image-remove {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: rgba(239, 68, 68, 0.9);
	color: #fff;
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.15s ease;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.cha-featured-image-remove:hover {
	background: #dc2626;
	transform: scale(1.1);
}

/* Loading Spinner */
.cha-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid transparent;
	border-top-color: currentColor;
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
}

/* Confirm Dialog */
.cha-confirm-dialog {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
	z-index: 100002;
	display: none;
	align-items: center;
	justify-content: center;
}

.cha-confirm-dialog.active {
	display: flex;
}

.cha-confirm-content {
	background: var(--cha-white);
	border-radius: var(--cha-radius);
	padding: 24px;
	max-width: 400px;
	text-align: center;
}

.cha-confirm-content h3 {
	font-size: 18px;
	font-weight: 600;
	color: var(--cha-text-primary);
	margin: 0 0 12px 0;
}

.cha-confirm-content p {
	font-size: 14px;
	color: var(--cha-text-secondary);
	margin: 0 0 24px 0;
}

.cha-confirm-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
}

/* Animations */
@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Loading State */
.cha-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
}

.cha-loading-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid var(--cha-border);
	border-top-color: var(--cha-primary);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

/* ========== Product Sidebar Layout ========== */
.cha-releases-layout {
	display: flex;
	gap: 24px;
}

.cha-releases-main {
	flex: 1;
	min-width: 0;
}

/* Note: .cha-form-row.three-col is defined in admin-global.css */

/* Responsive Sidebar */
@media (max-width: 1000px) {
	.cha-releases-layout {
		flex-direction: column;
	}

	.cha-products-sidebar {
		width: 100%;
		position: static;
	}

	.cha-product-tabs {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 4px;
	}

	.cha-product-tab {
		width: auto;
		flex: 0 0 auto;
	}
}

/* Import Button */
.cha-btn-import {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 11px 16px;
	background: var(--cha-bg-light);
	color: var(--cha-text-primary);
	border: 1px solid var(--cha-border);
	border-radius: var(--cha-radius-sm);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
}

.cha-btn-import:hover {
	background: var(--cha-white);
	border-color: var(--cha-primary);
	color: var(--cha-primary);
}

.cha-btn-import svg {
	width: 16px;
	height: 16px;
}

/* File Upload */
.cha-file-upload {
	position: relative;
}

.cha-file-upload input[type='file'] {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
	z-index: 2;
}

.cha-file-upload-label {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 32px 24px;
	border: 2px dashed var(--cha-border);
	border-radius: var(--cha-radius);
	background: var(--cha-bg-light);
	color: var(--cha-text-secondary);
	text-align: center;
	transition: all 0.2s;
}

.cha-file-upload:hover .cha-file-upload-label,
.cha-file-upload.dragover .cha-file-upload-label {
	border-color: var(--cha-primary);
	background: var(--cha-secondary);
	color: var(--cha-primary);
}

.cha-file-upload-label svg {
	width: 40px;
	height: 40px;
	opacity: 0.5;
}

.cha-file-upload-label .cha-file-name {
	font-size: 14px;
}

.cha-file-upload.has-file .cha-file-upload-label {
	border-style: solid;
	border-color: var(--cha-success);
	background: var(--cha-success-light);
}

.cha-file-upload.has-file .cha-file-name {
	color: var(--cha-success);
	font-weight: 500;
}

/* Import Description */
.cha-import-desc {
	margin: 0 0 16px 0;
	color: var(--cha-text-secondary);
	font-size: 14px;
	line-height: 1.5;
}

/* Progress Bar */
.cha-import-progress {
	margin-top: 20px;
}

.cha-progress-bar {
	height: 8px;
	background: var(--cha-border-light);
	border-radius: 4px;
	overflow: hidden;
}

.cha-progress-fill {
	height: 100%;
	width: 0%;
	background: linear-gradient(
		90deg,
		var(--cha-primary) 0%,
		var(--cha-primary-light) 100%
	);
	border-radius: 4px;
	transition: width 0.3s ease;
	animation: progress-pulse 1.5s ease-in-out infinite;
}

@keyframes progress-pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
}

.cha-progress-text {
	margin: 8px 0 0 0;
	font-size: 13px;
	color: var(--cha-text-secondary);
	text-align: center;
}

/* Import Result */
.cha-import-result {
	margin-top: 16px;
	padding: 16px;
	border-radius: var(--cha-radius-sm);
}

.cha-import-result.success {
	background: var(--cha-success-light);
	color: var(--cha-success);
}

.cha-import-result.error {
	background: var(--cha-error-light);
	color: var(--cha-error);
}

.cha-import-result h4 {
	margin: 0 0 8px 0;
	font-size: 14px;
	font-weight: 600;
}

.cha-import-result p {
	margin: 0;
	font-size: 13px;
}

/* AI Generate Button */
.cha-btn-ai {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 11px 16px;
	background: var(--cha-primary);
	color: #fff;
	border: none;
	border-radius: var(--cha-radius-sm);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
	box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.cha-btn-ai:hover {
	background: var(--cha-primary-dark);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.cha-btn-ai:active {
	transform: translateY(0);
}

.cha-btn-ai svg {
	width: 16px;
	height: 16px;
}

/* Antimanual Modal Styles */
.cha-antimanual-modal-content {
	overflow: hidden;
	border-radius: var(--cha-radius);
}

.cha-antimanual-header {
	position: relative;
	background: var(--cha-primary);
	padding: 32px 24px;
	text-align: center;
	color: #fff;
}

.cha-antimanual-icon {
	width: 64px;
	height: 64px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
}

.cha-antimanual-header h2 {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 8px;
	color: #fff;
}

.cha-antimanual-header p {
	font-size: 14px;
	margin: 0;
	opacity: 0.9;
}

.cha-antimanual-body {
	padding: 24px;
}

.cha-antimanual-features {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-bottom: 24px;
}

@media (max-width: 600px) {
	.cha-antimanual-features {
		grid-template-columns: 1fr;
	}
}

.cha-antimanual-feature {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 8px;
}

.cha-feature-icon {
	width: 44px;
	height: 44px;
	background: #e0e7ff;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6366f1;
}

.cha-antimanual-feature h4 {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--cha-text-primary);
}

.cha-antimanual-feature p {
	margin: 0;
	font-size: 12px;
	color: var(--cha-text-secondary);
}

.cha-antimanual-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
}

.cha-antimanual-install-btn {
	font-size: 15px !important;
}

.cha-antimanual-install-btn:hover {
	transform: translateY(-1px);
}

/* AI Loading Overlay for form groups */
.cha-form-group.cha-ai-loading {
	position: relative;
	pointer-events: none;
}

.cha-form-group.cha-ai-loading::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.85);
	border-radius: var(--cha-radius-sm);
	z-index: 10;
}

.cha-form-group.cha-ai-loading::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 24px;
	height: 24px;
	margin: -12px 0 0 -12px;
	border: 3px solid #e0e7ff;
	border-top-color: #6366f1;
	border-radius: 50%;
	z-index: 11;
	animation: cha-ai-spin 0.8s linear infinite;
}

@keyframes cha-ai-spin {
	to {
		transform: rotate(360deg);
	}
}

.cha-form-group.cha-ai-loading .cha-input,
.cha-form-group.cha-ai-loading .cha-textarea {
	opacity: 0.5;
}

/* Help Icon Tooltip (supports HTML content with links) */
.cha-help-trigger {
	position: relative;
	display: inline-flex;
	align-items: center;
	margin-left: 4px;
	cursor: help;
	color: #9ca3af;
	vertical-align: middle;
	transition: color 0.2s ease;
}

.cha-help-trigger:hover {
	color: #6366f1;
}

.cha-help-trigger svg {
	display: block;
}

.cha-help-tooltip {
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
	color: #fff;
	padding: 8px;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.5;
	max-width: 180px;
	width: max-content;
	text-align: center;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: all 0.2s ease;
	z-index: 1001;
}

/* Invisible hover bridge: fills the gap between icon and tooltip */
.cha-help-tooltip::after {
	content: '';
	position: absolute;
	bottom: -12px;
	left: 0;
	width: 100%;
	height: 14px;
}

/* Tooltip arrow */
.cha-help-tooltip::before {
	content: '';
	position: absolute;
	bottom: -6px;
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #1a1a2e;
}

/* Show on hover */
.cha-help-trigger:hover .cha-help-tooltip {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}

/* Link inside tooltip */
.cha-help-tooltip a {
	color: #818cf8;
	text-decoration: underline;
	font-weight: 600;
	transition: color 0.15s ease;
}

.cha-help-tooltip a:hover {
	color: #a5b4fc;
}

/* Left-aligned help tooltip */
.cha-help-trigger.cha-help-left .cha-help-tooltip {
	left: auto;
	right: 0;
	transform: translateX(0) translateY(4px);
}

.cha-help-trigger.cha-help-left:hover .cha-help-tooltip {
	transform: translateX(0) translateY(0);
}

.cha-help-trigger.cha-help-left .cha-help-tooltip::before {
	left: auto;
	right: 12px;
	transform: translateX(0);
}

/* Right-aligned help tooltip */
.cha-help-trigger.cha-help-right .cha-help-tooltip {
	left: 0;
	right: auto;
	transform: translateX(0) translateY(4px);
}

.cha-help-trigger.cha-help-right .cha-help-tooltip {
	transform: translateX(20px) translateY(50%);
	bottom: 50%;
}

.cha-help-trigger.cha-help-right .cha-help-tooltip::before {
	left: -12px;
	right: auto;
	transform: translateY(50%) rotate(90deg);
	bottom: 50%;
}

/* Bottom-positioned help tooltip */
.cha-help-trigger.cha-help-bottom .cha-help-tooltip {
	bottom: auto;
	top: calc(100% + 6px);
	transform: translateX(-50%) translateY(-4px);
}

.cha-help-trigger.cha-help-bottom:hover .cha-help-tooltip {
	transform: translateX(-50%) translateY(0);
}

.cha-help-trigger.cha-help-bottom .cha-help-tooltip::before {
	bottom: auto;
	top: -11px;
	border-top-color: transparent;
	border-bottom-color: #1a1a2e;
}

.cha-help-trigger.cha-help-bottom .cha-help-tooltip::after {
	bottom: auto;
	top: -12px;
}

/* Bottom + Left */
.cha-help-trigger.cha-help-bottom.cha-help-left .cha-help-tooltip {
	transform: translateX(0) translateY(-4px);
}

.cha-help-trigger.cha-help-bottom.cha-help-left:hover .cha-help-tooltip {
	transform: translateX(0) translateY(0);
}

/* Bottom + Right */
.cha-help-trigger.cha-help-bottom.cha-help-right .cha-help-tooltip {
	transform: translateX(0) translateY(-4px);
}

.cha-help-trigger.cha-help-bottom.cha-help-right:hover .cha-help-tooltip {
	transform: translateX(0) translateY(0);
}

/* Custom Tooltip Component */
.cha-tooltip {
	position: relative;
}

.cha-tooltip::before,
.cha-tooltip::after {
	position: absolute;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: all 0.2s ease;
	z-index: 1000;
}

/* Tooltip arrow */
.cha-tooltip::before {
	content: '';
	top: -6px;
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #1a1a2e;
	margin-bottom: -12px;
	z-index: 1001;
}

/* Tooltip content */
.cha-tooltip::after {
	content: attr(data-tooltip);
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
	color: #fff;
	padding: 8px;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.5;
	max-width: 180px;
	width: max-content;
	text-align: center;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Show on hover */
.cha-tooltip:hover::before,
.cha-tooltip:hover::after {
	visibility: visible;
	opacity: 1;
}

.cha-tooltip:hover::after {
	transform: translateX(-50%) translateY(0);
}

/* Right-aligned tooltip for elements near the edge */
.cha-tooltip.cha-tooltip-left::after {
	left: auto;
	right: 0;
	transform: translateX(0) translateY(4px);
}

.cha-tooltip.cha-tooltip-left:hover::after {
	transform: translateX(0) translateY(0);
}

.cha-tooltip.cha-tooltip-left::before {
	left: auto;
	right: 12px;
	transform: translateX(0);
}

/* Bottom-aligned tooltip */
.cha-tooltip.cha-tooltip-bottom::after {
	bottom: auto;
	top: calc(100% + 6px);
	transform: translateX(-50%) translateY(-4px);
}

.cha-tooltip.cha-tooltip-bottom:hover::after {
	transform: translateX(-50%) translateY(0);
}

.cha-tooltip.cha-tooltip-bottom::before {
	top: auto;
	bottom: -6px;
	border-top-color: transparent;
	border-bottom-color: #1a1a2e;
	margin-bottom: 0;
}
