/**
 * Minh Thắng Contact Bar — frontend (cross-browser)
 * Biến CSS gán qua wp_add_inline_style trong class-mtcb-frontend.php
 */

.mt-contact-nav,
.mt-contact-nav * {
	box-sizing: border-box;
}

.mt-contact-nav ul,
.mt-contact-nav li {
	list-style: none !important;
	margin: 0;
	padding: 0;
}

.mt-contact-nav__item--phone-mobile {
	display: none;
}

.mt-contact-nav {
	position: fixed;
	z-index: var(--mtcb-z, 999);
	bottom: var(--mtcb-desk-y, 50px);
	width: auto;
	padding: 10px 0;
	background: var(--mtcb-bg, #fff);
	border: 2px solid var(--mtcb-border, #f2f2f2);
	border-radius: var(--mtcb-radius, 10px);
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	-webkit-transform: translateZ(0);
	transform: translateZ(0);
}

.mt-contact-nav--right {
	right: var(--mtcb-desk-x, 13px);
	left: auto;
	box-shadow: -5px 10px 8px rgba(0, 0, 0, 0.25);
}

.mt-contact-nav--left {
	left: var(--mtcb-desk-x, 13px);
	right: auto;
	box-shadow: 5px 10px 8px rgba(0, 0, 0, 0.25);
}

.mt-contact-nav ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.mt-contact-nav__item {
	list-style: none !important;
	margin: 0;
	padding: 0;
}

.mt-contact-nav__item--hide-desktop {
	display: none;
}

.mt-contact-nav__item a {
	display: block;
	max-width: 74px;
	padding: 4px 6px;
	border: none;
	border-radius: 5px;
	text-align: center;
	font-size: 10px;
	line-height: 15px;
	color: var(--mtcb-text, #515151);
	font-weight: 700;
	text-decoration: none !important;
	background: transparent;
	box-shadow: none;
	-webkit-tap-highlight-color: transparent;
}

.mt-contact-nav__item a:hover,
.mt-contact-nav__item a:focus {
	color: var(--mtcb-hover, #00c3ff);
	outline: none;
}

.mt-contact-nav__item a:focus-visible {
	outline: 2px solid var(--mtcb-hover, #00c3ff);
	outline-offset: 2px;
}

.mt-contact-nav__icon {
	display: block;
	width: 36px;
	height: 36px;
	margin: 0 auto 2px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	-webkit-background-size: contain;
	flex-shrink: 0;
}

.mt-contact-nav__icon--fallback {
	background-color: var(--mtcb-border, #f2f2f2);
	border-radius: 50%;
}

.mt-contact-nav__icon--fallback-phone {
	background-color: var(--mtcb-phone, #0068ff);
	border-radius: 50%;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1-9.4 0-17-7.6-17-17 0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1L6.6 10.8z'/%3E%3C/svg%3E") center / 18px no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1-9.4 0-17-7.6-17-17 0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1L6.6 10.8z'/%3E%3C/svg%3E") center / 18px no-repeat;
	background-color: #fff;
}

.mt-contact-nav__item--phone-mobile a {
	position: relative;
	display: block;
	overflow: visible;
}

.mt-contact-nav__phone-circle {
	position: absolute;
	top: -32px;
	left: 50%;
	width: auto;
	height: auto;
	border: none;
	border-radius: 0;
	background: transparent;
	display: none;
	align-items: center;
	justify-content: center;
	-webkit-transform: translate3d(-50%, 0, 0);
	transform: translate3d(-50%, 0, 0);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	-webkit-animation: mtcb-phone-float 2.2s ease-in-out infinite;
	animation: mtcb-phone-float 2.2s ease-in-out infinite;
}

.mt-contact-nav__phone-circle::before {
	content: "";
	position: absolute;
	top: -6px;
	right: -6px;
	bottom: -6px;
	left: -6px;
	border-radius: 50%;
	border: 2px solid var(--mtcb-phone, #ef5261);
	opacity: 0;
	pointer-events: none;
	-webkit-animation: mtcb-phone-ripple 2.2s ease-out infinite;
	animation: mtcb-phone-ripple 2.2s ease-out infinite;
}

.mt-contact-nav__phone-circle .mt-contact-nav__icon {
	width: 54px;
	height: 54px;
	margin: 0;
	position: relative;
	z-index: 1;
	-webkit-filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
	filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	-webkit-animation: mtcb-phone-pulse 1.8s ease-in-out infinite;
	animation: mtcb-phone-pulse 1.8s ease-in-out infinite;
}

.mt-contact-nav__phone-text {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 4px;
	font-size: 10px;
	line-height: 14px;
	font-weight: 700;
	color: var(--mtcb-text, #515151);
	text-align: center;
	white-space: nowrap;
	z-index: 1;
}

@-webkit-keyframes mtcb-phone-float {
	0%,
	100% {
		-webkit-transform: translate3d(-50%, 0, 0);
		transform: translate3d(-50%, 0, 0);
	}

	50% {
		-webkit-transform: translate3d(-50%, -6px, 0);
		transform: translate3d(-50%, -6px, 0);
	}
}

@keyframes mtcb-phone-float {
	0%,
	100% {
		-webkit-transform: translate3d(-50%, 0, 0);
		transform: translate3d(-50%, 0, 0);
	}

	50% {
		-webkit-transform: translate3d(-50%, -6px, 0);
		transform: translate3d(-50%, -6px, 0);
	}
}

@-webkit-keyframes mtcb-phone-pulse {
	0%,
	100% {
		-webkit-transform: scale(1);
		transform: scale(1);
	}

	50% {
		-webkit-transform: scale(1.1);
		transform: scale(1.1);
	}
}

@keyframes mtcb-phone-pulse {
	0%,
	100% {
		-webkit-transform: scale(1);
		transform: scale(1);
	}

	50% {
		-webkit-transform: scale(1.1);
		transform: scale(1.1);
	}
}

@-webkit-keyframes mtcb-phone-ripple {
	0% {
		-webkit-transform: scale(0.9);
		transform: scale(0.9);
		opacity: 0.65;
	}

	70%,
	100% {
		-webkit-transform: scale(1.45);
		transform: scale(1.45);
		opacity: 0;
	}
}

@keyframes mtcb-phone-ripple {
	0% {
		-webkit-transform: scale(0.9);
		transform: scale(0.9);
		opacity: 0.65;
	}

	70%,
	100% {
		-webkit-transform: scale(1.45);
		transform: scale(1.45);
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mt-contact-nav__phone-circle,
	.mt-contact-nav__phone-circle::before,
	.mt-contact-nav__phone-circle .mt-contact-nav__icon {
		-webkit-animation: none;
		animation: none;
	}
}
