/**
 * GCN On-Demand Translation - Floating Status Indicator Styles
 */

.gcn-translation-indicator {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	color: #1e293b;
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	pointer-events: auto;
}

.gcn-translation-card {
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(226, 232, 240, 0.9);
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
	border-radius: 16px;
	padding: 16px 20px;
	width: 360px;
	max-width: calc(100vw - 32px);
	box-sizing: border-box;
}

.gcn-translation-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 12px;
}

.gcn-translation-title-group {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	flex: 1;
	min-width: 0;
}

.gcn-translation-pulse-dot {
	width: 10px;
	height: 10px;
	background-color: #0e8b72;
	border-radius: 50%;
	display: inline-block;
	flex-shrink: 0;
	margin-top: 4px;
	position: relative;
	box-shadow: 0 0 0 0 rgba(14, 139, 114, 0.7);
	animation: gcn-pulse 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes gcn-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(14, 139, 114, 0.7);
	}
	70% {
		box-shadow: 0 0 0 8px rgba(14, 139, 114, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(14, 139, 114, 0);
	}
}

.gcn-translation-title-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1;
}

.gcn-translation-title {
	font-weight: 600;
	font-size: 14px;
	color: #0f172a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gcn-translation-subtitle {
	font-size: 11.5px;
	color: #64748b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-top: 1px;
}

.gcn-translation-percent-badge {
	background: #e9f7f4;
	color: #0a715c;
	font-weight: 700;
	font-size: 12px;
	padding: 3px 8px;
	border-radius: 999px;
	letter-spacing: 0.2px;
	flex-shrink: 0;
}

.gcn-translation-close-btn {
	background: transparent;
	border: none;
	cursor: pointer;
	color: #94a3b8;
	font-size: 20px;
	line-height: 1;
	padding: 0 4px;
	border-radius: 4px;
	transition: color 0.2s ease;
}

.gcn-translation-close-btn:hover {
	color: #475569;
}

.gcn-translation-progress-track {
	height: 6px;
	background: #e2e8f0;
	border-radius: 999px;
	overflow: hidden;
	position: relative;
	margin-bottom: 10px;
}

.gcn-translation-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #0e8b72 0%, #34d399 100%);
	border-radius: 999px;
	transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
}

.gcn-translation-progress-bar::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.4) 50%,
		rgba(255, 255, 255, 0) 100%
	);
	animation: gcn-shimmer 2s infinite;
}

@keyframes gcn-shimmer {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(100%);
	}
}

.gcn-translation-footer-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 11px;
	color: #64748b;
	line-height: 1.3;
}

.gcn-translation-stage-text {
	font-weight: 500;
	color: #334155;
	flex: 1;
	padding-right: 8px;
}

.gcn-translation-notice {
	font-style: italic;
	opacity: 0.85;
	white-space: nowrap;
}

.gcn-translation-provider-row {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid rgba(226, 232, 240, 0.9);
	font-size: 10.5px;
	color: #94a3b8;
	letter-spacing: 0.2px;
}

/* Success state */
.gcn-translation-indicator.is-completed .gcn-translation-pulse-dot {
	background-color: #16a34a;
	animation: none;
}

.gcn-translation-indicator.is-completed .gcn-translation-percent-badge {
	background: #dcfce7;
	color: #15803d;
}

.gcn-translation-indicator.is-completed .gcn-translation-progress-bar {
	background: linear-gradient(90deg, #16a34a 0%, #4ade80 100%);
}

/* Corner Placements */
.gcn-pos-bottom-right {
	bottom: 24px;
	right: 24px;
	left: auto;
	top: auto;
}

.gcn-pos-bottom-left {
	bottom: 24px;
	left: 24px;
	right: auto;
	top: auto;
}

.gcn-pos-top-right {
	top: 24px;
	right: 24px;
	left: auto;
	bottom: auto;
}

.gcn-pos-top-left {
	top: 24px;
	left: 24px;
	right: auto;
	bottom: auto;
}

/* Floating Retranslate Widget */
.gcn-retranslate-widget {
	position: fixed;
	z-index: 999998;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	pointer-events: auto;
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gcn-retranslate-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.96) 100%);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.16);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.35), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
	border-radius: 9999px;
	padding: 10px 18px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	outline: none;
	user-select: none;
	-webkit-user-select: none;
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.gcn-retranslate-btn:hover {
	background: linear-gradient(135deg, #0e8b72 0%, #0a715c 100%);
	border-color: rgba(52, 211, 153, 0.5);
	box-shadow: 0 14px 28px -4px rgba(14, 139, 114, 0.45), 0 0 0 1px rgba(52, 211, 153, 0.3);
	transform: translateY(-2px);
	color: #ffffff;
}

.gcn-retranslate-btn:active {
	transform: translateY(0);
	box-shadow: 0 6px 14px -2px rgba(14, 139, 114, 0.3);
}

.gcn-retranslate-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s ease;
}

.gcn-retranslate-btn:hover .gcn-retranslate-icon {
	transform: rotate(45deg);
}

.gcn-retranslate-btn.is-loading .gcn-retranslate-icon {
	animation: gcn-spin 1s linear infinite;
}

.gcn-retranslate-btn.is-loading {
	pointer-events: none;
	opacity: 0.9;
	background: linear-gradient(135deg, #0a715c 0%, #065f46 100%);
}

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

/* Responsive adjustment for mobile */
@media (max-width: 480px) {
	.gcn-translation-indicator {
		bottom: 12px;
		right: 12px;
		left: 12px;
	}
	.gcn-translation-card {
		width: 100%;
	}
	.gcn-retranslate-widget.gcn-pos-bottom-right,
	.gcn-retranslate-widget.gcn-pos-bottom-left {
		bottom: 16px;
	}
	.gcn-retranslate-btn {
		padding: 8px 14px;
		font-size: 12px;
	}
}
