/* AN Bhasha — floating translation button, middle-right placement.
   Positioned mid-viewport-right (not bottom-right) to avoid colliding
   with the Phro concierge bubble and Field Frequencies player, which
   both live at the bottom of the screen. */

.abs-bhasha-btn {
	position: fixed;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
	z-index: 99998;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 14px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-right: none;
	border-radius: 14px 0 0 14px;
	background: rgba(20, 30, 24, 0.55);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	backdrop-filter: blur(14px) saturate(140%);
	color: #f4f7f2;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
	max-width: 44px;
	overflow: hidden;
	white-space: nowrap;
	transition: max-width 0.28s ease, padding 0.28s ease, background 0.2s ease;
}

.abs-bhasha-btn .abs-bhasha-icon {
	font-size: 18px;
	flex: 0 0 auto;
}

.abs-bhasha-btn .abs-bhasha-text {
	opacity: 0;
	transition: opacity 0.2s ease;
}

/* Desktop: expand into a labelled pill on hover/focus. */
@media (hover: hover) and (pointer: fine) {
	.abs-bhasha-btn:hover,
	.abs-bhasha-btn:focus-visible {
		max-width: 260px;
		padding: 12px 18px 12px 14px;
		background: rgba(20, 30, 24, 0.8);
	}
	.abs-bhasha-btn:hover .abs-bhasha-text,
	.abs-bhasha-btn:focus-visible .abs-bhasha-text {
		opacity: 1;
	}
}

/* Touch devices: stay compact, tap opens the panel directly. */
@media (hover: none), (pointer: coarse) {
	.abs-bhasha-btn {
		padding: 12px;
		top: auto;
		bottom: 45%;
		transform: none;
	}
}

@media (max-width: 480px) {
	.abs-bhasha-btn {
		bottom: 40%;
		border-radius: 12px 0 0 12px;
	}
}

.abs-bhasha-btn:active {
	transform: translateY(-50%) scale(0.96);
}

/* Panel / modal */
.abs-bhasha-panel {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 15, 12, 0.55);
	padding: 20px;
}

.abs-bhasha-panel[hidden] {
	display: none;
}

.abs-bhasha-panel-inner {
	position: relative;
	width: 100%;
	max-width: 420px;
	background: #16201a;
	color: #f4f7f2;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 18px;
	padding: 28px 24px 22px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.abs-bhasha-panel-inner h3 {
	margin: 0 0 10px;
	font-size: 18px;
}

.abs-bhasha-panel-inner p {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.5;
	opacity: 0.85;
}

.abs-bhasha-close {
	position: absolute;
	top: 14px;
	right: 14px;
	background: transparent;
	border: none;
	color: inherit;
	font-size: 16px;
	cursor: pointer;
	opacity: 0.7;
}
.abs-bhasha-close:hover { opacity: 1; }

.abs-bhasha-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.abs-btn {
	padding: 11px 16px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.06);
	color: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
}
.abs-btn:hover { background: rgba(255, 255, 255, 0.14); }

.abs-btn-primary {
	background: #4c8c5b;
	border-color: #4c8c5b;
}
.abs-btn-primary:hover { background: #57a267; }

.abs-manual-list {
	margin-top: 14px;
	max-height: 240px;
	overflow-y: auto;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}
.abs-manual-list[hidden] { display: none; }

.abs-manual-list button {
	padding: 9px 10px;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: rgba(255, 255, 255, 0.04);
	color: inherit;
	font-size: 13px;
	cursor: pointer;
	text-align: left;
}
.abs-manual-list button:hover { background: rgba(255, 255, 255, 0.12); }

.abs-bhasha-status {
	margin: 14px 0 0;
	font-size: 13px;
	min-height: 16px;
	opacity: 0.8;
}

.abs-bhasha-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 100000;
	background: #16201a;
	color: #f4f7f2;
	border: 1px solid rgba(255, 255, 255, 0.15);
	padding: 10px 18px;
	border-radius: 10px;
	font-size: 13px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.abs-bhasha-toast[hidden] { display: none; }

/* RTL languages (Arabic, Urdu, Persian) */
[dir="rtl"] .entry-content,
[dir="rtl"] .post-content {
	direction: rtl;
	text-align: right;
}

.abs-translation-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin: 0 0 20px;
	padding: 10px 14px;
	border-radius: 10px;
	background: rgba(76, 140, 91, 0.12);
	border: 1px solid rgba(76, 140, 91, 0.35);
	font-size: 13px;
}

.abs-translation-banner button {
	background: none;
	border: none;
	text-decoration: underline;
	color: inherit;
	cursor: pointer;
	font-size: 13px;
	padding: 0;
}
