/* Dedicated Keyboard Toggle Button in Footer */
.keyboard-trigger-container {
	margin: 0 auto 20px auto;
	display: flex;
	justify-content: center;
	align-items: center;
}

.footer-keyboard-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background-color: var(--card-bg, #1a120b);
	color: var(--accent-primary, #B5835A);
	border: 1px solid var(--border-color, #B5835A);
	border-radius: 50%;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.footer-keyboard-icon {
	width: 22px;
	height: auto;
	object-fit: contain;
	transition: all 0.3s ease;
	border-radius: 2px;
}

.footer-keyboard-btn:hover {
	background-color: var(--accent-primary, #B5835A);
	color: var(--bg-color, #0f0a07) !important;
	border-color: var(--accent-primary, #B5835A);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	transform: translateY(-2px);
}

.footer-keyboard-btn:hover .footer-keyboard-icon {
	transform: scale(1.18) rotate(-4deg);
	filter: drop-shadow(0 0 4px var(--accent-primary, #B5835A)) brightness(1.2);
}

.footer-keyboard-btn:focus {
	outline: none;
}

/* Parent container of keyboard is hidden by default */
.keyboard-parent-container {
	display: none !important;
}
.keyboard-parent-container.active {
	display: block !important;
}

#keyboard {
	display: none !important;
	font-family: 'Source Sans Pro', sans-serif;
	font-size: 16px;
	font-weight: normal;
	color: var(--text-main, #e8d5b5);
	background: var(--card-bg, #1a120b);
	border: 1px solid var(--border-color, #B5835A);
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
	margin: 25px auto;
	text-align: center;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE and Edge */
	position: relative;
	max-width: 950px;
	transition: all 0.3s ease;
}

#keyboard.active {
	display: block !important;
}

#keyboard::-webkit-scrollbar {
	display: none; /* Chrome, Safari, Opera */
}

#keyboard:empty {
	display: none !important;
}

#alphKeysContainer {
	margin: 0px auto;
	text-align: center;
	display: grid;
	width: 100%;
	max-width: 100%;
	height: auto;
	grid-template-columns: repeat(16, minmax(0, 1fr));
	column-gap: 8px;
	row-gap: 8px;
	box-sizing: border-box;
}

@media screen and (max-width: 768px) {
	#alphKeysContainer {
		column-gap: 4px;
		row-gap: 4px;
	}
}
	
.alphKey {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #444444;
	text-decoration: none;
	text-align: center;
	aspect-ratio: 1 / 1;
	margin: 0px;
	padding: 0px;
	background: rgba(239,240,242,0.8);
	-moz-border-radius: 4px;
	border-radius: 4px;
	border-top: 1px solid #f5f5f5;
	box-sizing: border-box;
	-webkit-box-shadow: 
		inset 0 0 25px #e8e8e8,
		0 1px 0 #c3c3c3,
		0 2px 0 #c9c9c9,
		0 2px 3px #333;
	box-shadow: 
		inset 0 0 25px #e8e8e8,
		0 1px 0 #c3c3c3,
		0 2px 0 #c9c9c9,
		0 2px 3px #333;
	text-shadow: 0px 1px 0px #f5f5f5;
	-webkit-filter: opacity(.95);
	opacity: 0.95;
	-webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: -moz-none;
    -o-user-select: none;
    user-select: none;
}

/* Override aspect-ratio for multi-column spanning keys */
#alphKey70, #alphKey71 {
	aspect-ratio: auto;
	height: 100%;
}

.alphKey:active, .keydown {
	color: #888;
	background: #ebeced;
	-webkit-box-shadow:
		inset 0 0 25px #ddd,
		0 0 3px #333;
	-moz-box-shadow: 
		inset 0 0 25px #ddd,
		0 0 3px #333;
	box-shadow: 
		inset 0 0 25px #ddd,
		0 0 3px #333;
	border-top: 1px solid #eee;
}
	
.alphKey:hover {
	cursor: pointer;
	-webkit-filter: opacity(1);
	opacity: 1;	
}

@media screen and (max-width: 949px) and (min-width: 768px) {
	.alphKey {
		-moz-border-radius: 3px;
		border-radius: 3px;
	}
}

@media screen and (max-width: 767px) {
	.alphKey {	
		-moz-border-radius: 2px;
		border-radius: 2px;
	}
}

.alphCharSource {
	font-family: 'Siddhanta', 'Source Sans Pro', sans-serif; 
	font-size: clamp(9px, 2.8vw, 24px); 
	font-weight: normal; 
	font-style: normal;
}

.alphCharTarget {
	font-family: 'Siddhanta', 'Source Sans Pro', sans-serif; 
	font-size: clamp(9px, 2.8vw, 24px); 
	font-weight: normal; 
	font-style: normal;
}

#alphTextareaContainer {
	margin: 0px auto;
	text-align: center;
	padding: 0px;
	width: 100%; 
	max-width: 100%;
	border: none; 
	box-sizing: border-box;
}

#alphTextareaSourceContainer {
	margin-bottom: 10px;
	position: relative;
}

#alphTextareaTargetContainer {
	margin-bottom: 10px;
	position: relative;
}

@media screen and (max-width: 949px) and (min-width: 768px) {
	
	#alphTextareaSourceContainer {
		margin-bottom: 5px;
	}

	#alphTextareaTargetContainer {
		margin-bottom: 5px;
	}
	
}

@media screen and (max-width: 767px) {
	
	#alphTextareaSourceContainer {
		margin-bottom: 3px;
	}

	#alphTextareaTargetContainer {
		margin-bottom: 3px;
	}
	
}

#alphTextareaSource {
	text-align: center;
	width: 100%;
	min-height: 80px;
	margin: 0px;
	padding: 26px 16px;
	font-size: 24px; 
	font-weight: normal; 
	font-style: normal;
	line-height: 28px;
	overflow-y: auto;
	resize: none;
	box-sizing: border-box;
	background: rgba(255,255,255,0.5);
	border: 1px solid var(--border-color, var(--accent-primary, #B5835A));
	border-radius: 6px;
	transition: border 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

#alphTextareaSource:focus {
   outline: none !important;
   border: 1px solid var(--border-color, var(--accent-primary, #B5835A));
}

@media screen and (max-width: 949px) and (min-width: 768px) {
	
	#alphTextareaSource {
		font-size: 18px;
		min-height: 60px;
		padding: 20px 12px;
		line-height: 20px;
	}
	
}

@media screen and (max-width: 767px) {
	
	#alphTextareaSource {
		font-size: 14px;
		min-height: 44px;
		padding: 14px 8px;
		line-height: 16px;
	}
	
}

#alphTextareaTarget {
	text-align: center;
	width: 100%;
	min-height: 80px;
	margin: 0px;
	padding: 26px 16px;
	font-size: 24px; 
	font-weight: normal; 
	font-style: normal;
	line-height: 28px;
	overflow-y: auto;
	resize: none;
	box-sizing: border-box;
	background: rgba(255,255,255,0.5);
	border: 1px solid var(--border-color, var(--accent-primary, #B5835A));
	border-radius: 6px;
	transition: border 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

#alphTextareaTarget:focus {
   outline: none !important;
   border: 1px solid var(--border-color, var(--accent-primary, #B5835A));
}

@media screen and (max-width: 949px) and (min-width: 768px) {
	
	#alphTextareaTarget {
		font-size: 18px;
		min-height: 60px;
		padding: 20px 12px;
		line-height: 20px;
	}
	
}

@media screen and (max-width: 767px) {
	
	#alphTextareaTarget {
		font-size: 14px; 
		min-height: 44px;
		padding: 14px 8px;
		line-height: 16px;
	}
	
}

#alphTextareaSourceIndicator {
	font-family: 'Source Sans Pro', sans-serif;
	font-size: 11px;
	color: rgba(0, 0, 0, 0.5);
	vertical-align: left;	
	top : 8px;
	left : 10px;
	position : absolute;
}
#alphTextareaSourceIndicator:hover { color: rgba(0, 0, 0, 0.7); cursor: pointer; }

@media screen and (max-width: 949px) and (min-width: 768px) {
		
	#alphTextareaSourceIndicator {
		top : 6px;
		font-size: 8px;
		left : 5px;
	}
	
}

@media screen and (max-width: 767px) {
	
	#alphTextareaSourceIndicator {
		top : 5px;
		font-size: 6px;
		left : 5px;
	}
	
}

#alphTextareaTargetIndicator {
	font-family: 'Source Sans Pro', sans-serif;
	font-size: 11px;
	color: rgba(0, 0, 0, 0.5);
	vertical-align: left;	
	top : 8px;
	left : 10px;
	position : absolute;
}
#alphTextareaTargetIndicator:hover { color: rgba(0, 0, 0, 0.7); cursor: pointer; }

@media screen and (max-width: 949px) and (min-width: 768px) {
	
	#alphTextareaTargetIndicator {
		top : 6px;
		font-size: 8px;
		left : 5px;
	}
}

@media screen and (max-width: 767px) {
	
	#alphTextareaTargetIndicator {
		top : 5px;
		font-size: 6px;
		left : 5px;
	}
	
	#keyboard {
		padding: 10px;
		margin: 15px auto;
		border-radius: 6px;
	}
	
	.keyboard-parent-container {
		padding: 0 8px !important;
	}
	
}

@media screen and (max-width: 480px) {
	#keyboard {
		padding: 6px;
		margin: 10px auto;
	}
	#alphKeysContainer {
		column-gap: 2px;
		row-gap: 2px;
	}
	.keyboard-parent-container {
		padding: 0 4px !important;
	}
}

/* Premium Custom Scrollbars for Translation Textareas */
#alphTextareaSource::-webkit-scrollbar,
#alphTextareaTarget::-webkit-scrollbar {
	width: 6px;
}
#alphTextareaSource::-webkit-scrollbar-track,
#alphTextareaTarget::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.05);
	border-radius: 3px;
}
#alphTextareaSource::-webkit-scrollbar-thumb,
#alphTextareaTarget::-webkit-scrollbar-thumb {
	background: var(--accent-primary, #B5835A);
	border-radius: 3px;
}
#alphTextareaSource::-webkit-scrollbar-thumb:hover,
#alphTextareaTarget::-webkit-scrollbar-thumb:hover {
	background: var(--text-main, #e8d5b5);
}
