/* Modal Corporativo WTC CDMX - Estilo Widget Flotante */
.wtc-overlay {
  position: fixed;
  inset: 0;
  background: transparent; /* Sin fondo oscuro */
  display: flex;
  align-items: flex-end; /* Abajo */
  justify-content: flex-end; /* A la derecha */
  z-index: 9999;
  padding: 24px; /* Margen con la pantalla */
  pointer-events: none; /* Permite clics en la web de fondo */
}

.wtc-modal {
  background: #fff;
  width: 100%;
  max-width: 380px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15); /* Sombra para que resalte */
  overflow: hidden;
  animation: wtcSlideUp 0.4s ease;
  pointer-events: auto; /* Permite clics dentro del modal */
  border: 1px solid #e2e8f0;
  position: relative; /* Necesario para posicionar la X */
}

/* Botón de Cerrar (X) */
.wtc-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f1f5f9;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}
.wtc-close:hover { 
  background: #e2e8f0; 
  color: #0f172a;
}

/* Encabezado */
.wtc-modal-header {
  padding: 20px 20px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wtc-modal-header p {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
}

.wtc-modal-header span {
  font-size: 16px;
  color: #64748b;
  font-weight: 500;
}

/* Cuerpo */
.wtc-modal-body {
  padding: 24px 20px 20px;
}

.wtc-modal-body h3 {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.wtc-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wtc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  text-align: center;
}

.wtc-btn:active { transform: scale(0.98); }

.wtc-whatsapp {
  background: #25D366;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37,211,102,0.2);
}
.wtc-whatsapp:hover { background: #20bd5a; transform: translateY(-1px); }

.wtc-tool {
  background: #fff;
  color: #0f172a;
  border: 1.5px solid #e2e8f0;
}
.wtc-tool:hover { background: #f8fafc; border-color: #cbd5e1; transform: translateY(-1px); }

@keyframes wtcSlideUp { 
  from {opacity:0; transform: translateY(20px)} 
  to {opacity:1; transform: translateY(0)} 
}

/* Botón flotante (Burbuja) */
.wtc-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25D366; /* Color verde WhatsApp */
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37,211,102,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
  z-index: 9999;
  pointer-events: auto;
}

.wtc-bubble:hover {
  background: #20bd5a;
  transform: scale(1.05);
}

/* Animación para que aparezca suavemente */
@keyframes wtcPopIn {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}
.wtc-bubble.show {
  display: flex !important;
  animation: wtcPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wtc-icon-img,
.wtc-icon-svg {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  margin-right: 12px; /* Separación entre el ícono y el texto */
  object-fit: contain; /* Evita que la imagen se deforme */
}

.wtc-btn span {
  line-height: 1.3;
}

/* Evita que el título choque con el botón de cerrar */
.wtc-modal-header {
  padding-right: 60px;
}

@media (max-width: 480px) {
  .wtc-overlay { padding: 10px; }
  .wtc-modal { max-width: none; border-radius: 14px; }

  .wtc-close { top: 12px; right: 12px; width: 28px; height: 28px; }

  .wtc-modal-header { padding: 14px 52px 12px 16px; }
  .wtc-modal-header p { font-size: 16px; }
  .wtc-modal-header span { font-size: 11px; }

  .wtc-modal-body { padding: 16px; }
  .wtc-modal-body h3 { font-size: 16px; margin-bottom: 14px; }

  .wtc-btns { gap: 10px; }
  .wtc-btn { padding: 11px 12px; font-size: 14px; justify-content: flex-start; text-align: left; }
  .wtc-icon-img,
  .wtc-icon-svg { width: 24px; height: 24px; flex-basis: 24px; margin-right: 10px; }

  .wtc-bubble { bottom: 16px; right: 16px; width: 54px; height: 54px; font-size: 24px; }
}