/**
 * whatsapp-float.css — Estilos del Botón Flotante de WhatsApp con Doble Número.
 *
 * Muestra el botón oficial flotante en la esquina inferior derecha y
 * un selector interactivo con los dos números de contacto para reservas.
 *
 * @package Machupicchu_Travel_Narcy
 * @since   1.0.0
 */

/* -------------------------------------------------------------------------
 * 1. Contenedor Flotante
 * ---------------------------------------------------------------------- */
.mtn-wa-float-wrapper {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999999;
	font-family: var(--mtn-font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

/* -------------------------------------------------------------------------
 * 2. Botón Flotante Principal
 * ---------------------------------------------------------------------- */
.mtn-wa-float-btn {
	position: relative;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #25d366;
	color: #ffffff;
	border: none;
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45), 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
				box-shadow 0.3s ease,
				background-color 0.2s ease;
	outline: none;
}

.mtn-wa-float-btn:hover,
.mtn-wa-float-btn:focus-visible {
	background: #20ba5a;
	transform: scale(1.08);
	box-shadow: 0 10px 28px rgba(37, 211, 102, 0.6), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mtn-wa-icon-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	z-index: 2;
	position: relative;
	transition: transform 0.3s ease;
}

.mtn-wa-icon-wrap svg {
	fill: currentColor;
}

.mtn-wa-float-btn:hover .mtn-wa-icon-wrap {
	transform: rotate(8deg) scale(1.05);
}

/* Ondas de pulso continuo tipo radar */
.mtn-wa-pulse-wave {
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	background: rgba(37, 211, 102, 0.4);
	opacity: 0;
	z-index: 1;
	pointer-events: none;
	animation: mtn-wa-pulse-anim 2.5s infinite ease-out;
}

@keyframes mtn-wa-pulse-anim {
	0% {
		transform: scale(0.9);
		opacity: 0.8;
	}
	50% {
		opacity: 0.35;
	}
	100% {
		transform: scale(1.6);
		opacity: 0;
	}
}

/* Badge con número de asesores disponibles */
.mtn-wa-unread-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #dc3545;
	color: #ffffff;
	font-size: 11px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #ffffff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
	z-index: 3;
}

/* Tooltip al pasar el cursor */
.mtn-wa-float-tooltip {
	position: absolute;
	right: calc(100% + 14px);
	top: 50%;
	transform: translateY(-50%) translateX(8px);
	background: rgba(20, 32, 22, 0.95);
	backdrop-filter: blur(8px);
	color: #ffffff;
	padding: 7px 14px;
	border-radius: 8px;
	font-size: 12.5px;
	font-weight: 600;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.mtn-wa-float-tooltip::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 100%;
	transform: translateY(-50%);
	border-width: 5px;
	border-style: solid;
	border-color: transparent transparent transparent rgba(20, 32, 22, 0.95);
}

.mtn-wa-float-btn:hover .mtn-wa-float-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateY(-50%) translateX(0);
}

/* -------------------------------------------------------------------------
 * 3. Ventana Modal / Popup con los dos Números
 * ---------------------------------------------------------------------- */
.mtn-wa-popup {
	position: absolute;
	bottom: calc(100% + 16px);
	right: 0;
	width: 340px;
	max-width: calc(100vw - 32px);
	border-radius: 18px;
	overflow: hidden;
	background: #ffffff;
	box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.08);
	border: 1px solid var(--mtn-border, #e8ebe8);
	transform-origin: bottom right;
	opacity: 0;
	visibility: hidden;
	transform: scale(0.85) translateY(12px);
	transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
				transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
				visibility 0.25s;
	z-index: 100;
}

.mtn-wa-popup.is-open {
	opacity: 1;
	visibility: visible;
	transform: scale(1) translateY(0);
}

/* Cabecera del popup */
.mtn-wa-popup-header {
	background: linear-gradient(135deg, #075e54 0%, #128c7e 100%);
	color: #ffffff;
	padding: 16px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.mtn-wa-brand-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
}

.mtn-wa-header-icon {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #25d366;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mtn-wa-header-icon svg {
	fill: currentColor;
}

.mtn-wa-header-info {
	display: flex;
	flex-direction: column;
}

.mtn-wa-header-title {
	font-family: var(--mtn-font-heading);
	font-size: 14.5px;
	font-weight: 700;
	color: #ffffff;
	margin: 0;
	line-height: 1.2;
}

.mtn-wa-header-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11.5px;
	color: #d1fae5;
	margin-top: 3px;
}

.mtn-wa-dot-pulse {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #25d366;
	box-shadow: 0 0 6px #25d366;
	display: inline-block;
}

/* Botón cerrar del popup */
.mtn-wa-close-btn {
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: #ffffff;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: background-color 0.2s ease, transform 0.2s ease;
	outline: none;
}

.mtn-wa-close-btn:hover,
.mtn-wa-close-btn:focus-visible {
	background: rgba(255, 255, 255, 0.3);
	transform: scale(1.1);
}

/* Cuerpo del popup */
.mtn-wa-popup-body {
	padding: 16px;
	background: #f8faf8;
}

.mtn-wa-intro-msg {
	background: #ffffff;
	border: 1px solid var(--mtn-border, #e8ebe8);
	border-radius: 12px;
	padding: 10px 14px;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--mtn-text, #2c352e);
	margin: 0 0 14px;
	position: relative;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.mtn-wa-options-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Tarjeta individual de asesor / número */
.mtn-wa-agent-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	background: #ffffff;
	border: 1.5px solid var(--mtn-border, #e8ebe8);
	border-radius: 12px;
	text-decoration: none;
	color: inherit;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mtn-wa-agent-item:hover,
.mtn-wa-agent-item:focus-visible {
	background: #f0fdf4;
	border-color: #25d366;
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(37, 211, 102, 0.2);
}

.mtn-wa-agent-avatar {
	position: relative;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #eef8f2;
	border: 1.5px solid #25d366;
	color: #25d366;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: all 0.25s ease;
}

.mtn-wa-agent-avatar svg {
	fill: currentColor;
}

.mtn-wa-agent-item:hover .mtn-wa-agent-avatar {
	background: #25d366;
	color: #ffffff;
}

.mtn-wa-agent-badge-dot {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #25d366;
	border: 2px solid #ffffff;
}

.mtn-wa-agent-details {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	min-width: 0;
}

.mtn-wa-agent-name-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
}

.mtn-wa-agent-role {
	font-weight: 700;
	font-size: 13.5px;
	color: var(--mtn-heading, #142016);
	line-height: 1.2;
}

.mtn-wa-agent-online-tag {
	font-size: 10px;
	font-weight: 700;
	color: #15803d;
	background: #dcfce7;
	padding: 2px 6px;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.mtn-wa-agent-phone {
	font-weight: 700;
	font-size: 13px;
	color: #1a7a3c;
	margin-top: 2px;
	letter-spacing: 0.2px;
}

.mtn-wa-agent-sub {
	font-size: 11px;
	color: var(--mtn-muted, #5b665b);
	margin-top: 1px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mtn-wa-agent-action {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #a2b4a8;
	transition: color 0.2s ease, transform 0.2s ease;
}

.mtn-wa-agent-item:hover .mtn-wa-agent-action {
	color: #25d366;
	transform: translateX(3px);
}

/* Pie del popup */
.mtn-wa-popup-footer {
	padding: 10px 16px;
	background: #ffffff;
	border-top: 1px solid var(--mtn-border, #e8ebe8);
	text-align: center;
	font-size: 11.5px;
	font-weight: 500;
	color: var(--mtn-muted, #5b665b);
}

/* -------------------------------------------------------------------------
 * 4. Modo Oscuro
 * ---------------------------------------------------------------------- */
[data-theme="dark"] .mtn-wa-popup,
.dark-mode .mtn-wa-popup {
	background: #18221b;
	border-color: #233126;
	box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .mtn-wa-popup-body,
.dark-mode .mtn-wa-popup-body {
	background: #121a14;
}

[data-theme="dark"] .mtn-wa-intro-msg,
.dark-mode .mtn-wa-intro-msg {
	background: #18221b;
	border-color: #233126;
	color: #d8e2d9;
}

[data-theme="dark"] .mtn-wa-agent-item,
.dark-mode .mtn-wa-agent-item {
	background: #18221b;
	border-color: #233126;
	color: #d8e2d9;
}

[data-theme="dark"] .mtn-wa-agent-item:hover,
.dark-mode .mtn-wa-agent-item:hover {
	background: #1d2c21;
	border-color: #25d366;
}

[data-theme="dark"] .mtn-wa-popup-footer,
.dark-mode .mtn-wa-popup-footer {
	background: #18221b;
	border-top-color: #233126;
	color: #8fa091;
}

[data-theme="dark"] .mtn-wa-agent-badge-dot,
.dark-mode .mtn-wa-agent-badge-dot {
	border-color: #18221b;
}

/* -------------------------------------------------------------------------
 * 5. Responsividad Móvil
 * ---------------------------------------------------------------------- */
@media (max-width: 480px) {
	.mtn-wa-float-wrapper {
		bottom: 18px;
		right: 18px;
	}

	.mtn-wa-float-btn {
		width: 54px;
		height: 54px;
	}

	.mtn-wa-float-tooltip {
		display: none;
	}

	.mtn-wa-popup {
		width: calc(100vw - 36px);
		bottom: calc(100% + 14px);
		right: 0;
	}
}
