/*
Theme Name: Vinasources
Description: Child theme for Mugu (VinaSources customizations).
Author: VinaSources
Template: mugu
Version: 1.0.0
Text Domain: mugu-child
*/

/* Header fixed cần neo top: 0; nếu để auto, header nằm theo vị trí tĩnh và bị margin âm của .top-bar (-15px, trang con) kéo lên. */
.site-header {
	top: 0;
}

.comments-area .comment-form .comment-form-author,
.comments-area .comment-form .comment-form-email,
.comments-area .comment-form .comment-form-url {
	float: none;
	width: calc((100% - 16px) / 3 - 2px);
	display: inline-block;
}

.comments-area .comment-form .comment-form-author,
.comments-area .comment-form .comment-form-email {
	margin-right: 8px;
}


/* Nút WhatsApp nổi, nằm trên bubble chat TalkJS (bottom 24px, cao 52px). */
.vs-whatsapp-btn {
	position: fixed;
	bottom: 88px;
	right: 24px;
	z-index: 9998;
	display: block;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
}

.vs-whatsapp-btn img {
	display: block;
	width: 100%;
	height: 100%;
}

/* Parent theme đặt a:focus { outline: none }, cần trả lại viền focus cho người dùng bàn phím. */
.vs-whatsapp-btn:focus {
	outline: none;
}

.vs-whatsapp-btn:focus-visible {
	outline: 3px solid #25d366;
	outline-offset: 3px;
}

/* Nút chuyển ngôn ngữ dạng toggle (qTranslate-XT, mục menu có class .wpm-languages), theo header vinasources.com. */
.qtranxs-lang-menu > svg {
	display: none;
}

.main-navigation ul li.qtranxs-lang-menu > a.vs-lang-switch-link {
	display: flex;
	align-items: center;
	padding: 8px 0;
}

.vs-lang-switch {
	position: relative;
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	width: 60px;
	height: 32px;
	box-sizing: border-box;
	border: 1px solid #d0d5dd;
	border-radius: 9999px;
	background: #f2f4f7;
	transition: border-color 0.15s ease;
}

.vs-lang-switch-link:hover .vs-lang-switch,
.vs-lang-switch-link:focus-visible .vs-lang-switch {
	border-color: #0051c6;
}

.vs-lang-switch__label {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.025em;
	color: #667085;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.5s ease;
}

.vs-lang-switch__label--en {
	left: 12px;
}

.vs-lang-switch__label--vi {
	right: 12px;
}

/* Hiện nhãn của ngôn ngữ đích, ở phía đối diện núm. */
.vs-lang-switch--vi .vs-lang-switch__label--en,
.vs-lang-switch--en .vs-lang-switch__label--vi {
	opacity: 1;
}

.vs-lang-switch__knob {
	position: absolute;
	top: 50%;
	left: 3px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 9999px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.18);
	transform: translateY(-50%);
	transition: left 0.5s ease-out;
}

.vs-lang-switch--vi .vs-lang-switch__knob {
	left: 29px;
}

.vs-lang-switch__knob img {
	display: block;
	width: 18px;
	height: 18px;
	border-radius: 9999px;
	object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
	.vs-lang-switch__label,
	.vs-lang-switch__knob {
		transition: none;
	}
}
