/* =========================================================
   CHIMENEAS WHATSAPP WIDGET - ESTILOS
   ========================================================= */

/* Contenedor fijo (esquina inferior derecha) */
.mi-widget-whatsapp {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999999;
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
}

/* Botón flotante (estado inicial) */
.mi-widget-whatsapp__button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #00ab00 !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
	-webkit-tap-highlight-color: transparent;
	position: absolute;
}

.mi-widget-whatsapp__button:hover {
	transform: scale(1.08);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.mi-widget-whatsapp__button:active {
	transform: scale(0.95);
}

.mi-widget-whatsapp__button-img {

	width: 40px !important;
	height: 40px !important;
	object-fit: contain;
	pointer-events: none;
}

/* Botón oculto cuando el widget está abierto */
.mi-widget-whatsapp.is-open .mi-widget-whatsapp__button {
	opacity: 0;
	visibility: hidden;
	transform: scale(0.8);
}

/* Tarjeta del formulario (oculta por defecto) */
.mi-widget-whatsapp__form {
	position: relative;
	width: 340px;
	max-width: calc(100vw - 30px);
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(10px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.mi-widget-whatsapp.is-open .mi-widget-whatsapp__form {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

/* Botón cerrar (X) */
.mi-widget-whatsapp__close {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: none;
	border-radius: 50%;
	
	font-size: 25px !important;
	background: rgb(26, 26, 26) !important;
	color: #ffffff !important;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.mi-widget-whatsapp__close:hover {
	background: rgba(0, 0, 0, 0.16);
	color: #000000;
}

/* Estilos para el formulario generado por CF7 (solo dentro del widget) */
.mi-widget-whatsapp .wpcf7-form {
	padding: 44px 18px 18px;
	margin: 0;
	font-size: 14px;
	color: #333333;
}

.mi-widget-whatsapp .wpcf7-form p {
	margin: 0 0 12px;
}

.mi-widget-whatsapp .wpcf7-form label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
	color: #333333;
}

.mi-widget-whatsapp .wpcf7-form input[type="text"],
.mi-widget-whatsapp .wpcf7-form input[type="email"],
.mi-widget-whatsapp .wpcf7-form input[type="tel"],
.mi-widget-whatsapp .wpcf7-form textarea,
.mi-widget-whatsapp .wpcf7-form select {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 14px;
	background: #ffffff;
	transition: border-color 0.2s ease;
}

.mi-widget-whatsapp .wpcf7-form input:focus,
.mi-widget-whatsapp .wpcf7-form textarea:focus,
.mi-widget-whatsapp .wpcf7-form select:focus {
	border-color: #25d366;
	outline: none;
}

.mi-widget-whatsapp .wpcf7-form input[type="submit"],
.mi-widget-whatsapp .wpcf7-form .wpcf7-submit {
	display: block;
	width: 100%;
	padding: 12px 16px;
	border: none;
	border-radius: 6px;
	background: #25d366;
	color: #ffffff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.mi-widget-whatsapp .wpcf7-form input[type="submit"]:hover,
.mi-widget-whatsapp .wpcf7-form .wpcf7-submit:hover {
	background: #1eb958;
}

.mi-widget-whatsapp .wpcf7-response-output {
	margin: 10px 0 0 !important;
	padding: 8px 12px !important;
	border-radius: 6px;
	font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
	.mi-widget-whatsapp {
		right: 16px;
		bottom: 16px;
	}
	.mi-widget-whatsapp__button {
		width: 56px;
		height: 56px;
	}
	.mi-widget-whatsapp__button-img {
		width: 30px;
		height: 30px;
	}
	.mi-widget-whatsapp__form {
		width: 320px;
		max-width: calc(100vw - 32px);
	}
}

@media (max-width: 480px) {
	.mi-widget-whatsapp {
		right: 12px;
		bottom: 12px;
	}
	.mi-widget-whatsapp__form {
		width: calc(100vw - 24px);
		max-width: calc(100vw - 24px);
	}
	.mi-widget-whatsapp__close {
		width: 40px;
		height: 40px;
	}
}