/* Corporate Firm Translate — 前台样式 */

/* 语言切换器（悬浮） */
.cft-switcher {
	position: fixed;
	top: 18px;
	right: 18px;
	z-index: 99999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.cft-switcher-select {
	appearance: none;
	-webkit-appearance: none;
	background: #ffffff;
	color: #1f2937;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	padding: 8px 30px 8px 12px;
	font-size: 14px;
	line-height: 1.4;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='3'><path d='M6 9l6 6 6-6'/></svg>");
	background-repeat: no-repeat;
	background-position: right 10px center;
	transition: box-shadow .2s ease, border-color .2s ease;
}

.cft-switcher-select:hover {
	border-color: #2563eb;
	box-shadow: 0 6px 18px rgba(37, 99, 235, 0.18);
}

.cft-switcher-select:focus {
	outline: none;
	border-color: #2563eb;
}

/* 手动放置的切换器（短代码）不需要悬浮定位 */
.cft-switcher-placeholder .cft-switcher {
	position: static;
	box-shadow: none;
}

/* 加载动画遮罩 */
.cft-loading {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.55);
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
	pointer-events: none;
}

.cft-loading.show {
	opacity: 1;
	visibility: visible;
}

.cft-spinner {
	width: 38px;
	height: 38px;
	border: 4px solid rgba(37, 99, 235, 0.2);
	border-top-color: #2563eb;
	border-radius: 50%;
	animation: cft-spin .8s linear infinite;
}

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

/* 尊重用户的减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
	.cft-spinner { animation-duration: 1.6s; }
	.cft-loading { transition: none; }
}

/* 加载失败提示横幅 */
.cft-error {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 100001;
	max-width: 720px;
	margin: 0 auto;
	padding: 12px 36px 12px 16px;
	background: #fff7ed;
	color: #7c2d12;
	border: 1px solid #fdba74;
	border-radius: 8px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
	font-size: 14px;
	line-height: 1.5;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.cft-error strong {
	color: #c2410c;
	margin-right: 4px;
}

.cft-error-close {
	position: absolute;
	top: 6px;
	right: 8px;
	background: transparent;
	border: 0;
	color: #7c2d12;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
}

.cft-error-close:hover {
	color: #c2410c;
}
