/**
 * Mayphat Float Contact Bar & Consultation Modal Styles
 * @package MayPhat
 */

/* ==========================================================================
   1. Floating Contact Action Bar
   ========================================================================== */
.mp-fc-bar {
	position: fixed;
	bottom: 30px;
	z-index: 9998;
	display: flex;
	flex-direction: column;
	gap: 14px;
	pointer-events: none;
	user-select: none;
}

.mp-fc-bar--right {
	right: 24px;
	align-items: flex-end;
}

.mp-fc-bar--left {
	left: 24px;
	align-items: flex-start;
}

.mp-fc-item {
	position: relative;
	pointer-events: auto;
}

/* Base Action Button */
.mp-fc-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: none;
	outline: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	color: #ffffff;
	text-decoration: none;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.12);
	transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
	z-index: 2;
}

.mp-fc-btn:hover {
	transform: translateY(-3px) scale(1.08);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 3px 8px rgba(0, 0, 0, 0.16);
	color: #ffffff;
}

.mp-fc-btn:active {
	transform: translateY(0) scale(0.96);
}

/* Button Variants */
.mp-fc-btn--phone {
	background: linear-gradient(135deg, #e60000 0%, #b80000 100%);
}

.mp-fc-btn--zalo {
	background: linear-gradient(135deg, #0084ff 0%, #0056c6 100%);
}

.mp-fc-btn--form {
	background: linear-gradient(135deg, #ff7a00 0%, #d84315 100%);
}

/* SVG Icons */
.mp-fc-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	z-index: 3;
}

.mp-fc-svg {
	width: 24px;
	height: 24px;
	display: block;
}

.mp-fc-svg--zalo {
	width: 28px;
	height: 28px;
}

/* Wave Ripple Pulse on Phone */
.mp-fc-waves {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 52px;
	height: 52px;
	transform: translate(-50%, -50%);
	pointer-events: none;
	z-index: 1;
}

.mp-fc-wave {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: rgba(230, 0, 0, 0.45);
	animation: mp-fc-pulse 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.mp-fc-wave-2 {
	animation-delay: 0.75s;
}

@keyframes mp-fc-pulse {
	0% {
		transform: scale(1);
		opacity: 0.8;
	}

	70% {
		transform: scale(1.75);
		opacity: 0;
	}

	100% {
		transform: scale(2);
		opacity: 0;
	}
}

/* Tooltip Badge on Hover (Desktop) */
.mp-fc-tooltip {
	position: absolute;
	top: 50%;
	transform: translateY(-50%) scale(0.9);
	padding: 7px 14px;
	background: rgba(17, 24, 39, 0.92);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
	opacity: 0;
	visibility: hidden;
	transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
	pointer-events: none;
	z-index: 10;
}

.mp-fc-bar--right .mp-fc-tooltip {
	right: calc(100% + 12px);
	transform-origin: right center;
}

.mp-fc-bar--right .mp-fc-tooltip::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 100%;
	transform: translateY(-50%);
	border-width: 5px;
	border-style: solid;
	border-color: transparent transparent transparent rgba(17, 24, 39, 0.92);
}

.mp-fc-bar--left .mp-fc-tooltip {
	left: calc(100% + 12px);
	transform-origin: left center;
}

.mp-fc-bar--left .mp-fc-tooltip::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 100%;
	transform: translateY(-50%);
	border-width: 5px;
	border-style: solid;
	border-color: transparent rgba(17, 24, 39, 0.92) transparent transparent;
}

@media (min-width: 992px) {
	.mp-fc-item:hover .mp-fc-tooltip {
		opacity: 1;
		visibility: visible;
		transform: translateY(-50%) scale(1);
	}
}

/* ==========================================================================
   2. Lightbox Modal for Contact Form 7
   ========================================================================== */
.mp-fc-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mp-fc-modal-overlay.is-active {
	opacity: 1;
	visibility: visible;
}

.mp-fc-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.68);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.mp-fc-modal-container {
	position: relative;
	width: 100%;
	max-width: 620px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	overflow-x: hidden;
	z-index: 2;
	-webkit-overflow-scrolling: touch;
}

.mp-fc-modal-card {
	position: relative;
	background: #ffffff;
	border-radius: 16px;
	padding: 32px 28px 24px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
	transform: scale(0.92) translateY(15px);
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mp-fc-modal-overlay.is-active .mp-fc-modal-card {
	transform: scale(1) translateY(0);
}

/* Modal Close Button */
.mp-fc-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: #f1f5f9;
	color: #64748b;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	margin: 0;
	transition: all 0.2s ease;
	z-index: 5;
}

.mp-fc-modal-close svg {
	width: 20px;
	height: 20px;
}

.mp-fc-modal-close:hover {
	background: #fee2e2;
	color: #ef4444;
	transform: rotate(90deg);
}

/* Modal Header */
.mp-fc-modal-header {
	text-align: center;
	margin-bottom: 22px;
	padding-bottom: 16px;
	border-bottom: 1px solid #f1f5f9;
}

.mp-fc-modal-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	background: #fef2f2;
	color: #dc2626;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 10px;
}

.mp-fc-modal-title {
	font-size: 20px;
	font-weight: 800;
	color: #1e293b;
	margin: 0 0 6px;
	line-height: 1.35;
	text-transform: uppercase;
}

.mp-fc-modal-desc {
	font-size: 13.5px;
	color: #64748b;
	margin: 0;
	line-height: 1.5;
}

/* Contact Form 7 Inside Modal */
.mp-fc-modal-body .wpcf7 form {
	margin: 0;
}

.mp-fc-modal-body label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 5px;
}

.mp-fc-modal-body input[type="text"],
.mp-fc-modal-body input[type="tel"],
.mp-fc-modal-body input[type="email"],
.mp-fc-modal-body select,
.mp-fc-modal-body textarea {
	width: 100%;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 14px;
	color: #1e293b;
	background-color: #f8fafc;
	transition: all 0.2s ease;
	box-sizing: border-box;
	box-shadow: none;
	margin-bottom: 12px;
}

.mp-fc-modal-body input:focus,
.mp-fc-modal-body select:focus,
.mp-fc-modal-body textarea:focus {
	background-color: #ffffff;
	border-color: #e60000;
	outline: none;
	box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.12);
}

.mp-fc-modal-body .button,
.mp-fc-modal-body input[type="submit"] {
	width: 100%;
	padding: 12px 20px;
	background: linear-gradient(135deg, #e60000 0%, #b80000 100%) !important;
	color: #ffffff !important;
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.25s ease;
	box-shadow: 0 4px 14px rgba(230, 0, 0, 0.3);
	margin-top: 6px;
}

.mp-fc-modal-body .button:hover,
.mp-fc-modal-body input[type="submit"]:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(230, 0, 0, 0.4);
}

.mp-fc-modal-body .wpcf7-response-output {
	border-radius: 8px !important;
	padding: 10px 14px !important;
	font-size: 13.5px !important;
	margin-top: 15px !important;
}

/* Contact Form 7 Spinner Control */
.mp-fc-modal-body .wpcf7-spinner {
	visibility: hidden !important;
	display: none !important;
	opacity: 0;
	margin: 10px auto 0 !important;
}

.mp-fc-modal-body form.submitting .wpcf7-spinner {
	visibility: visible !important;
	display: inline-block !important;
	opacity: 1 !important;
}

.mp-fc-modal-body form:not(.submitting) .wpcf7-spinner,
.mp-fc-modal-body form.invalid .wpcf7-spinner,
.mp-fc-modal-body form.failed .wpcf7-spinner,
.mp-fc-modal-body form.sent .wpcf7-spinner,
.mp-fc-modal-body form.init .wpcf7-spinner,
.mp-fc-modal-body form.resetting .wpcf7-spinner {
	visibility: hidden !important;
	display: none !important;
	opacity: 0 !important;
}

/* Hide any button loading animations or pseudo-elements when not actively submitting */
.mp-fc-modal-body form:not(.submitting) .button::before,
.mp-fc-modal-body form:not(.submitting) .button::after,
.mp-fc-modal-body form:not(.submitting) input[type="submit"]::before,
.mp-fc-modal-body form:not(.submitting) input[type="submit"]::after,
.mp-fc-modal-body form.invalid .button::before,
.mp-fc-modal-body form.invalid .button::after,
.mp-fc-modal-body form.invalid input[type="submit"]::before,
.mp-fc-modal-body form.invalid input[type="submit"]::after,
.mp-fc-modal-body form.failed .button::before,
.mp-fc-modal-body form.failed .button::after,
.mp-fc-modal-body form.failed input[type="submit"]::before,
.mp-fc-modal-body form.failed input[type="submit"]::after {
	display: none !important;
	content: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
}

/* Modal Body Scrollbar */
.mp-fc-modal-container::-webkit-scrollbar {
	width: 6px;
}

.mp-fc-modal-container::-webkit-scrollbar-thumb {
	background-color: rgba(148, 163, 184, 0.5);
	border-radius: 4px;
}

/* ==========================================================================
   3. Responsive Mobile Viewport
   ========================================================================== */
@media (max-width: 768px) {
	.mp-fc-bar {
		bottom: 20px;
		gap: 10px;
	}

	.mp-fc-bar--right {
		right: 16px;
	}

	.mp-fc-bar--left {
		left: 16px;
	}

	.mp-fc-btn {
		width: 46px;
		height: 46px;
	}

	.mp-fc-waves {
		width: 46px;
		height: 46px;
	}

	.mp-fc-svg {
		width: 21px;
		height: 21px;
	}

	.mp-fc-svg--zalo {
		width: 24px;
		height: 24px;
	}

	.mp-fc-tooltip {
		display: none;
	}

	.mp-fc-modal-card {
		padding: 24px 18px 18px;
	}

	.mp-fc-modal-title {
		font-size: 17px;
	}
}