/* DigiCode Translator — front-end switcher styles */

.dct-switcher {
	display: inline-flex;
	align-items: stretch;
	gap: 0;
	border-radius: 999px;
	overflow: hidden;
	background: #1f2937;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
	border: 1px solid rgba(255, 255, 255, .08);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1;
	position: relative;
	user-select: none;
}

.dct-switcher .dct-btn {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	margin: 0;
	background: transparent;
	color: #cbd5e1;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .3px;
	padding: 8px 14px;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
	min-width: 42px;
	text-align: center;
}

.dct-switcher .dct-btn + .dct-btn {
	border-left: 1px solid rgba(255, 255, 255, .08);
}

.dct-switcher .dct-btn:hover:not(.dct-active) {
	background: rgba(255, 255, 255, .06);
	color: #fff;
}

.dct-switcher .dct-btn.dct-active {
	background: #2563eb;
	color: #fff;
	cursor: default;
}

/* Loading state */
.dct-switcher.dct-loading .dct-btn {
	opacity: .55;
	pointer-events: none;
}

.dct-switcher.dct-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	right: -22px;
	width: 14px;
	height: 14px;
	margin-top: -7px;
	border: 2px solid rgba(37, 99, 235, .35);
	border-top-color: #2563eb;
	border-radius: 50%;
	animation: dct-spin .7s linear infinite;
}

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

/* Floating positions */
#dct-floating-switcher {
	position: fixed;
	z-index: 99990;
}

#dct-floating-switcher.dct-pos-bottom-right { bottom: 20px; right: 20px; }
#dct-floating-switcher.dct-pos-bottom-left  { bottom: 20px; left: 20px; }
#dct-floating-switcher.dct-pos-top-right    { top: 20px; right: 20px; }
#dct-floating-switcher.dct-pos-top-left     { top: 20px; left: 20px; }

/* Inline (shortcode) variant */
.dct-switcher.dct-inline {
	box-shadow: none;
	vertical-align: middle;
}

.dct-switcher.dct-inline .dct-btn {
	padding: 6px 12px;
	font-size: 12px;
	min-width: 38px;
}

/* Small screens */
@media (max-width: 600px) {
	#dct-floating-switcher.dct-pos-bottom-right,
	#dct-floating-switcher.dct-pos-bottom-left { bottom: 14px; }
	.dct-switcher .dct-btn { padding: 7px 12px; font-size: 12px; }
}

/* Attached into the site header (auto-placed at top of page) */
#dct-floating-switcher.dct-attached {
	position: relative;
	z-index: auto;
	box-shadow: none;
	margin: 0 6px;
	vertical-align: middle;
	border-color: rgba(255, 255, 255, .18);
}

#dct-floating-switcher.dct-attached .dct-btn {
	padding: 6px 12px;
	font-size: 12px;
	min-width: 40px;
}

/* Keep the fixed top switcher clear of the WordPress admin bar */
body.admin-bar #dct-floating-switcher.dct-pos-top-right,
body.admin-bar #dct-floating-switcher.dct-pos-top-left {
	top: 52px;
}

@media screen and (max-width: 782px) {
	body.admin-bar #dct-floating-switcher.dct-pos-top-right,
	body.admin-bar #dct-floating-switcher.dct-pos-top-left {
		top: 66px;
	}
}