:root {
	--ckh-primary: #3b82f6;
	--ckh-primary-hover: #2563eb;
	--ckh-bg: #ffffff;
	--ckh-text: #1f2937;
	--ckh-border: #e5e7eb;
	--ckh-backdrop: rgba(0, 0, 0, 0.5);
	--ckh-term-bg: rgba(59, 130, 246, 0.1);
}

@media (prefers-color-scheme: dark) {
	:root {
		--ckh-bg: #1f2937;
		--ckh-text: #f9fafb;
		--ckh-border: #374151;
		--ckh-backdrop: rgba(0, 0, 0, 0.7);
		--ckh-term-bg: rgba(59, 130, 246, 0.2);
	}
}

.ckh-term {
	background-color: var(--ckh-term-bg);
	color: var(--ckh-primary);
	border-bottom: 1px dashed var(--ckh-primary);
	cursor: pointer;
	padding: 0 4px;
	border-radius: 4px;
	transition: background-color 0.2s ease;
}

.ckh-term:hover {
	background-color: var(--ckh-primary);
	color: #fff;
}

/* Modal Backdrop */
.ckh-modal-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: var(--ckh-backdrop);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	backdrop-filter: blur(4px);
}

.ckh-modal-backdrop.is-open {
	opacity: 1;
	visibility: visible;
}

/* Modal Content */
.ckh-modal {
	background-color: var(--ckh-bg);
	color: var(--ckh-text);
	width: 90%;
	max-width: 800px;
	max-height: 90vh;
	border-radius: 12px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	position: relative;
	transform: scale(0.95) translateY(20px);
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.ckh-modal-backdrop.is-open .ckh-modal {
	transform: scale(1) translateY(0);
}

.ckh-modal-close {
	position: absolute;
	top: 15px;
	right: 15px;
	background: transparent;
	border: none;
	font-size: 24px;
	color: var(--ckh-text);
	cursor: pointer;
	line-height: 1;
	padding: 5px;
	opacity: 0.7;
	transition: opacity 0.2s;
}

.ckh-modal-close:hover {
	opacity: 1;
}

.ckh-modal-header {
	padding: 20px 30px;
	border-bottom: 1px solid var(--ckh-border);
}

.ckh-modal-title {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 600;
}

.ckh-modal-body {
	padding: 20px 30px;
	overflow-y: auto;
	flex: 1;
}

.ckh-section {
	margin-bottom: 25px;
}

.ckh-section h3 {
	font-size: 1.2rem;
	margin-top: 0;
	margin-bottom: 10px;
	color: var(--ckh-primary);
}

.ckh-modal-footer {
	padding: 20px 30px;
	border-top: 1px solid var(--ckh-border);
	display: flex;
	justify-content: flex-end;
}

.ckh-btn {
	padding: 8px 16px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 500;
	transition: background-color 0.2s;
}

.ckh-btn-primary {
	background-color: var(--ckh-primary);
	color: white;
	border: none;
}

.ckh-btn-primary:hover {
	background-color: var(--ckh-primary-hover);
	color: white;
}

/* Loader */
.ckh-loader {
	border: 4px solid var(--ckh-border);
	border-top: 4px solid var(--ckh-primary);
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: ckh-spin 1s linear infinite;
	margin: 40px auto;
}

@keyframes ckh-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}
